@openmrs/esm-stock-management-app 3.2.2-pre.1613 → 3.2.2-pre.1618
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/1170.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 a}let tv=(e,n)=>{let t=structuredClone(n);if(!e)return t;for(let n of Object.keys(e)){let a=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(a&&t$(e)){if(o._type===nG.Array&&Array.isArray(a)){let o=a.map(n=>tv(e,n));t[n]=o}else if(o._type===nG.Object)for(let n of Object.keys(a))a[n]=tv(e,a[n])}}else if(tA(o)){let e=a??{};tA(e)&&(t[n]=tv(o,e))}}return t};function t$(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function tA(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let tk=new Set;function tw(e,n){let t=`${e}:::${n}`;tk||(tk=new Set),tk.has(t)||(console.error(n),tk.add(t))}function tx(e){e?tk.forEach(n=>{n.startsWith(e)&&tk.delete(n)}):tk.clear()}function tC(){te.forEach(e=>e()),te.length=0,tt()}let tE={"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:nG.Object,_default:{},_validators:[nV(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(", ")}.`})]}},tS={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:nG.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:nG.String,_default:void 0}},...tE},tD=(e,n)=>nV(t=>e<=t&&t<=n,`must be between ${e} and ${n}`),tM=e=>{let n=e.concat(["openmrsBase","openmrsSpaBase"]);return nV(e=>{if(!e||"string"!=typeof e)return!1;let t=/\${(.*?)}/g,a=t.exec(e);for(;a;){if(!n.includes(a[1]))return!1;a=t.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+n.map(e=>"${"+e+"}").join(", "))},tz=tM([]),tO=e=>nV(n=>e.includes(n),`Must be one of the following: '${e.join("', '")}'.`),tP={inRange:tD,isUrl:tz,isUrlWithTemplateParameters:tM,oneOf:tO};var tT=t(48067);let tB=V("breadcrumbs",[]);function tI(e){return tN([e])}function tN(e){let n=[...tj(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,tT.pathToRegexp)(e.matcher).regexp:(0,tT.pathToRegexp)(e.path).regexp,settings:e}))];tB.setState(n,!0)}function tj(){return tB.getState()}function tR(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=tR(e,t.join("/"));if(n)return n}}(e,n)}function tF(e,n){if(e.length>0){let t=tR(e,n);if(t){let n=[t],a=tR(e,t.settings.parent);for(;void 0!==a;)n.push(a),a=tR(e,a.settings.parent);return n.reverse()}}return[]}function tL(e){return tF(tj(),e)}var tW=Object.freeze({__proto__:null,get start(){return ot},get ensureJQuerySupport(){return aL},get setBootstrapMaxTime(){return aA},get setMountMaxTime(){return ak},get setUnmountMaxTime(){return aw},get setUnloadMaxTime(){return ax},get registerApplication(){return aX},get unregisterApplication(){return a0},get getMountedApps(){return aK},get getAppStatus(){return aJ},get unloadApplication(){return a1},get checkActivityFunctions(){return aQ},get getAppNames(){return aY},get pathToActiveWhen(){return a5},get navigateToUrl(){return aO},get patchHistoryApi(){return aj},get triggerAppChange(){return a7},get addErrorHandler(){return tH},get removeErrorHandler(){return tK},get mountRootParcel(){return ay},get NOT_LOADED(){return tZ},get LOADING_SOURCE_CODE(){return tX},get NOT_BOOTSTRAPPED(){return tQ},get BOOTSTRAPPING(){return t0},get NOT_MOUNTED(){return t1},get MOUNTING(){return t2},get UPDATING(){return t5},get LOAD_ERROR(){return t8},get MOUNTED(){return t3},get UNLOADING(){return t6},get UNMOUNTING(){return t4},get SKIP_BECAUSE_BROKEN(){return t7}}),tG=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,tV=!function(){try{var e=new tG("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}:tG;let tU=[];function tq(e,n,t){let a=tJ(e,n,t);tU.length?tU.forEach(e=>e(a)):setTimeout(()=>{throw a})}function tH(e){if("function"!=typeof e)throw Error(tY(28,!1));tU.push(e)}function tK(e){if("function"!=typeof e)throw Error(tY(29,!1));let n=!1;return tU=tU.filter(t=>{let a=t===e;return n=n||a,!a}),n}function tY(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 tJ(e,n,t){let a,o=`${aa(n)} '${an(n)}' died in status ${n.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}a=e}else{console.warn(tY(30,!1,n.status,an(n)));try{a=Error(o+JSON.stringify(e))}catch(n){a=e}}return a.appOrParcelName=an(n),n.status=t,a}let tZ="NOT_LOADED",tX="LOADING_SOURCE_CODE",tQ="NOT_BOOTSTRAPPED",t0="BOOTSTRAPPING",t1="NOT_MOUNTED",t2="MOUNTING",t3="MOUNTED",t5="UPDATING",t4="UNMOUNTING",t6="UNLOADING",t8="LOAD_ERROR",t7="SKIP_BECAUSE_BROKEN";function t9(e){return e.status===t3}function ae(e){try{return e.activeWhen(window.location)}catch(n){return tq(n,e,t7),!1}}function an(e){return e.name}function at(e){return!!e.unmountThisParcel}function aa(e){return at(e)?"parcel":"application"}function ao(){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 ar(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return e[t];return null}function ai(e){return e&&("function"==typeof e||Array.isArray(e)&&!ar(e,e=>"function"!=typeof e))}function as(e,n){let t=e[n]||[];0===(t=Array.isArray(t)?t:[t]).length&&(t=[()=>Promise.resolve()]);let a=aa(e),o=an(e);return function(e){return t.reduce((t,r,i)=>t.then(()=>{let t=r(e);return al(t)?t:Promise.reject(tY(15,!1,a,o,n,i))}),Promise.resolve())}}function al(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let ac=[];function ap(e,n){return Promise.resolve().then(()=>e.status!==tQ?e:(e.status=t0,e.bootstrap?aC(e,"bootstrap").then(t).catch(t=>{if(n)throw tJ(t,e,t7);return tq(t,e,t7),e}):Promise.resolve().then(t)));function t(){return e.status=t1,e}}function au(e,n){return Promise.resolve().then(()=>{if(e.status!==t3)return e;return e.status=t4,Promise.all(Object.keys(e.parcels).map(n=>e.parcels[n].unmountThisParcel())).then(t,a=>t().then(()=>{let t=Error(a.message);if(n)throw tJ(t,e,t7);tq(t,e,t7)})).then(()=>e);function t(){return aC(e,"unmount").then(()=>{e.status=t1},t=>{if(n)throw tJ(t,e,t7);tq(t,e,t7)})}})}let ad=!1,af=!1;function am(e,n){return Promise.resolve().then(()=>e.status!==t1?e:(ad||(window.dispatchEvent(new tV("single-spa:before-first-mount")),ad=!0),e.status=t2,aC(e,"mount").then(()=>(e.status=t3,af||(window.dispatchEvent(new tV("single-spa:first-mount")),af=!0),e)).catch(t=>{return e.status=t3,au(e,!0).then(a,a);function a(){if(n)throw tJ(t,e,t7);return tq(t,e,t7),e}})))}let ah=0,ag={parcels:{}};function ay(){return ab.apply(ag,arguments)}function ab(e,n){let t,a,o,r=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(tY(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(tY(3,!1,typeof e.name));let i=ah++,s=e.name||`parcel-${i}`;if("object"!=typeof n)throw Error(tY(4,!1,s,typeof n));if(!n.domElement)throw Error(tY(5,!1,s));let l="function"==typeof e,c=l?e:()=>Promise.resolve(e),p={id:i,parcels:{},status:l?tX:tQ,customProps:n,parentName:an(r),unmountThisParcel:()=>f.then(()=>{if(p.status!==t3)throw Error(tY(6,!1,s,p.status));return au(p,!0)}).then(e=>(p.parentName&&delete r.parcels[p.id],e)).then(e=>(a(e),e)).catch(e=>{throw p.status=t7,o(e),e})};r.parcels[i]=p;let u=c();if(!u||"function"!=typeof u.then)throw Error(tY(7,!1));let d=(u=u.then(e=>{if(!e)throw Error(tY(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!ai(e.bootstrap))throw Error(tY(9,!1,s));if(!ai(e.mount))throw Error(tY(10,!1,s));if(!ai(e.unmount))throw Error(tY(11,!1,s));if(e.update&&!ai(e.update))throw Error(tY(12,!1,s));let n=as(e,"bootstrap"),a=as(e,"mount"),o=as(e,"unmount");p.status=tQ,p.name=s,p.bootstrap=n,p.mount=a,p.unmount=o,p.timeouts=aE(e.timeouts),e.update&&(p.update=as(e,"update"),t.update=function(e){return p.customProps=e,a_(Promise.resolve().then(()=>{if(p.status!==t3)throw Error(tY(32,!1,an(p)));return p.status=t5,aC(p,"update").then(()=>(p.status=t3,p)).catch(e=>{throw tJ(e,p,t7)})}))})})).then(()=>ap(p,!0)),f=d.then(()=>am(p,!0)),m=new Promise((e,n)=>{a=e,o=n});return t={mount:()=>a_(Promise.resolve().then(()=>{if(p.status!==t1)throw Error(tY(13,!1,s,p.status));return r.parcels[i]=p,am(p)})),unmount:()=>a_(p.unmountThisParcel()),getStatus:()=>p.status,loadPromise:a_(u),bootstrapPromise:a_(d),mountPromise:a_(f),unmountPromise:a_(m)}}function a_(e){return e.then(()=>null)}function av(e){let n=an(e),t="function"==typeof e.customProps?e.customProps(n,window.location):e.customProps;("object"!=typeof t||null===t||Array.isArray(t))&&(t={},console.warn(tY(40,!1),n,t));let a=ao({},t,{name:n,mountParcel:ab.bind(e),singleSpa:tW});return at(e)&&(a.unmountSelf=e.unmountThisParcel),a}let a$={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 aA(e,n,t){if("number"!=typeof e||e<=0)throw Error(tY(16,!1));a$.bootstrap={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function ak(e,n,t){if("number"!=typeof e||e<=0)throw Error(tY(17,!1));a$.mount={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function aw(e,n,t){if("number"!=typeof e||e<=0)throw Error(tY(18,!1));a$.unmount={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function ax(e,n,t){if("number"!=typeof e||e<=0)throw Error(tY(19,!1));a$.unload={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function aC(e,n){let t=e.timeouts[n],a=t.warningMillis,o=aa(e);return new Promise((r,i)=>{let s=!1,l=!1;e[n](av(e)).then(e=>{s=!0,r(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>p(1),a),setTimeout(()=>p(!0),t.millis);let c=tY(31,!1,n,o,an(e),t.millis);function p(e){s||(!0===e?(l=!0,t.dieOnTimeout?i(Error(c)):console.error(c)):!l&&(console.warn(c),e*a+a<t.millis&&setTimeout(()=>p(e+1),a)))}})}function aE(e){let n={};for(let t in a$)n[t]=ao({},a$[t],e&&e[t]||{});return n}function aS(e){return Promise.resolve().then(()=>{let n,t;return e.loadPromise?e.loadPromise:e.status!==tZ&&e.status!==t8?e:(e.status=tX,e.loadPromise=Promise.resolve().then(()=>{let a=e.loadApp(av(e));if(!al(a))throw t=!0,Error(tY(33,!1,an(e)));return a.then(t=>{let a;e.loadErrorTime=null,"object"!=typeof(n=t)&&(a=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!ai(n.bootstrap)&&(a=35),ai(n.mount)||(a=36),ai(n.unmount)||(a=37);let o=aa(n);if(a){let t;try{t=JSON.stringify(n)}catch(e){}return console.error(tY(a,!1,o,an(e),t),n),tq(void 0,e,t7),e}return n.devtools&&n.devtools.overlays&&(e.devtools.overlays=ao({},e.devtools.overlays,n.devtools.overlays)),e.status=tQ,e.bootstrap=as(n,"bootstrap"),e.mount=as(n,"mount"),e.unmount=as(n,"unmount"),e.unload=as(n,"unload"),e.timeouts=aE(n.timeouts),delete e.loadPromise,e})}).catch(n=>{let a;return delete e.loadPromise,t?a=t7:(a=t8,e.loadErrorTime=(new Date).getTime()),tq(n,e,a),e}))})}let aD="u">typeof window,aM={hashchange:[],popstate:[]},az=["hashchange","popstate"];function aO(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(tY(14,!1));n=e.currentTarget.href,e.preventDefault()}let t=aR(window.location.href),a=aR(n);0===n.indexOf("#")?window.location.hash=a.hash:t.host!==a.host&&a.host?window.location.href=n:a.pathname===t.pathname&&a.search===t.search?window.location.hash=a.hash:window.history.pushState(null,null,n)}function aP(e){if(e){let n=e[0].type;az.indexOf(n)>=0&&aM[n].forEach(n=>{try{n.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function aT(){a9([],arguments)}function aB(e,n){return function(){let t=window.location.href,o=e.apply(this,arguments),r=window.location.href;return a&&t===r||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 aI=null,aN=!1;function aj(e){if(aN)throw Error(tY(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,aN=!0,aI=window.history.replaceState,window.addEventListener("hashchange",aT),window.addEventListener("popstate",aT);let n=window.addEventListener,t=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&az.indexOf(e)>=0)||ar(aM[e],e=>e===t))return n.apply(this,arguments);aM[e].push(t)},window.removeEventListener=function(e,n){return"function"==typeof n&&az.indexOf(e)>=0&&(aM[e]=aM[e].filter(e=>e!==n)),t.apply(this,arguments)},window.history.pushState=aB(window.history.pushState,"pushState"),window.history.replaceState=aB(aI,"replaceState")}function aR(e){let n=document.createElement("a");return n.href=e,n}aD&&(window.singleSpaNavigate?console.warn(tY(41,!1)):window.singleSpaNavigate=aO);let aF=!1;function aL(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!aF){let n=e.fn.on,t=e.fn.off;e.fn.on=function(e,t){return aW.call(this,n,window.addEventListener,e,t,arguments)},e.fn.off=function(e,n){return aW.call(this,t,window.removeEventListener,e,n,arguments)},aF=!0}}function aW(e,n,t,a,o){return"string"!=typeof t?e.apply(this,o):(t.split(/\s+/).forEach(e=>{az.indexOf(e)>=0&&(n(e,a),t=t.replace(e,""))}),""===t.trim()?this:e.apply(this,o))}let aG={};function aV(e){return Promise.resolve().then(()=>{let n=aG[an(e)];if(!n)return e;if(e.status===tZ)return aU(e,n),e;if(e.status===t6)return n.promise.then(()=>e);if(e.status!==t1&&e.status!==t8)return e;let t=e.status===t8?Promise.resolve():aC(e,"unload");return e.status=t6,t.then(()=>(aU(e,n),e)).catch(t=>(delete aG[an(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,tq(t,e,t7),n.reject(t),e))})}function aU(e,n){delete aG[an(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=tZ,n.resolve()}function aq(e,n,t,a){aG[an(e)]={app:e,resolve:t,reject:a},Object.defineProperty(aG[an(e)],"promise",{get:n})}let aH=[];function aK(){return aH.filter(t9).map(an)}function aY(){return aH.map(an)}function aJ(e){let n=ar(aH,n=>an(n)===e);return n?n.status:null}let aZ=!1;function aX(e,n,t,a){var o,r;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(tY(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(tY(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(tY(20,!1));let a=e=>"string"==typeof e||"function"==typeof e;if(!(a(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(a)))throw Error(tY(24,!1));if(!a3(e.customProps))throw Error(tY(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,n,t,a){if("string"!=typeof e||0===e.length)throw Error(tY(20,!1));if(!n)throw Error(tY(23,!1));if("function"!=typeof t)throw Error(tY(24,!1));if(!a3(a))throw Error(tY(22,!1))}(e,n,t,a),i.name=e,i.loadApp=n,i.activeWhen=t,i.customProps=a),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(r=i.activeWhen)?r:[r]).map(e=>"function"==typeof e?e:a5(e)),i.activeWhen=e=>s.some(n=>n(e)),i);if(on||aZ||(aZ=!0,setTimeout(()=>{on||console.warn(tY(1,!1))},5e3)),-1!==aY().indexOf(l.name))throw Error(tY(21,!1,l.name));aH.push(ao({loadErrorTime:null,status:tZ,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),aD&&(aL(),a9())}function aQ(e=window.location){return aH.filter(n=>n.activeWhen(e)).map(an)}function a0(e){if(0===aH.filter(n=>an(n)===e).length)throw Error(tY(25,!1,e));return(aD?a1(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let n=aH.map(an).indexOf(e);aH.splice(n,1)})}function a1(e,n={waitForUnmount:!1}){if("string"!=typeof e)throw Error(tY(26,!1));let t=ar(aH,n=>an(n)===e);if(!t)throw Error(tY(27,!1,e));let a=aG[an(t)];if(n&&n.waitForUnmount){if(a)return a.promise;{let e=new Promise((n,a)=>{aq(t,()=>e,n,a)});return e}}{let e;return a?(e=a.promise,a2(t,a.resolve,a.reject)):e=new Promise((n,a)=>{aq(t,()=>e,n,a),a2(t,n,a)}),e}}function a2(e,n,t){Promise.resolve().then(()=>{if(ar(aQ(),n=>n===an(e)))return a7()}).then(()=>au(e).then(aV).then(()=>{n(),setTimeout(()=>{a9()})})).catch(t)}function a3(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function a5(e,n){let t=function(e,n){let t=0,a=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let n=0;n<e.length;n++){let t=e[n],o=a&&"/"===t;(!a&&":"===t||o)&&r(n)}return r(e.length),RegExp(o,"i");function r(r){let i=e.slice(t,r).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=a?"[^/]+/?":i,r===e.length)if(a)n&&(o+="$");else{let e=n?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}a=!a,t=r}}(e,n);return e=>{let n=e.origin;n||(n=`${e.protocol}//${e.host}`);let a=e.href.replace(n,"").replace(e.search,"").split("?")[0];return t.test(a)}}let a4=!1,a6=[],a8=aD&&window.location.href;function a7(){return a9()}function a9(e=[],n,t=!1){let a,o,r,i,s;if(a4)return new Promise((e,t)=>{a6.push({resolve:e,reject:t,eventArguments:n})});let{appsToUnload:l,appsToUnmount:c,appsToLoad:p,appsToMount:u}=(a=[],o=[],r=[],i=[],s=(new Date).getTime(),aH.forEach(e=>{let n=e.status!==t7&&ae(e);switch(e.status){case t8:n&&s-e.loadErrorTime>=200&&r.push(e);break;case tZ:case tX:n&&r.push(e);break;case tQ:case t1:!n&&aG[an(e)]?a.push(e):n&&i.push(e);break;case t3:n||o.push(e)}}),{appsToUnload:a,appsToUnmount:o,appsToLoad:r,appsToMount:i}),d,f=[],m=a8,h=a8=window.location.href;return on?(a4=!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 aI.call(window.history,history.state,"",m.substring(location.origin.length)),a8=location.href,a4=!1,a9(e,n,!0);let a=l.map(aV),o=Promise.all(c.map(au).map(e=>e.then(aV)).concat(a));o.then(()=>{$("before-mount-routing-event",v(!0))},e=>{throw e});let r=p.map(e=>aS(e).then(e=>oe(e,o))),i=u.filter(e=>0>p.indexOf(e)).map(e=>oe(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(r.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(aS)).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(tY(42,!1))),console.warn(e),!1)))}function y(){let n=aK();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(a4=!1,a6.length>0){let e=a6;a6=[],a9(e)}return n}function b(){t||(e.forEach(e=>{aP(e.eventArguments)}),aP(n))}function v(e=!1,t){let a={},o={[t3]:[],[t1]:[],[tZ]:[],[t7]:[]};e?(p.concat(u).forEach((e,n)=>{i(e,t3)}),l.forEach(e=>{i(e,tZ)}),c.forEach(e=>{i(e,t1)})):d.forEach(e=>{i(e)});let r={detail:{newAppStatuses:a,appsByNewStatus:o,totalAppChanges:d.length,originalEvent:null==n?void 0:n[0],oldUrl:m,newUrl:h}};return t&&ao(r.detail,t),r;function i(e,n){let t=an(e);n=n||aJ(t),a[t]=n,(o[n]=o[n]||[]).push(t)}}function $(e,n){t||window.dispatchEvent(new tV(`single-spa:${e}`,n))}}function oe(e,n){return ae(e)?ap(e).then(e=>n.then(()=>ae(e)?am(e):e)):n.then(()=>e)}let on=!1;function ot(e){on=!0,aD&&(aj(e),a9())}function oa(e,n){let t=window.getOpenmrsSpaBase().replace(/\/$/,"");return oo(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t,...n}).replace(/^\/\//,"/")}function oo(e,n){return Object.keys(n).reduce((e,t)=>e.split("${"+t+"}").join(n[t]),e)}function or({to:e,templateParams:n}){let t=window.getOpenmrsSpaBase().replace(/\/$/,""),a=oa(e,n).replace(window.location.origin,"");a.startsWith(t)?aO(a):window.location.assign(a)}aD&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...aH]},reroute:a9,NOT_LOADED:tZ,toLoadPromise:aS,toBootstrapPromise:ap,unregisterApplication:a0,getProfilerData:function(){return ac}});let oi="openmrs:history";function os(e){let n=JSON.parse(sessionStorage.getItem(oi)??"[]")||[];n.push(e),n.length>50&&(n=n.slice(-50)),sessionStorage.setItem(oi,JSON.stringify(n))}function ol(){0===JSON.parse(sessionStorage.getItem(oi)??"[]").length&&document.referrer&&os(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let n=oc();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(n[n.length-1]=window.location.href,sessionStorage.setItem(oi,JSON.stringify(n))):!e.detail.originalEvent?.singleSpa&&n.includes(window.location.href)?op({toUrl:window.location.href}):n[n.length-1]!==window.location.href&&os(window.location.href)})}function oc(){return JSON.parse(sessionStorage.getItem(oi)??"[]")}function op({toUrl:e}){let n=oc(),t=n.lastIndexOf(e);if(-1!=t){let e=n.slice(0,t+1);or({to:n[t]}),sessionStorage.setItem(oi,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function ou(){sessionStorage.removeItem(oi)}let od="${openmrsSpaBase}/login",of={redirectAuthFailure:{enabled:{_type:nG.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:nG.String,_default:od,_validators:[tP.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:nG.Array,_default:[401],_elements:{_type:nG.Number,_validators:[tP.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:nG.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:nG.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function om(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}let oh="/ws/rest/v1",og="/ws/fhir2/R4",oy=`${oh}/session`;function ob(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function o_(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=ob(e);if(n.headers||(n.headers={}),ed(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(oh)&&void 0===n.headers["Disable-WWW-Authenticate"]&&(n.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(og)){let e=new URL(t,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),t=e.toString())}let a=Error();return window.fetch(t,n).then(async e=>{let{redirectAuthFailure:n,followRedirects:o}=await tc("@openmrs/esm-api");if(e.ok){let n=e.headers.get("location");return(o&&n&&(t===ob(oy)||204===e.status)&&or({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===ob(oy)&&403===e.status||n.enabled&&n.errors.includes(e.status)?(ou(),or({to:n.url||e.headers.get("location")||od}),n.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(n=>{let o=n;try{o=JSON.parse(n)}catch(e){}throw new o$(t,e,o,a)},n=>{throw new o$(t,e,null,a)})})}function ov(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 eo.Observable(a=>{let o=!1;return o_(e,n).then(e=>{o=!0,a.next(e),a.complete()},e=>{o=!0,a.error(e)}),()=>{o||t.abort()}})}class o$ extends Error{constructor(e,n,t,a){super(),om(this,"response",void 0),om(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`,a.message=this.message,this.responseBody=t,this.response=n,this.stack=`Stacktrace for outgoing request:
|
|
13
13
|
${a.stack}
|
|
14
14
|
Stacktrace for incoming response:
|
|
15
|
-
${this.stack}`}}let oA=V("session",{loaded:!1,session:null}),ok=0;function ow(e={includeAuthStatus:!0}){return(ok<Date.now()-6e4||!oA.getState().loaded)&&oE(),new eo.Observable(n=>{let t=t=>{t.loaded&&(e.includeAuthStatus?n.next(t.session):n.next(t.session?.user))};return t(oA.getState()),oA.subscribe(t)})}function ox(){return(ok<Date.now()-6e4||!oA.getState().loaded)&&oE(),oA}function oC(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 oE(e,n){ok=Date.now();let t={};return e&&n&&(t.Authorization=`Basic ${window.btoa(`${e}:${n}`)}`),oT(o_(oy,{headers:t}))}function oS(){oA.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oD(e,n){var t,a;if(void 0===n)return!e;if(!e)return!0;return t=e,a=n,("string"==typeof t?!Y(a.privileges.find(e=>t===e.display)):Array.isArray(t)?t.every(e=>!Y(a.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 oM(){let e,n;return new Promise(t=>{let a=a=>{a.loaded&&a.session.user&&(e=a.session.user,t(a.session.user),n&&n())};a(oA.getState()),e||(n=oA.subscribe(a))})}function oz(){return new Promise((e,n)=>{ow().subscribe(n=>{e(n.sessionLocation)},n).unsubscribe()})}async function oO(e,n){return oT(o_(oy,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal}))}async function oP(e,n,t){return t||(t=new AbortController),await o_(`${oh}/user/${e}`,{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:t.signal}),oE()}function oT(e){return new Promise((n,t)=>{e.then(e=>{let a;"object"==typeof e?.data?(a={loaded:!0,session:e.data},oA.setState(a),n(a)):(a={loaded:!1,session:null},oA.setState(a),t(a))}).catch(e=>{T(`Failed to fetch new session information: ${e}`);let n={loaded:!1,session:null};oA.setState(n),t(n)})})}function oB(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oA.subscribe(e=>{e.loaded&&e.session&&oC(e.session)});let oI={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function oN(){ta("@openmrs/esm-api",of),oE()}let oj={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"},oR=e=>"string"==typeof e,oF=()=>{let e,n,t=new Promise((t,a)=>{e=t,n=a});return t.resolve=e,t.reject=n,t},oL=e=>null==e?"":""+e,oW=/###/g,oG=e=>e&&e.indexOf("###")>-1?e.replace(oW,"."):e,oV=e=>!e||oR(e),oU=(e,n,t)=>{let a=oR(n)?n.split("."):n,o=0;for(;o<a.length-1;){if(oV(e))return{};let n=oG(a[o]);!e[n]&&t&&(e[n]=new t),e=Object.prototype.hasOwnProperty.call(e,n)?e[n]:{},++o}return oV(e)?{}:{obj:e,k:oG(a[o])}},oq=(e,n,t)=>{let{obj:a,k:o}=oU(e,n,Object);if(void 0!==a||1===n.length){a[o]=t;return}let r=n[n.length-1],i=n.slice(0,n.length-1),s=oU(e,i,Object);for(;void 0===s.obj&&i.length;)r=`${i[i.length-1]}.${r}`,s=oU(e,i=i.slice(0,i.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${r}`]&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=t},oH=(e,n)=>{let{obj:t,k:a}=oU(e,n);if(t&&Object.prototype.hasOwnProperty.call(t,a))return t[a]},oK=(e,n,t)=>{for(let a in n)"__proto__"!==a&&"constructor"!==a&&(a in e?oR(e[a])||e[a]instanceof String||oR(n[a])||n[a]instanceof String?t&&(e[a]=n[a]):oK(e[a],n[a],t):e[a]=n[a]);return e};var oY={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let oJ=e=>oR(e)?e.replace(/[&<>"'\/]/g,e=>oY[e]):e,oZ=[" ",",","?","!",";"],oX=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let n=this.regExpMap.get(e);if(void 0!==n)return n;let t=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,t),this.regExpQueue.push(e),t}}(20),oQ=(e,n,t=".")=>{if(!e)return;if(e[n]){if(!Object.prototype.hasOwnProperty.call(e,n))return;return e[n]}let a=n.split(t),o=e;for(let e=0;e<a.length;){let n;if(!o||"object"!=typeof o)return;let r="";for(let i=e;i<a.length;++i)if(i!==e&&(r+=t),r+=a[i],void 0!==(n=o[r])){if(["string","number","boolean"].indexOf(typeof n)>-1&&i<a.length-1)continue;e+=i-e+1;break}o=n}return o},o0=e=>e?.replace("_","-"),o1={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class o2{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||o1,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,t,a){return a&&!this.debug?null:(oR(e[0])&&(e[0]=`${t}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new o2(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new o2(this.logger,e)}}var o3=new o2;class o5{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let t=this.observers[e].get(n)||0;this.observers[e].set(n,t+1)}),this}off(e,n){if(this.observers[e]){if(!n)return void delete this.observers[e];this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,t])=>{for(let a=0;a<t;a++)e(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([t,a])=>{for(let o=0;o<a;o++)t.apply(t,[e,...n])})}}class o4 extends o5{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,t,a={}){let o,r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],t&&(Array.isArray(t)?o.push(...t):oR(t)&&r?o.push(...t.split(r)):o.push(t)));let s=oH(this.data,o);return(!s&&!n&&!t&&e.indexOf(".")>-1&&(e=o[0],n=o[1],t=o.slice(2).join(".")),!s&&i&&oR(t))?oQ(this.data?.[e]?.[n],t,r):s}addResource(e,n,t,a,o={silent:!1}){let r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=[e,n];t&&(i=i.concat(r?t.split(r):t)),e.indexOf(".")>-1&&(i=e.split("."),a=n,n=i[1]),this.addNamespaces(n),oq(this.data,i,a),o.silent||this.emit("added",e,n,t,a)}addResources(e,n,t,a={silent:!1}){for(let a in t)(oR(t[a])||Array.isArray(t[a]))&&this.addResource(e,n,a,t[a],{silent:!0});a.silent||this.emit("added",e,n,t)}addResourceBundle(e,n,t,a,o,r={silent:!1,skipCopy:!1}){let i=[e,n];e.indexOf(".")>-1&&(i=e.split("."),a=t,t=n,n=i[1]),this.addNamespaces(n);let s=oH(this.data,i)||{};r.skipCopy||(t=JSON.parse(JSON.stringify(t))),a?oK(s,t,o):s={...s,...t},oq(this.data,i,s),r.silent||this.emit("added",e,n,t)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return void 0!==this.getResource(e,n)}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(e=>n[e]&&Object.keys(n[e]).length>0)}toJSON(){return this.data}}var o6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,t,a,o){return e.forEach(e=>{n=this.processors[e]?.process(n,t,a,o)??n}),n}};let o8=Symbol("i18next/PATH_KEY");function o7(e,n){let t,a,o,{[o8]:r}=e((a=[],(o=Object.create(null)).get=(e,n)=>(t?.revoke?.(),n===o8)?a:(a.push(n),(t=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return r.join(n?.keySeparator??".")}let o9={},re=e=>!oR(e)&&"boolean"!=typeof e&&"number"!=typeof e;class rn extends o5{constructor(e,n={}){super(),((e,n,t)=>{e.forEach(e=>{n[e]&&(t[e]=n[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=o3.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){let t={...n};if(null==e)return!1;let a=this.resolve(e,t);if(a?.res===void 0)return!1;let o=re(a.res);return!1!==t.returnObjects||!o}extractFromKey(e,n){let t=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===t&&(t=":");let a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS||[],r=t&&e.indexOf(t)>-1,i=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!((e,n,t)=>{n=n||"",t=t||"";let a=oZ.filter(e=>0>n.indexOf(e)&&0>t.indexOf(e));if(0===a.length)return!0;let o=oX.getRegExp(`(${a.map(e=>"?"===e?"\\?":e).join("|")})`),r=!o.test(e);if(!r){let n=e.indexOf(t);n>0&&!o.test(e.substring(0,n))&&(r=!0)}return r})(e,t,a);if(r&&!i){let n=e.match(this.interpolator.nestingRegexp);if(n&&n.length>0)return{key:e,namespaces:oR(o)?[o]:o};let r=e.split(t);(t!==a||t===a&&this.options.ns.indexOf(r[0])>-1)&&(o=r.shift()),e=r.join(a)}return{key:e,namespaces:oR(o)?[o]:o}}translate(e,n,t){let a="object"==typeof n?{...n}:n;if("object"!=typeof a&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof a&&(a={...a}),a||(a={}),null==e)return"";"function"==typeof e&&(e=o7(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],a),l=s[s.length-1],c=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");let p=a.lng||this.language,u=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return u?o?{res:`${l}${c}${i}`,usedKey:i,exactUsedKey:i,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:`${l}${c}${i}`:o?{res:i,usedKey:i,exactUsedKey:i,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:i;let d=this.resolve(e,a),f=d?.res,m=d?.usedKey||i,h=d?.exactUsedKey||i,g=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==a.count&&!oR(a.count),v=rn.hasDefaultValue(a),$=b?this.pluralResolver.getSuffix(p,a.count,a):"",A=a.ordinal&&b?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",k=b&&!a.ordinal&&0===a.count,w=k&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${$}`]||a[`defaultValue${A}`]||a.defaultValue,x=f;y&&!f&&v&&(x=w);let C=re(x),E=Object.prototype.toString.apply(x);if(y&&x&&C&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(E)&&!(oR(g)&&Array.isArray(x))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,x,{...a,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(d.res=e,d.usedParams=this.getUsedParamsDetails(a),d):e}if(r){let e=Array.isArray(x),n=e?[]:{},t=e?h:m;for(let e in x)if(Object.prototype.hasOwnProperty.call(x,e)){let o=`${t}${r}${e}`;v&&!f?n[e]=this.translate(o,{...a,defaultValue:re(w)?w[e]:void 0,...{joinArrays:!1,ns:s}}):n[e]=this.translate(o,{...a,joinArrays:!1,ns:s}),n[e]===o&&(n[e]=x[e])}f=n}}else if(y&&oR(g)&&Array.isArray(f))(f=f.join(g))&&(f=this.extendTranslation(f,e,a,t));else{let n=!1,o=!1;!this.isValidLookup(f)&&v&&(n=!0,f=w),this.isValidLookup(f)||(o=!0,f=i);let s=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,u=v&&w!==f&&this.options.updateMissing;if(o||n||u){if(this.logger.log(u?"updateKey":"missingKey",p,l,i,u?w:f),r){let e=this.resolve(i,{...a,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let t=(e,n,t)=>{let o=v&&t!==f?t:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,u,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,u,a),this.emit("missingKey",e,l,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let n=this.pluralResolver.getSuffixes(e,a);k&&a[`defaultValue${this.options.pluralSeparator}zero`]&&0>n.indexOf(`${this.options.pluralSeparator}zero`)&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{t([e],i+n,a[`defaultValue${n}`]||w)})}):t(e,i,w))}f=this.extendTranslation(f,e,a,d,t),o&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${i}`),(o||n)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${i}`:i,n?f:void 0,a))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(a),d):f}extendTranslation(e,n,t,a,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...t},t.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!t.skipInterpolation){let r;t.interpolation&&this.interpolator.init({...t,...{interpolation:{...this.options.interpolation,...t.interpolation}}});let i=oR(e)&&(t?.interpolation?.skipOnVariables!==void 0?t.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let n=e.match(this.interpolator.nestingRegexp);r=n&&n.length}let s=t.replace&&!oR(t.replace)?t.replace:t;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,t.lng||this.language||a.usedLng,t),i){let n=e.match(this.interpolator.nestingRegexp);r<(n&&n.length)&&(t.nest=!1)}!t.lng&&a&&a.res&&(t.lng=this.language||a.usedLng),!1!==t.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||t.context?this.translate(...e,n):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${n[0]}`),null),t)),t.interpolation&&this.interpolator.reset()}let r=t.postProcess||this.options.postProcess,i=oR(r)?[r]:r;return null!=e&&i?.length&&!1!==t.applyPostProcessor&&(e=o6.handle(i,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(t)},...t}:t,this)),e}resolve(e,n={}){let t,a,o,r,i;return oR(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let s=this.extractFromKey(e,n),l=s.key;a=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let p=void 0!==n.count&&!oR(n.count),u=p&&!n.ordinal&&0===n.count,d=void 0!==n.context&&(oR(n.context)||"number"==typeof n.context)&&""!==n.context,f=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(e=>{this.isValidLookup(t)||(i=e,!o9[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(o9[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${a}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(a=>{let i;if(this.isValidLookup(t))return;r=a;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,a,e,n);else{let e;p&&(e=this.pluralResolver.getSuffix(a,n.count,n));let t=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+t)),d){let a=`${l}${this.options.contextSeparator||"_"}${n.context}`;s.push(a),p&&(n.ordinal&&0===e.indexOf(o)&&s.push(a+e.replace(o,this.options.pluralSeparator)),s.push(a+e),u&&s.push(a+t))}}for(;i=s.pop();)this.isValidLookup(t)||(o=i,t=this.getResource(a,e,i,n))}))})}),{res:t,usedKey:a,exactUsedKey:o,usedLng:r,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,n,t,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,t,a):this.resourceStore.getResource(e,n,t,a)}getUsedParamsDetails(e={}){let n=e.replace&&!oR(e.replace),t=n?e.replace:e;if(n&&void 0!==e.count&&(t.count=e.count),this.options.interpolation.defaultVariables&&(t={...this.options.interpolation.defaultVariables,...t}),!n)for(let e of(t={...t},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete t[e];return t}static hasDefaultValue(e){let n="defaultValue";for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n===t.substring(0,n.length)&&void 0!==e[t])return!0;return!1}}class rt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=o3.create("languageUtils")}getScriptPartFromCode(e){if(!(e=o0(e))||0>e.indexOf("-"))return null;let n=e.split("-");return 2===n.length||(n.pop(),"x"===n[n.length-1].toLowerCase())?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(!(e=o0(e))||0>e.indexOf("-"))return e;let n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(oR(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch(e){}return(n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n)?n:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let n;return e?(e.forEach(e=>{if(n)return;let t=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(t))&&(n=t)}),!n&&this.options.supportedLngs&&e.forEach(e=>{if(n)return;let t=this.getScriptPartFromCode(e);if(this.isSupportedCode(t))return n=t;let a=this.getLanguagePartFromCode(e);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(e=>{if(e===a||!(0>e.indexOf("-")&&0>a.indexOf("-"))&&(e.indexOf("-")>0&&0>a.indexOf("-")&&e.substring(0,e.indexOf("-"))===a||0===e.indexOf(a)&&a.length>1))return e})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}getFallbackCodes(e,n){if(!e)return[];if("function"==typeof e&&(e=e(n)),oR(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let t=e[n];return t||(t=e[this.getScriptPartFromCode(n)]),t||(t=e[this.formatLanguageCode(n)]),t||(t=e[this.getLanguagePartFromCode(n)]),t||(t=e.default),t||[]}toResolveHierarchy(e,n){let t=this.getFallbackCodes((!1===n?[]:n)||this.options.fallbackLng||[],e),a=[],o=e=>{e&&(this.isSupportedCode(e)?a.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return oR(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):oR(e)&&o(this.formatLanguageCode(e)),t.forEach(e=>{0>a.indexOf(e)&&o(this.formatLanguageCode(e))}),a}}let ra={zero:0,one:1,two:2,few:3,many:4,other:5},ro={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class rr{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=o3.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){let t,a=o0("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:a,type:o});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];try{t=new Intl.PluralRules(a,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ro;if(!e.match(/-|_/))return ro;let a=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(a,n)}return this.pluralRulesCache[r]=t,t}needsPlural(e,n={}){let t=this.getRule(e,n);return t||(t=this.getRule("dev",n)),t?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,t={}){return this.getSuffixes(e,t).map(e=>`${n}${e}`)}getSuffixes(e,n={}){let t=this.getRule(e,n);return(t||(t=this.getRule("dev",n)),t)?t.resolvedOptions().pluralCategories.sort((e,n)=>ra[e]-ra[n]).map(e=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,n,t={}){let a=this.getRule(e,t);return a?`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,t))}}let ri=(e,n,t,a=".",o=!0)=>{let r,i=void 0!==(r=oH(e,t))?r:oH(n,t);return!i&&o&&oR(t)&&void 0===(i=oQ(e,t,a))&&(i=oQ(n,t,a)),i};class rs{constructor(e={}){this.logger=o3.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:n,escapeValue:t,useRawValueToEscape:a,prefix:o,prefixEscaped:r,suffix:i,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:u,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==n?n:oJ,this.escapeValue=void 0===t||t,this.useRawValueToEscape=void 0!==a&&a,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):r||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):d||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):m||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,n)=>e?.source===n?(e.lastIndex=0,e):RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,t,a){let o,r,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=ri(n,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,t,{...a,...n,interpolationkey:e}):o}let o=e.split(this.formatSeparator),r=o.shift().trim(),i=o.join(this.formatSeparator).trim();return this.format(ri(n,s,r,this.options.keySeparator,this.options.ignoreJSONStructure),i,t,{...a,...n,interpolationkey:r})};this.resetRegExp();let c=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(n=>{for(i=0;o=n.regex.exec(e);){let t=o[1].trim();if(void 0===(r=l(t)))if("function"==typeof c){let n=c(e,o,a);r=oR(n)?n:""}else if(a&&Object.prototype.hasOwnProperty.call(a,t))r="";else if(p){r=o[0];continue}else this.logger.warn(`missed to pass in variable ${t} for interpolating ${e}`),r="";else oR(r)||this.useRawValueToEscape||(r=oL(r));let s=n.safeValue(r);if(e=e.replace(o[0],s),p?(n.regex.lastIndex+=r.length,n.regex.lastIndex-=o[0].length):n.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,n,t={}){let a,o,r,i=(e,n)=>{let t=this.nestingOptionsSeparator;if(0>e.indexOf(t))return e;let a=e.split(RegExp(`${t}[ ]*{`)),o=`{${a[1]}`;e=a[0];let i=(o=this.interpolate(o,r)).match(/'/g),s=o.match(/"/g);((i?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),n&&(r={...n,...r})}catch(n){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,n),`${e}${t}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let s=[];(r=(r={...t}).replace&&!oR(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;let l=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(-1!==l&&(s=a[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,l)),(o=n(i.call(this,a[1].trim(),r),r))&&a[0]===e&&!oR(o))return o;oR(o)||(o=oL(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,n)=>this.format(e,n,t.lng,{...t,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}let rl=e=>{let n={};return(t,a,o)=>{let r=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(r={...r,[o.interpolationkey]:void 0});let i=a+JSON.stringify(r),s=n[i];return s||(s=e(o0(a),o),n[i]=s),s(t)}},rc=e=>(n,t,a)=>e(o0(t),a)(n);class rp{constructor(e={}){this.logger=o3.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";let t=n.cacheInBuiltFormats?rl:rc;this.formats={number:t((e,n)=>{let t=new Intl.NumberFormat(e,{...n});return e=>t.format(e)}),currency:t((e,n)=>{let t=new Intl.NumberFormat(e,{...n,style:"currency"});return e=>t.format(e)}),datetime:t((e,n)=>{let t=new Intl.DateTimeFormat(e,{...n});return e=>t.format(e)}),relativetime:t((e,n)=>{let t=new Intl.RelativeTimeFormat(e,{...n});return e=>t.format(e,n.range||"day")}),list:t((e,n)=>{let t=new Intl.ListFormat(e,{...n});return e=>t.format(e)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=rl(n)}format(e,n,t,a={}){let o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,n)=>{let{formatName:o,formatOptions:r}=(e=>{let n=e.toLowerCase().trim(),t={};if(e.indexOf("(")>-1){let a=e.split("(");n=a[0].toLowerCase().trim();let o=a[1].substring(0,a[1].length-1);"currency"===n&&0>o.indexOf(":")?t.currency||(t.currency=o.trim()):"relativetime"===n&&0>o.indexOf(":")?t.range||(t.range=o.trim()):o.split(";").forEach(e=>{if(e){let[n,...a]=e.split(":"),o=a.join(":").trim().replace(/^'+|'+$/g,""),r=n.trim();t[r]||(t[r]=o),"false"===o&&(t[r]=!1),"true"===o&&(t[r]=!0),isNaN(o)||(t[r]=parseInt(o,10))}})}return{formatName:n,formatOptions:t}})(n);if(this.formats[o]){let n=e;try{let i=a?.formatParams?.[a.interpolationkey]||{},s=i.locale||i.lng||a.locale||a.lng||t;n=this.formats[o](e,s,{...r,...a,...i})}catch(e){this.logger.warn(e)}return n}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class ru extends o5{constructor(e,n,t,a={}){super(),this.backend=e,this.store=n,this.services=t,this.languageUtils=t.languageUtils,this.options=a,this.logger=o3.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(t,a.backend,a)}queueLoad(e,n,t,a){let o={},r={},i={},s={};return e.forEach(e=>{let a=!0;n.forEach(n=>{let i=`${e}|${n}`;!t.reload&&this.store.hasResourceBundle(e,n)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===r[i]&&(r[i]=!0):(this.state[i]=1,a=!1,void 0===r[i]&&(r[i]=!0),void 0===o[i]&&(o[i]=!0),void 0===s[n]&&(s[n]=!0)))}),a||(i[e]=!0)}),(Object.keys(o).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(r),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(s)}}loaded(e,n,t){let a=e.split("|"),o=a[0],r=a[1];n&&this.emit("failedLoading",o,r,n),!n&&t&&this.store.addResourceBundle(o,r,t,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&t&&(this.state[e]=0);let i={};this.queue.forEach(t=>{((e,n,t,a)=>{let{obj:o,k:r}=oU(e,n,Object);o[r]=o[r]||[],o[r].push(t)})(t.loaded,[o],r),void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--),n&&t.errors.push(n),0!==t.pendingCount||t.done||(Object.keys(t.loaded).forEach(e=>{i[e]||(i[e]={});let n=t.loaded[e];n.length&&n.forEach(n=>{void 0===i[e][n]&&(i[e][n]=!0)})}),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,n,t,a=0,o=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:n,fcName:t,tried:a,wait:o,callback:r});this.readingCalls++;let i=(i,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&s&&a<this.maxRetries?setTimeout(()=>{this.read.call(this,e,n,t,a+1,2*o,r)},o):r(i,s)},s=this.backend[t].bind(this.backend);if(2===s.length){try{let t=s(e,n);t&&"function"==typeof t.then?t.then(e=>i(null,e)).catch(i):i(null,t)}catch(e){i(e)}return}return s(e,n,i)}prepareLoading(e,n,t={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();oR(e)&&(e=this.languageUtils.toResolveHierarchy(e)),oR(n)&&(n=[n]);let o=this.queueLoad(e,n,t,a);if(!o.toLoad.length)return o.pending.length||a(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,n,t){this.prepareLoading(e,n,{},t)}reload(e,n,t){this.prepareLoading(e,n,{reload:!0},t)}loadOne(e,n=""){let t=e.split("|"),a=t[0],o=t[1];this.read(a,o,"read",void 0,void 0,(t,r)=>{t&&this.logger.warn(`${n}loading namespace ${o} for language ${a} failed`,t),!t&&r&&this.logger.log(`${n}loaded namespace ${o} for language ${a}`,r),this.loaded(e,t,r)})}saveMissing(e,n,t,a,o,r={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n))return void this.logger.warn(`did not save key "${t}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=t&&""!==t){if(this.backend?.create){let s={...r,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,n,t,a,s):l(e,n,t,a))&&"function"==typeof o.then?o.then(e=>i(null,e)).catch(i):i(null,o)}catch(e){i(e)}else l(e,n,t,a,i,s)}e&&e[0]&&this.store.addResource(e[0],n,t,a)}}}let rd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if("object"==typeof e[1]&&(n=e[1]),oR(e[1])&&(n.defaultValue=e[1]),oR(e[2])&&(n.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let t=e[3]||e[2];Object.keys(t).forEach(e=>{n[e]=t[e]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rf=e=>(oR(e.ns)&&(e.ns=[e.ns]),oR(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oR(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),rm=()=>{};class rh extends o5{constructor(e={},n){if(super(),this.options=rf(e),this.services={},this.logger=o3,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{"function"==typeof e[n]&&(e[n]=e[n].bind(e))})})(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),null==e.defaultNS&&e.ns&&(oR(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let t=rd();this.options={...t,...this.options,...rf(e)},this.options.interpolation={...t.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?o3.init(a(this.modules.logger),this.options):o3.init(null,this.options),e=this.modules.formatter?this.modules.formatter:rp;let n=new rt(this.options);this.store=new o4(this.options.resources,this.options);let o=this.services;o.logger=o3,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new rr(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==t.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===t.interpolation.format)&&(o.formatter=a(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new rs(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new ru(a(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...n)=>{this.emit(e,...n)}),this.modules.languageDetector&&(o.languageDetector=a(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=a(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new rn(this.services,this.options),this.translator.on("*",(e,...n)=>{this.emit(e,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=rm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...n)=>this.store[e](...n)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...n)=>(this.store[e](...n),this)});let o=oF(),r=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),o}loadResources(e,n=rm){let t=n,a=oR(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return t();let e=[],n=n=>{n&&"cimode"!==n&&this.services.languageUtils.toResolveHierarchy(n).forEach(n=>{"cimode"!==n&&0>e.indexOf(n)&&e.push(n)})};a?n(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>n(e)),this.options.preload?.forEach?.(e=>n(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,n,t){let a=oF();return"function"==typeof e&&(t=e,e=void 0),"function"==typeof n&&(t=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),t||(t=rm),this.services.backendConnector.reload(e,n,e=>{a.resolve(),t(e)}),a}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&o6.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;let t=oF();this.emit("languageChanging",e);let a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,r)=>{r?this.isLanguageChangingTo===e&&(a(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,t.resolve((...e)=>this.t(...e)),n&&n(o,(...e)=>this.t(...e))},r=n=>{e||n||!this.services.languageDetector||(n=[]);let t=oR(n)?n:n&&n[0],r=this.store.hasLanguageSomeTranslations(t)?t:this.services.languageUtils.getBestMatchFromCodes(oR(n)?[n]:n);r&&(this.language||a(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,e=>{o(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),t}getFixedT(e,n,t){let a=(e,n,...o)=>{let r,i;(r="object"!=typeof n?this.options.overloadTranslationOptionHandler([e,n].concat(o)):{...n}).lng=r.lng||a.lng,r.lngs=r.lngs||a.lngs,r.ns=r.ns||a.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||t||a.keyPrefix);let s=this.options.keySeparator||".";return r.keyPrefix&&Array.isArray(e)?i=e.map(e=>("function"==typeof e&&(e=o7(e,{...this.options,...n})),`${r.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=o7(e,{...this.options,...n})),i=r.keyPrefix?`${r.keyPrefix}${s}${e}`:e),this.t(i,r)};return oR(e)?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=t,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let t=n.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===t.toLowerCase())return!0;let r=(e,n)=>{let t=this.services.backendConnector.state[`${e}|${n}`];return -1===t||0===t||2===t};if(n.precheck){let e=n.precheck(this,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(t,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(t,e)&&(!a||r(o,e)))}loadNamespaces(e,n){let t=oF();return this.options.ns?(oR(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{t.resolve(),n&&n(e)}),t):(n&&n(),Promise.resolve())}loadLanguages(e,n){let t=oF();oR(e)&&(e=[e]);let a=this.options.preload||[],o=e.filter(e=>0>a.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{t.resolve(),n&&n(e)}),t):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let n=new Intl.Locale(e);if(n&&n.getTextInfo){let e=n.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let n=this.services?.languageUtils||new rt(rd());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){return new rh(e,n)}cloneInstance(e={},n=rm){let t=e.forkResourceStore;t&&delete e.forkResourceStore;let a={...this.options,...e,isClone:!0},o=new rh(a);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},t&&(o.store=new o4(Object.keys(this.store.data).reduce((e,n)=>(e[n]={...this.store.data[n]},e[n]=Object.keys(e[n]).reduce((t,a)=>(t[a]={...e[n][a]},t),e[n]),e),{}),a),o.services.resourceStore=o.store),o.translator=new rn(o.services,a),o.translator.on("*",(e,...n)=>{o.emit(e,...n)}),o.init(a,n),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let rg=rh.createInstance();rg.createInstance=rh.createInstance,rg.createInstance,rg.dir,rg.init,rg.loadResources,rg.reloadResources,rg.use,rg.changeLanguage,rg.getFixedT,rg.t,rg.exists,rg.setDefaultNamespace,rg.hasLoadedNamespace,rg.loadNamespaces,rg.loadLanguages;let ry=rg.default||rg;function rb(e,n,t,a){return ry.t(n,{ns:e,defaultValue:t,...a})}function r_(e,n,t){return oj[e]?rb("core",e,n??oj[e],t):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}ry.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let rv="import-map-override:",r$="import-map-overrides-disabled",rA="import-map-overrides:change",rk=!1,rw=null;async function rx(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),n=[];for(let t=0;t<e.length;t++){let a=e[t];try{if(a.src){let e=await fetch(a.src);n.push(await e.json())}else a.textContent&&n.push(JSON.parse(a.textContent))}catch(e){console.warn(`[import-maps] Failed to parse import map from script tag at index ${t}`,e)}}return rC(n)}function rC(e){let n={imports:{}};for(let t of e)t?.imports&&Object.assign(n.imports,t.imports);return n}function rE(){let e={};try{let n=rO();for(let t=0;t<localStorage.length;t++){let a=localStorage.key(t);if(a?.startsWith(rv)){let t=a.slice(rv.length);if(!n.includes(t)){let n=localStorage.getItem(a);n&&(e[t]=n)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function rS(){let e=await rx();return rk?rC([e,rw??rE()]):e}async function rD(){return rx()}async function rM(){return rk?rC([await rx(),rE()]):rx()}function rz(e){if(!rk)return{imports:{}};if(e){let e={};for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(rv)){let n=localStorage.getItem(t);n&&(e[t.slice(rv.length)]=n)}}return{imports:e}}return rE()}function rO(){if(!rk)return[];try{let e=localStorage.getItem(r$);if(e){let n=JSON.parse(e);if(Array.isArray(n))return n}}catch{}return[]}function rP(e){return!!rk&&rO().includes(e)}function rT(e,n){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(rv+e,n),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function rB(e){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(rv+e);let n=rO().filter(n=>n!==e);n.length>0?localStorage.setItem(r$,JSON.stringify(n)):localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function rI(){if(!rk)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(rv)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function rN(e){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let n=rO().filter(n=>n!==e);n.length>0?localStorage.setItem(r$,JSON.stringify(n)):localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let rj=!1;function rR(){!rj&&(rj=!0,(rk="development"===window.spaEnv)&&(rw=rE()))}function rF(e){return e.replace(/[\/\-@]/g,"_")}async function rL(e,n="./start",a){var o;let r,i=!a?.maxLoadingTime||a.maxLoadingTime<=0?6e5:a.maxLoadingTime;await Promise.race([rW(e,a?.importMap),new Promise((n,t)=>{r=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)})]),r&&clearTimeout(r);let s=rF(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 rW(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=rF(e);if(!window[t]){let t=n??await rG();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 a=t.imports[e];a.startsWith("./")&&(a=window.spaBase+a.substring(1));let o=e in rz().imports;try{return await new Promise((e,n)=>{!function(e,n,t){let a=document.head.querySelector(`script[src="${e}"]`),o=window[rV];if(o||(o=window[rV]=new Set([])),a)if(o.has(e)){let e,o,r;r=()=>{e&&a.removeEventListener("load",e),o&&a.removeEventListener("error",o)},e=()=>{r(),n(null)},o=e=>{r(),t(e.message)},a.addEventListener("load",e),a.addEventListener("error",o)}else console.warn(`Script at ${e} already loaded. Not loading it again.`),n(null);else{let a,r,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),a&&s.removeEventListener("load",a),r&&s.removeEventListener("error",r)},a=()=>{i(),n(null)},r=n=>{i();let a=`Failed to load script from ${e}`;console.error(a,n),t(n.message??a)},s.addEventListener("load",a),s.addEventListener("error",r),document.head.appendChild(s)}}(a,e,n)})}catch(e){return o&&D({kind:"error",title:r_("scriptLoadingFailed","Error: Script failed to load"),description:r_("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:a}),actionButtonLabel:r_("resetOverrides","Reset overrides"),onActionButtonClick(){rI(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function rG(){return rS()}let rV=Symbol("__openmrs_script_loading");function rU(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 rq(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&rU(n))}let rH="openmrs-routes:",rK="openmrs-routes:change",rY=!1,rJ=null;async function rZ(){let e=document.querySelectorAll("script[type='openmrs-routes']"),n=[];for(let t=0;t<e.length;t++){let a=e[t];try{let e;if(a.src){let n=await fetch(a.src);e=await n.json()}else a.textContent&&(e=JSON.parse(a.textContent));e&&rq(e)&&n.push(e)}catch(e){console.warn(`[route-maps] Failed to parse routes from script tag at index ${t}`,e)}}return rX(n)}function rX(e){let n={};for(let t of e)t&&"object"==typeof t&&Object.assign(n,t);return n}async function rQ(){let e={};try{let n=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(rH)){let e=localStorage.getItem(t);e&&n.push({moduleName:t.slice(rH.length),raw:e})}}for(let t of(await Promise.allSettled(n.map(async({moduleName:e,raw:n})=>{let t=JSON.parse(n);if(rU(t))return{moduleName:e,routes:t};if("string"==typeof t&&t.startsWith("http")){let n=await fetch(t),a=await n.json();if(rU(a))return{moduleName:e,routes:a};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 r0(){let e=await rZ();return rY?rX([e,rJ??await rQ()]):e}async function r1(){return rZ()}async function r2(){return rY?rX([await rZ(),await rQ()]):rZ()}function r3(){if(!rY)return{};let e={};try{for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(rH)){let n=localStorage.getItem(t);n&&(e[t.slice(rH.length)]=n)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function r5(e,n){if(!rY)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof n)if(n.startsWith("http"))localStorage.setItem(rH+e,JSON.stringify(n));else{let t=JSON.parse(n);if(!rU(t))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n);localStorage.setItem(rH+e,JSON.stringify(t))}else if(n instanceof URL)localStorage.setItem(rH+e,JSON.stringify(n.toString()));else{if(!rU(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(rH+e,JSON.stringify(n))}window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function r4(e){if(!rY)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(rH+e),window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function r6(){if(!rY)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(rH)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let r8=null;function r7(){return r8||(r8=(rY="development"===window.spaEnv)?rQ().then(e=>{rJ=e}):Promise.resolve())}let r9=`${oh}/attachment`;function ie(e,n){return o_(`${r9}/${e}`,{signal:n.signal})}function it(e,n,t){return o_(`${r9}?patient=${e}&includeEncounterless=${n}`,{signal:t.signal})}async function ia(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)),o_(`${r9}`,{method:"POST",body:t})}function io(e,n){return o_(`${r9}/${e}`,{method:"DELETE",signal:n.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ir(e,n){return new Promise(function(t){var a=new MessageChannel;a.port1.onmessage=function(e){t(e.data)},e.postMessage(n,[a.port2])})}function ii(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function is(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var il=function(){var e=this;this.promise=new Promise(function(n,t){e.resolve=n,e.reject=t})};function ic(e,n){var t=location.href;return new URL(e,t).href===new URL(n,t).href}var ip=function(e,n){this.type=e,Object.assign(this,n)};function iu(e,n,t){return t?n?n(e):e:(e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e)}function id(){}var im={type:"SKIP_WAITING"};function ih(e,n){if(!n)return e&&e.then?e.then(id):Promise.resolve()}var ig=function(e){function n(n,t){var a,o;return void 0===t&&(t={}),(a=e.call(this)||this).nn={},a.tn=0,a.rn=new il,a.en=new il,a.on=new il,a.un=0,a.an=new Set,a.cn=function(){var e=a.fn,n=e.installing;a.tn>0||!ic(n.scriptURL,a.sn.toString())||performance.now()>a.un+6e4?(a.vn=n,e.removeEventListener("updatefound",a.cn)):(a.hn=n,a.an.add(n),a.rn.resolve(n)),++a.tn,n.addEventListener("statechange",a.ln)},a.ln=function(e){var n=a.fn,t=e.target,o=t.state,r=t===a.vn,i={sw:t,isExternal:r,originalEvent:e};!r&&a.mn&&(i.isUpdate=!0),a.dispatchEvent(new ip(o,i)),"installed"===o?a.wn=self.setTimeout(function(){"installed"===o&&n.waiting===t&&a.dispatchEvent(new ip("waiting",i))},200):"activating"===o&&(clearTimeout(a.wn),r||a.en.resolve(t))},a.dn=function(e){var n=a.hn,t=n!==navigator.serviceWorker.controller;a.dispatchEvent(new ip("controlling",{isExternal:t,originalEvent:e,sw:n,isUpdate:a.mn})),t||a.on.resolve(n)},o=function(e){var n=e.data,t=e.ports,o=e.source;return iu(a.getSW(),function(){a.an.has(o)&&a.dispatchEvent(new ip("message",{data:n,originalEvent:e,ports:t,sw:o}))})},a.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)}},a.sn=n,a.nn=t,navigator.serviceWorker.addEventListener("message",a.gn),a}n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var t,a,o=n.prototype;return o.register=function(e){var n=(void 0===e?{}:e).immediate,t=void 0!==n&&n;try{var a,o,r,i=this;return a=function(){if(!t&&"complete"!==document.readyState)return ih(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return i.mn=!!navigator.serviceWorker.controller,i.yn=i.pn(),iu(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&&ic(n.scriptURL,i.sn.toString())&&(i.hn=n,Promise.resolve().then(function(){i.dispatchEvent(new ip("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})},(r=a())&&r.then?r.then(o):o(r)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?ih(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 iu(this.getSW(),function(n){return ir(n,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ir(this.fn.waiting,im)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&ic(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 iu(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}}],ii(n.prototype,t),a&&ii(n,a),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 is(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)?is(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 iy(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 ig(e,n);return u=t.register().then(()=>t.controlling.then(()=>t))}function ib(){return u??Promise.resolve(void 0)}let i_="x-omrs-offline-response-body",iv="x-omrs-offline-response-status",i$="x-omrs-offline-caching-strategy";async function iA(e){let n=await ib();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 ik(){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 iw(){return!window.indexedDB}async function ix(){return new Promise(e=>{let n=indexedDB.open("test");n.onerror=()=>e(!0),n.onsuccess=()=>e(!1)})}async function iC(){return await ix()||await iw()||await ik()}let iE="openmrs3:offline-mode",iS="unavailable";function iD(){return{current:iS,notAvailable:"unavailable"===iS,active:"on"===iS}}function iM(e){"unavailable"!==iS&&"unavailable"!==e&&(localStorage.setItem(iE,"on"===e?"active":"disabled"),iS=e)}async function iz(){await iC()||(iS="active"===localStorage.getItem(iE)?"on":"off"),navigator.onLine}let iO="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iP=Object.keys,iT=Array.isArray;function iB(e,n){return"object"!=typeof n||iP(n).forEach(function(t){e[t]=n[t]}),e}"u"<typeof Promise||iO.Promise||(iO.Promise=Promise);let iI=Object.getPrototypeOf,iN={}.hasOwnProperty;function ij(e,n){return iN.call(e,n)}function iR(e,n){"function"==typeof n&&(n=n(iI(e))),("u"<typeof Reflect?iP:Reflect.ownKeys)(n).forEach(t=>{iL(e,t,n[t])})}let iF=Object.defineProperty;function iL(e,n,t,a){iF(e,n,iB(t&&ij(t,"get")&&"function"==typeof t.get?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},a))}function iW(e){return{from:function(n){return e.prototype=Object.create(n.prototype),iL(e.prototype,"constructor",e),{extend:iR.bind(null,e.prototype)}}}}let iG=Object.getOwnPropertyDescriptor;function iV(e,n){let t;return iG(e,n)||(t=iI(e))&&iV(t,n)}let iU=[].slice;function iq(e,n,t){return iU.call(e,n,t)}function iH(e,n){return n(e)}function iK(e){if(!e)throw Error("Assertion Failed")}function iY(e){iO.setImmediate?setImmediate(e):setTimeout(e,0)}function iJ(e,n){return e.reduce((e,t,a)=>{var o=n(t,a);return o&&(e[o[0]]=o[1]),e},{})}function iZ(e,n){if(ij(e,n))return e[n];if(!n)return e;if("string"!=typeof n){for(var t=[],a=0,o=n.length;a<o;++a){var r=iZ(e,n[a]);t.push(r)}return t}var i=n.indexOf(".");if(-1!==i){var s=e[n.substr(0,i)];return void 0===s?void 0:iZ(s,n.substr(i+1))}}function iX(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 a=0,o=n.length;a<o;++a)iX(e,n[a],t[a])}else{var r=n.indexOf(".");if(-1!==r){var i=n.substr(0,r),s=n.substr(r+1);if(""===s)void 0===t?iT(e)&&!isNaN(parseInt(i))?e.splice(i,1):delete e[i]:e[i]=t;else{var l=e[i];l&&ij(e,i)||(l=e[i]={}),iX(l,s,t)}}else void 0===t?iT(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function iQ(e){var n={};for(var t in e)ij(e,t)&&(n[t]=e[t]);return n}let i0=[].concat;function i1(e){return i0.apply([],e)}let i2="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(i1([8,16,32,64].map(e=>["Int","Uint","Float"].map(n=>n+e+"Array")))).filter(e=>iO[e]),i3=i2.map(e=>iO[e]);iJ(i2,e=>[e,!0]);let i5=null;function i4(e){i5="u">typeof WeakMap&&new WeakMap;let n=function e(n){if(!n||"object"!=typeof n)return n;let t=i5&&i5.get(n);if(t)return t;if(iT(n)){t=[],i5&&i5.set(n,t);for(var a=0,o=n.length;a<o;++a)t.push(e(n[a]))}else if(i3.indexOf(n.constructor)>=0)t=n;else{let a=iI(n);for(var r in t=a===Object.prototype?{}:Object.create(a),i5&&i5.set(n,t),n)ij(n,r)&&(t[r]=e(n[r]))}return t}(e);return i5=null,n}let{toString:i6}={};function i8(e){return i6.call(e).slice(8,-1)}let i7="u">typeof Symbol?Symbol.iterator:"@@iterator",i9="symbol"==typeof i7?function(e){var n;return null!=e&&(n=e[i7])&&n.apply(e)}:function(){return null},se={};function sn(e){var n,t,a,o;if(1==arguments.length){if(iT(e))return e.slice();if(this===se&&"string"==typeof e)return[e];if(o=i9(e)){for(t=[];!(a=o.next()).done;)t.push(a.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 st="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var sa="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),so=()=>!0;let sr=!Error("").stack;function si(){if(sr)try{throw si.arguments,Error()}catch(e){return e}return Error()}function ss(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(so).map(e=>"\n"+e).join("")):""}var sl=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(sl),sp={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 su(e,n){this._e=si(),this.name=e,this.message=n}function sd(e,n){return e+". Errors: "+Object.keys(n).map(e=>n[e].toString()).filter((e,n,t)=>t.indexOf(e)===n).join("\n")}function sf(e,n,t,a){this._e=si(),this.failures=n,this.failedKeys=a,this.successCount=t,this.message=sd(e,n)}function sm(e,n){this._e=si(),this.name="BulkError",this.failures=Object.keys(n).map(e=>n[e]),this.failuresByPos=n,this.message=sd(e,n)}iW(su).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ss(this._e,2))}},toString:function(){return this.name+": "+this.message}}),iW(sf).from(su),iW(sm).from(su);var sh=sc.reduce((e,n)=>(e[n]=n+"Error",e),{}),sg=sc.reduce((e,n)=>{var t=n+"Error";function a(e,a){this._e=si(),this.name=t,e?"string"==typeof e?(this.message=`${e}${a?"\n "+a:""}`,this.inner=a||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=sp[n]||t,this.inner=null)}return iW(a).from(su),e[n]=a,e},{});sg.Syntax=SyntaxError,sg.Type=TypeError,sg.Range=RangeError;var sy=sl.reduce((e,n)=>(e[n+"Error"]=sg[n],e),{}),sb=sc.reduce((e,n)=>(-1===["Syntax","Type","Range"].indexOf(n)&&(e[n+"Error"]=sg[n]),e),{});function s_(){}function sv(e){return e}function s$(e,n){return null==e||e===sv?n:function(t){return n(e(t))}}function sA(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function sk(e,n){return e===s_?n:function(){var t=e.apply(this,arguments);void 0!==t&&(arguments[0]=t);var a=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var r=n.apply(this,arguments);return a&&(this.onsuccess=this.onsuccess?sA(a,this.onsuccess):a),o&&(this.onerror=this.onerror?sA(o,this.onerror):o),void 0!==r?r:t}}function sw(e,n){return e===s_?n:function(){e.apply(this,arguments);var t=this.onsuccess,a=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?sA(t,this.onsuccess):t),a&&(this.onerror=this.onerror?sA(a,this.onerror):a)}}function sx(e,n){return e===s_?n:function(t){var a=e.apply(this,arguments);iB(t,a);var o=this.onsuccess,r=this.onerror;this.onsuccess=null,this.onerror=null;var i=n.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?sA(o,this.onsuccess):o),r&&(this.onerror=this.onerror?sA(r,this.onerror):r),void 0===a?void 0===i?void 0:i:iB(a,i)}}function sC(e,n){return e===s_?n:function(){return!1!==n.apply(this,arguments)&&e.apply(this,arguments)}}function sE(e,n){return e===s_?n:function(){var t=e.apply(this,arguments);if(t&&"function"==typeof t.then){for(var a=this,o=arguments.length,r=Array(o);o--;)r[o]=arguments[o];return t.then(function(){return n.apply(a,r)})}return n.apply(this,arguments)}}sb.ModifyError=sf,sb.DexieError=su,sb.BulkError=sm;var sS={};let[sD,sM,sz]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iI(e),e];let n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,iI(n),e]})(),sO=sM&&sM.then,sP=sD&&sD.constructor,sT=!!sz;var sB=!1,sI=sz?()=>{sz.then(s3)}:iO.setImmediate?setImmediate.bind(null,s3):iO.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{s3(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(s3,0)},sN=function(e,n){sq.push([e,n]),sR&&(sI(),sR=!1)},sj=!0,sR=!0,sF=[],sL=[],sW=null,sG=sv,sV={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ly,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{ly(e[0],e[1])}catch(e){}})}},sU=sV,sq=[],sH=0,sK=[];function sY(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=s_,this._lib=!1;var n=this._PSD=sU;if(sa&&(this._stackHolder=si(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==sS)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&sX(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 a=n._lib&&s5();t&&"function"==typeof t.then?e(n,(e,n)=>{t instanceof sY?t._then(e,n):t.then(e,n)}):(n._state=!0,n._value=t,sQ(n)),a&&s4()}},sX.bind(null,n))}catch(e){sX(n,e)}}(this,e)}let sJ={get:function(){var e=sU,n=la;function t(t,a){var o=!e.global&&(e!==sU||n!==la);let r=o&&!ls();var i=new sY((n,i)=>{s0(this,new sZ(lm(t,e,o,r),lm(a,e,o,r),n,i,e))});return sa&&s2(i,this),i}return t.prototype=sS,t},set:function(e){iL(this,"then",e&&e.prototype===sS?sJ:{get:function(){return e},set:sJ.set})}};function sZ(e,n,t,a,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=a,this.psd=o}function sX(e,n){if(sL.push(n),null===e._state){var t=e._lib&&s5();n=sG(n),e._state=!1,e._value=n,sa&&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,iL(n,"stack",{get:()=>sB?t&&(t.get?t.get.apply(n):t.value):e.stack})}),sF.some(n=>n._value===e._value)||sF.push(e),sQ(e),t&&s4()}}function sQ(e){var n=e._listeners;e._listeners=[];for(var t=0,a=n.length;t<a;++t)s0(e,n[t]);var o=e._PSD;--o.ref||o.finalize(),0===sH&&(++sH,sN(()=>{0==--sH&&s6()},[]))}function s0(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,++sH,sN(s1,[t,e,n])}else e._listeners.push(n)}function s1(e,n,t){try{sW=n;var a,o=n._value;n._state?a=e(o):(sL.length&&(sL=[]),a=e(o),-1===sL.indexOf(o)&&function(e){for(var n=sF.length;n;)if(sF[--n]._value===e._value)return void sF.splice(n,1)}(n)),t.resolve(a)}catch(e){t.reject(e)}finally{sW=null,0==--sH&&s6(),--t.psd.ref||t.psd.finalize()}}function s2(e,n){var t=n?n._numPrev+1:0;t<100&&(e._prev=n,e._numPrev=t)}function s3(){s5()&&s4()}function s5(){var e=sj;return sj=!1,sR=!1,e}function s4(){var e,n,t;do for(;sq.length>0;)for(e=sq,sq=[],t=e.length,n=0;n<t;++n){var a=e[n];a[0].apply(null,a[1])}while(sq.length>0);sj=!0,sR=!0}function s6(){var e=sF;sF=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var n=sK.slice(0),t=n.length;t;)n[--t]()}function s8(e){return new sY(sS,!1,e)}function s7(e,n){var t=sU;return function(){var a=s5(),o=sU;try{return lu(t,!0),e.apply(this,arguments)}catch(e){n&&n(e)}finally{lu(o,!1),a&&s4()}}}iR(sY.prototype,{then:sJ,_then:function(e,n){s0(this,new sZ(null,null,e,n,sU))},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):s8(e)):this.then(null,e=>e&&e.name===n?t(e):s8(e))},finally:function(e){return this.then(n=>(e(),n),n=>(e(),s8(n)))},stack:{get:function(){if(this._stack)return this._stack;try{sB=!0;var e=(function e(n,t,a){if(t.length===a)return t;var o="";if(!1===n._state){var r,i,s=n._value;null!=s?(r=s.name||"Error",i=s.message||s,o=ss(s,0)):(r=s,i=""),t.push(r+(i?": "+i:"")+o)}return sa&&((o=ss(n._stackHolder,2))&&-1===t.indexOf(o)&&t.push(o),n._prev&&e(n._prev,t,a)),t})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{sB=!1}}},timeout:function(e,n){return e<1/0?new sY((t,a)=>{var o=setTimeout(()=>a(new sg.Timeout(n)),e);this.then(t,a).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iL(sY.prototype,Symbol.toStringTag,"Dexie.Promise"),sV.env=ld(),iR(sY,{all:function(){var e=sn.apply(null,arguments).map(ll);return new sY(function(n,t){0===e.length&&n([]);var a=e.length;e.forEach((o,r)=>sY.resolve(o).then(t=>{e[r]=t,--a||n(e)},t))})},resolve:e=>{if(e instanceof sY)return e;if(e&&"function"==typeof e.then)return new sY((n,t)=>{e.then(n,t)});var n=new sY(sS,!0,e);return s2(n,sW),n},reject:s8,race:function(){var e=sn.apply(null,arguments).map(ll);return new sY((n,t)=>{e.map(e=>sY.resolve(e).then(n,t))})},PSD:{get:()=>sU,set:e=>sU=e},totalEchoes:{get:()=>la},newPSD:lr,usePSD:lf,scheduler:{get:()=>sN,set:e=>{sN=e}},rejectionMapper:{get:()=>sG,set:e=>{sG=e}},follow:(e,n)=>new sY((t,a)=>lr((n,t)=>{var a=sU;a.unhandleds=[],a.onunhandled=t,a.finalize=sA(function(){var e;e=()=>{0===this.unhandleds.length?n():t(this.unhandleds[0])},sK.push(function n(){e(),sK.splice(sK.indexOf(n),1)}),++sH,sN(()=>{0==--sH&&s6()},[])},a.finalize),e()},n,t,a))}),sP&&(sP.allSettled&&iL(sY,"allSettled",function(){let e=sn.apply(null,arguments).map(ll);return new sY(n=>{0===e.length&&n([]);let t=e.length,a=Array(t);e.forEach((e,o)=>sY.resolve(e).then(e=>a[o]={status:"fulfilled",value:e},e=>a[o]={status:"rejected",reason:e}).then(()=>--t||n(a)))})}),sP.any&&"u">typeof AggregateError&&iL(sY,"any",function(){let e=sn.apply(null,arguments).map(ll);return new sY((n,t)=>{0===e.length&&t(AggregateError([]));let a=e.length,o=Array(a);e.forEach((e,r)=>sY.resolve(e).then(e=>n(e),e=>{o[r]=e,--a||t(AggregateError(o))}))})}));let s9={awaits:0,echoes:0,id:0};var le=0,ln=[],lt=0,la=0,lo=0;function lr(e,n,t,a){var o=sU,r=Object.create(o);r.parent=o,r.ref=0,r.global=!1,r.id=++lo;var i=sV.env;r.env=sT?{Promise:sY,PromiseProp:{value:sY,configurable:!0,writable:!0},all:sY.all,race:sY.race,allSettled:sY.allSettled,any:sY.any,resolve:sY.resolve,reject:sY.reject,nthen:lh(i.nthen,r),gthen:lh(i.gthen,r)}:{},n&&iB(r,n),++o.ref,r.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=lf(r,e,t,a);return 0===r.ref&&r.finalize(),s}function li(){return s9.id||(s9.id=++le),++s9.awaits,s9.echoes+=100,s9.id}function ls(){return!!s9.awaits&&(0==--s9.awaits&&(s9.id=0),s9.echoes=100*s9.awaits,!0)}function ll(e){return s9.echoes&&e&&e.constructor===sP?(li(),e.then(e=>(ls(),e),e=>(ls(),lb(e)))):e}function lc(e){++la,s9.echoes&&0!=--s9.echoes||(s9.echoes=s9.id=0),ln.push(sU),lu(e,!0)}function lp(){var e=ln[ln.length-1];ln.pop(),lu(e,!1)}function lu(e,n){var t,a=sU;if((n?!s9.echoes||lt++&&e===sU:!lt||--lt&&e===sU)||(t=n?lc.bind(null,e):lp,sO.call(sD,t)),e!==sU&&(sU=e,a===sV&&(sV.env=ld()),sT)){var o=sV.env.Promise,r=e.env;sM.then=r.nthen,o.prototype.then=r.gthen,(a.global||e.global)&&(Object.defineProperty(iO,"Promise",r.PromiseProp),o.all=r.all,o.race=r.race,o.resolve=r.resolve,o.reject=r.reject,r.allSettled&&(o.allSettled=r.allSettled),r.any&&(o.any=r.any))}}function ld(){var e=iO.Promise;return sT?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(iO,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:sM.then,gthen:e.prototype.then}:{}}function lf(e,n,t,a,o){var r=sU;try{return lu(e,!0),n(t,a,o)}finally{lu(r,!1)}}function lm(e,n,t,a){return"function"!=typeof e?e:function(){var o,r=sU;t&&li(),lu(n,!0);try{return e.apply(this,arguments)}finally{lu(r,!1),a&&(o=ls,sO.call(sD,o))}}}function lh(e,n){return function(t,a){return e.call(this,lm(t,n),lm(a,n))}}-1===(""+sO).indexOf("[native code]")&&(li=ls=s_);let lg="unhandledrejection";function ly(e,n){var t;try{t=n.onuncatched(e)}catch(e){}if(!1!==t)try{var a,o={promise:n,reason:e};if(iO.document&&document.createEvent?((a=document.createEvent("Event")).initEvent(lg,!0,!0),iB(a,o)):iO.CustomEvent&&iB(a=new CustomEvent(lg,{detail:o}),o),a&&iO.dispatchEvent&&(dispatchEvent(a),!iO.PromiseRejectionEvent&&iO.onunhandledrejection))try{iO.onunhandledrejection(a)}catch(e){}sa&&a&&!a.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var lb=sY.reject;let l_="3.2.4",lv=String.fromCharCode(65535),l$=-1/0,lA="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",lk="String expected.",lw=[],lx="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lC=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),lE="__dbnames",lS="readonly",lD="readwrite";function lM(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}let lz={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function lO(e){return"string"!=typeof e||/\./.test(e)?e=>e:n=>(void 0===n[e]&&e in n&&delete(n=i4(n))[e],n)}class lP{_trans(e,n,t){let a=this._tx||sU.trans,o=this.name;function r(e,t,a){if(!a.schema[o])throw new sg.NotFound("Table "+o+" not part of transaction");return n(a.idbtrans,a)}let i=s5();try{return a&&a.db===this.db?a===sU.trans?a._promise(e,r,t):lr(()=>a._promise(e,r,t),{trans:a,transless:sU.transless||sU}):function e(n,t,a,o){if(n.idbdb&&(n._state.openComplete||sU.letThrough||n._vip)){var r=n._createTransaction(t,a,n._dbSchema);try{r.create(),n._state.PR1398_maxLoop=3}catch(r){return r.name===sh.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,a,o))):lb(r)}return r._promise(t,(e,n)=>lr(()=>(sU.trans=r,o(e,n,r)))).then(e=>r._completion.then(()=>e))}if(n._state.openComplete)return lb(new sg.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._options.autoOpen)return lb(new sg.DatabaseClosed);n.open().catch(s_)}return n._state.dbReadyPromise.then(()=>e(n,t,a,o))}(this.db,e,[this.name],r)}finally{i&&s4()}}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(iT(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let n=iP(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!==lv)return this.where(t.name).equals(t.keyPath.map(n=>e[n]));!t&&sa&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);let{idxByName:a}=this.schema,o=this.db._deps.indexedDB;function r(e,n){try{return 0===o.cmp(e,n)}catch(e){return!1}}let[i,s]=n.reduce(([n,t],o)=>{let i=a[o],s=e[o];return[n||i,n||!i?lM(t,i&&i.multi?e=>{let n=iZ(e,o);return iT(n)&&n.some(e=>r(s,e))}:e=>r(s,iZ(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,iT(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 a in n)if(ij(n,a))try{t[a]=n[a]}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){iB(this,e)})}add(e,n){let{auto:t,keyPath:a}=this.schema.primKey,o=e;return a&&t&&(o=lO(a)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=n?[n]:null,values:[o]})).then(e=>e.numFailures?sY.reject(e.failures[0]):e.lastResult).then(n=>{if(a)try{iX(e,a,n)}catch(e){}return n})}update(e,n){if("object"!=typeof e||iT(e))return this.where(":id").equals(e).modify(n);{let t=iZ(e,this.schema.primKey.keyPath);if(void 0===t)return lb(new sg.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof n?iP(n).forEach(t=>{iX(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:a}=this.schema.primKey,o=e;return a&&t&&(o=lO(a)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=n?[n]:null})).then(e=>e.numFailures?sY.reject(e.failures[0]):e.lastResult).then(n=>{if(a)try{iX(e,a,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?sY.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:lz})).then(e=>e.numFailures?sY.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 a=Array.isArray(n)?n:void 0,o=(t=t||(a?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:r}=this.schema.primKey;if(r&&a)throw new sg.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(a&&a.length!==e.length)throw new sg.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=r&&t?e.map(lO(r)):e;return this.core.mutate({trans:n,type:"add",keys:a,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:a})=>{if(0===e)return o?n:t;throw new sm(`${this.name}.bulkAdd(): ${e} of ${i} operations failed`,a)})})}bulkPut(e,n,t){let a=Array.isArray(n)?n:void 0,o=(t=t||(a?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:r}=this.schema.primKey;if(r&&a)throw new sg.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(a&&a.length!==e.length)throw new sg.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=r&&t?e.map(lO(r)):e;return this.core.mutate({trans:n,type:"put",keys:a,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:a})=>{if(0===e)return o?n:t;throw new sm(`${this.name}.bulkPut(): ${e} of ${i} operations failed`,a)})})}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:a})=>{if(0===e)return t;throw new sm(`${this.name}.bulkDelete(): ${e} of ${n} operations failed`,a)})}}function lT(e){var n={},t=function(t,a){if(a){for(var o=arguments.length,r=Array(o-1);--o;)r[o-1]=arguments[o];return n[t].subscribe.apply(null,r),e}if("string"==typeof t)return n[t]};t.addEventType=r;for(var a=1,o=arguments.length;a<o;++a)r(arguments[a]);return t;function r(e,a,o){if("object"!=typeof e){a||(a=sC),o||(o=s_);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=a(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter(function(n){return n!==e}),i.fire=i.subscribers.reduce(a,o)}};return n[e]=t[e]=i,i}iP(e).forEach(function(n){var t=e[n];if(iT(t))r(n,e[n][0],e[n][1]);else{if("asap"!==t)throw new sg.InvalidArgument("Invalid event config");var a=r(n,sv,function(){for(var e=arguments.length,n=Array(e);e--;)n[e]=arguments[e];a.subscribers.forEach(function(e){iY(function(){e.apply(null,n)})})})}})}}function lB(e,n){return iW(n).from({prototype:e}),n}function lI(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function lN(e,n){e.filter=lM(e.filter,n)}function lj(e,n,t){var a=e.replayFilter;e.replayFilter=a?()=>lM(a(),n()):n,e.justLimit=t&&!a}function lR(e,n){if(e.isPrimKey)return n.primaryKey;let t=n.getIndexByKeyPath(e.index);if(!t)throw new sg.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function lF(e,n,t){let a=lR(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:a,range:e.range}})}function lL(e,n,t,a){let o=e.replayFilter?lM(e.filter,e.replayFilter()):e.filter;if(e.or){let r={},i=(e,t,a)=>{if(!o||o(t,a,e=>t.stop(e),e=>t.fail(e))){var i=t.primaryKey,s=""+i;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(i)),ij(r,s)||(r[s]=!0,n(e,t,a))}};return Promise.all([e.or._iterate(i,t),lW(lF(e,a,t),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return lW(lF(e,a,t),lM(e.algorithm,o),n,!e.keysOnly&&e.valueMapper)}function lW(e,n,t,a){var o=s7(a?(e,n,o)=>t(a(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=s_},n=>{e.fail(n),t=s_})||o(e.value,e,e=>t=e),t()})})}function lG(e,n){try{let t=lV(e),a=lV(n);if(t!==a)return"Array"===t?1:"Array"===a?-1:"binary"===t?1:"binary"===a?-1:"string"===t?1:"string"===a?-1:"Date"===t?1:"Date"!==a?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,a=n.length,o=t<a?t:a;for(let t=0;t<o;++t)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return t===a?0:t<a?-1:1}(lU(e),lU(n));case"Array":return function(e,n){let t=e.length,a=n.length,o=t<a?t:a;for(let t=0;t<o;++t){let a=lG(e[t],n[t]);if(0!==a)return a}return t===a?0:t<a?-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=i8(e);return"ArrayBuffer"===t?"binary":t}function lU(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lq{_read(e,n){var t=this._ctx;return t.error?t.table._trans(null,lb.bind(null,t.error)):t.table._trans("readonly",e).then(n)}_write(e){var n=this._ctx;return n.error?n.table._trans(null,lb.bind(null,n.error)):n.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var n=this._ctx;n.algorithm=lM(n.algorithm,e)}_iterate(e,n){return lL(this._ctx,e,n,this._ctx.table.core)}clone(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&iB(t,e),n._ctx=t,n}raw(){return this._ctx.valueMapper=null,this}each(e){var n=this._ctx;return this._read(t=>lL(n,e,t,n.table.core))}count(e){return this._read(e=>{let n=this._ctx,t=n.table.core;if(lI(n,!0))return t.count({trans:e,query:{index:lR(n,t.schema),range:n.range}}).then(e=>Math.min(e,n.limit));var a=0;return lL(n,()=>(++a,!1),e,t).then(()=>a)}).then(e)}sortBy(e,n){let t=e.split(".").reverse(),a=t[0],o=t.length-1;function r(e,n){return n?r(e[t[n]],n-1):e[a]}var i="next"===this._ctx.dir?1:-1;function s(e,n){var t=r(e,o),a=r(n,o);return t<a?-i:t>a?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&&lI(n,!0)&&n.limit>0){let{valueMapper:t}=n,a=lR(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:a,range:n.range}}).then(({result:e})=>t?e.map(t):e)}{let t=[];return lL(n,e=>t.push(e),e,n.table.core).then(()=>t)}},e)}offset(e){var n=this._ctx;return e<=0||(n.offset+=e,lI(n)?lj(n,()=>{var n=e;return(e,t)=>0===n||(1===n?--n:t(()=>{e.advance(n),n=0}),!1)}):lj(n,()=>{var n=e;return()=>--n<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lj(this._ctx,()=>{var n=e;return function(e,t,a){return--n<=0&&t(a),n>=0}},!0),this}until(e,n){return lN(this._ctx,function(t,a,o){return!e(t.value)||(a(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 lN(this._ctx,function(n){return e(n.value)}),(n=this._ctx).isMatch=lM(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&&lI(n,!0)&&n.limit>0)return this._read(e=>{var t=lR(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 lN(this._ctx,function(e){var n=e.primaryKey.toString(),a=ij(t,n);return t[n]=!0,!a}),this}modify(e){var n=this._ctx;return this._write(t=>{var a;if("function"==typeof e)a=e;else{var o=iP(e),r=o.length;a=function(n){for(var t=!1,a=0;a<r;++a){var i=o[a],s=e[i];iZ(n,i)!==s&&(iX(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:a}=n;for(let n of(u+=e-a,iP(t)))p.push(t[n])};return this.clone().primaryKeys().then(o=>{let r=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 m=[],h=[],g=s?[]:null,y=[];for(let e=0;e<u;++e){let n=d[e],t={value:i4(n),primKey:o[p+e]};!1!==a.call(t,t.value,t)&&(null==t.value?y.push(o[p+e]):s||0===lG(l(n),l(t.value))?(h.push(t.value),s&&g.push(o[p+e])):(y.push(o[p+e]),m.push(t.value)))}let b=lI(n)&&n.limit===1/0&&("function"!=typeof e||e===lH)&&{index:n.index,range:n.range};return Promise.resolve(m.length>0&&i.mutate({trans:t,type:"add",values:m}).then(e=>{for(let n in e.failures)y.splice(parseInt(n),1);f(m.length,e)})).then(()=>(h.length>0||b&&"object"==typeof e)&&i.mutate({trans:t,type:"put",keys:g,values:h,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(h.length,e))).then(()=>(y.length>0||b&&e===lH)&&i.mutate({trans:t,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>o.length>p+u&&r(p+c))})};return r(0).then(()=>{if(p.length>0)throw new sf("Error modifying one or more objects",p,u,d);return o.length})})})}delete(){var e=this._ctx,n=e.range;return lI(e)&&(e.isPrimKey&&!lx||3===n.type)?this._write(t=>{let{primaryKey:a}=e.table.core.schema;return e.table.core.count({trans:t,query:{index:a,range:n}}).then(a=>e.table.core.mutate({trans:t,type:"deleteRange",range:n}).then(({failures:e,lastResult:n,results:t,numFailures:o})=>{if(o)throw new sf("Could not delete some values",Object.keys(e).map(n=>e[n]),a-o);return a-o}))}):this.modify(lH)}}let lH=(e,n)=>n.value=null;function lK(e,n){return e<n?-1:+(e!==n)}function lY(e,n){return e>n?-1:+(e!==n)}function lJ(e,n,t){var a=e instanceof l1?new e.Collection(e):e;return a._ctx.error=t?new t(n):TypeError(n),a}function lZ(e){return new e.Collection(e,()=>l0("")).limit(0)}function lX(e,n,t,a){var o,r,i,s,l,c,p,u=t.length;if(!t.every(e=>"string"==typeof e))return lJ(e,lk);function d(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),r="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),i="next"===e?lK:lY;var n=t.map(function(e){return{lower:r(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?"":a}d("next");var f=new e.Collection(e,()=>lQ(s[0],l[u-1]+a));f._ondirectionchange=function(e){d(e)};var m=0;return f._addAlgorithm(function(e,t,a){var o=e.key;if("string"!=typeof o)return!1;var d=r(o);if(n(d,l,m))return!0;for(var f=null,h=m;h<u;++h){var g=function(e,n,t,a,o,r){for(var i=Math.min(e.length,a.length),s=-1,l=0;l<i;++l){var c=n[l];if(c!==a[l])return 0>o(e[l],t[l])?e.substr(0,l)+t[l]+t.substr(l+1):0>o(e[l],a[l])?e.substr(0,l)+a[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<a.length&&"next"===r?e+t.substr(e.length):i<e.length&&"prev"===r?e.substr(0,t.length):s<0?null:e.substr(0,s)+a[s]+t.substr(s+1)}(o,d,s[h],l[h],i,c);null===g&&null===f?m=h+1:(null===f||i(f,g)>0)&&(f=g)}return t(null!==f?function(){e.continue(f+p)}:a),!1}),f}function lQ(e,n,t,a){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:a}}function l0(e){return{type:1,lower:e,upper:e}}class l1{get Collection(){return this._ctx.table.db.Collection}between(e,n,t,a){t=!1!==t,a=!0===a;try{return this._cmp(e,n)>0||0===this._cmp(e,n)&&(t||a)&&(!t||!a)?lZ(this):new this.Collection(this,()=>lQ(e,n,!t,!a))}catch(e){return lJ(this,lA)}}equals(e){return null==e?lJ(this,lA):new this.Collection(this,()=>l0(e))}above(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(e,void 0,!0))}aboveOrEqual(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(e,void 0,!1))}below(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(void 0,e))}startsWith(e){return"string"!=typeof e?lJ(this,lk):this.between(e,e+lv,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lX(this,(e,n)=>0===e.indexOf(n[0]),[e],lv)}equalsIgnoreCase(e){return lX(this,(e,n)=>e===n[0],[e],"")}anyOfIgnoreCase(){var e=sn.apply(se,arguments);return 0===e.length?lZ(this):lX(this,(e,n)=>-1!==n.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=sn.apply(se,arguments);return 0===e.length?lZ(this):lX(this,(e,n)=>n.some(n=>0===e.indexOf(n)),e,lv)}anyOf(){let e=sn.apply(se,arguments),n=this._cmp;try{e.sort(n)}catch(e){return lJ(this,lA)}if(0===e.length)return lZ(this);let t=new this.Collection(this,()=>lQ(e[0],e[e.length-1]));t._ondirectionchange=t=>{n="next"===t?this._ascending:this._descending,e.sort(n)};let a=0;return t._addAlgorithm((t,o,r)=>{let i=t.key;for(;n(i,e[a])>0;)if(++a===e.length)return o(r),!1;return 0===n(i,e[a])||(o(()=>{t.continue(e[a])}),!1)}),t}notEqual(e){return this.inAnyRange([[l$,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=sn.apply(se,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lJ(this,lA)}let n=e.reduce((e,n)=>e?e.concat([[e[e.length-1][1],n]]):[[l$,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,a=this._ascending,o=this._descending,r=this._min,i=this._max;if(0===e.length)return lZ(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=a(e[0],e[1])))return lJ(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",sg.InvalidArgument);let s=!n||!1!==n.includeLowers,l=n&&!0===n.includeUppers,c,p=a;function u(e,n){return p(e[0],n[0])}try{(c=e.reduce(function(e,n){let a=0,o=e.length;for(;a<o;++a){let o=e[a];if(0>t(n[0],o[1])&&t(n[1],o[0])>0){o[0]=r(o[0],n[0]),o[1]=i(o[1],n[1]);break}}return a===o&&e.push(n),e},[])).sort(u)}catch(e){return lJ(this,lA)}let d=0,f=l?e=>a(e,c[d][1])>0:e=>a(e,c[d][1])>=0,m=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0,h=f,g=new this.Collection(this,()=>lQ(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(h=f,p=a):(h=m,p=o),c.sort(u)},g._addAlgorithm((e,n,t)=>{for(var o=e.key;h(o);)if(++d===c.length)return n(t),!1;return!!(!f(o)&&!m(o))||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||n(()=>{p===a?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=sn.apply(se,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lZ(this):this.inAnyRange(e.map(e=>[e,e+lv])):lJ(this,"startsWithAnyOf() only works with strings")}}function l2(e){return s7(function(n){return l3(n),e(n.target.error),!1})}function l3(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let l5="storagemutated",l4="x-storagemutated-1",l6=lT(null,l5);class l8{_lock(){return iK(!sU.global),++this._reculock,1!==this._reculock||sU.global||(sU.lockOwnerFor=this),this}_unlock(){if(iK(!sU.global),0==--this._reculock)for(sU.global||(sU.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{lf(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&sU.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 sg.DatabaseClosed(t);case"MissingAPIError":throw new sg.MissingAPI(t.message,t);default:throw new sg.OpenFailed(t)}if(!this.active)throw new sg.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=s7(n=>{l3(n),this._reject(e.error)}),e.onabort=s7(n=>{l3(n),this.active&&this._reject(new sg.Abort(e.error)),this.active=!1,this.on("abort").fire(n)}),e.oncomplete=s7(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&l6.storagemutated.fire(e.mutatedParts)}),this}_promise(e,n,t){if("readwrite"===e&&"readwrite"!==this.mode)return lb(new sg.ReadOnly("Transaction is readonly"));if(!this.active)return lb(new sg.TransactionInactive);if(this._locked())return new sY((a,o)=>{this._blockedFuncs.push([()=>{this._promise(e,n,t).then(a,o)},sU])});if(t)return lr(()=>{var e=new sY((e,t)=>{this._lock();let a=n(e,t,this);a&&a.then&&a.then(e,t)});return e.finally(()=>this._unlock()),e._lib=!0,e});var a=new sY((e,t)=>{var a=n(e,t,this);a&&a.then&&a.then(e,t)});return a._lib=!0,a}_root(){return this.parent?this.parent._root():this}waitFor(e){var n=this._root();let t=sY.resolve(e);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>t);else{n._waitingFor=t,n._waitingQueue=[];var a=n.idbtrans.objectStore(n.storeNames[0]);!function e(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(a.get(-1/0).onsuccess=e)}()}var o=n._waitingFor;return new sY((e,a)=>{t.then(t=>n._waitingQueue.push(s7(e.bind(null,t))),e=>n._waitingQueue.push(s7(a.bind(null,e)))).finally(()=>{n._waitingFor===o&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new sg.Abort))}table(e){let n=this._memoizedTables||(this._memoizedTables={});if(ij(n,e))return n[e];let t=this.schema[e];if(!t)throw new sg.NotFound("Table "+e+" not part of transaction");let a=new this.db.Table(e,t,this);return a.core=this.db.core.table(e),n[e]=a,a}}function l7(e,n,t,a,o,r,i){return{name:e,keyPath:n,unique:t,multi:a,auto:o,compound:r,src:(t&&!i?"&":"")+(a?"*":"")+(o?"++":"")+l9(n)}}function l9(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function ce(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:iJ(t,e=>[e.name,e])}}let cn=e=>{try{return e.only([[]]),cn=()=>[[]],[[]]}catch(e){return cn=()=>lv,lv}};function ct(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?n=>n[e]:n=>iZ(n,e):n=>iZ(n,e)}function ca(e){return[].slice.call(e)}let co=0;function cr(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ci({_novip:e},n){let t=n.db,a=function(e,n,{IDBKeyRange:t,indexedDB:a},o){var r;return{dbcore:(r=function(e,n,t){let a;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:a,lowerOpen:o,upperOpen:r}=e;return void 0===t?void 0===a?null:n.upperBound(a,!!r):void 0===a?n.lowerBound(t,!!o):n.bound(t,a,!!o,!!r)}let{schema:r,hasGetAll:i}=(a=ca(e.objectStoreNames),{schema:{name:e.name,tables:a.map(e=>t.objectStore(e)).map(e=>{let{keyPath:n,autoIncrement:t}=e,a=iT(n),o=null==n,r={},i={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:a,keyPath:n,autoIncrement:t,unique:!0,extractKey:ct(n)},indexes:ca(e.indexNames).map(n=>e.index(n)).map(e=>{let{name:n,unique:t,multiEntry:a,keyPath:o}=e,i={name:n,compound:iT(o),keyPath:o,unique:t,multiEntry:a,extractKey:ct(o)};return r[cr(o)]=i,i}),getIndexByKeyPath:e=>r[cr(e)]};return r[":id"]=i.primaryKey,null!=n&&(r[cr(n)]=i.primaryKey),i})},hasGetAll:a.length>0&&"getAll"in t.objectStore(a[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=r.tables.map(e=>{let n;return{name:n=e.name,schema:e,mutate:function({trans:e,type:t,keys:a,values:r,range:i}){return new Promise((s,l)=>{let c;s=s7(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}=a||r||{length:1};if(a&&r&&a.length!==r.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 m=[],h=[],g=0,y=e=>{++g,l3(e)};if("deleteRange"===t){if(4===i.type)return s({numFailures:g,failures:h,results:[],lastResult:void 0});3===i.type?m.push(c=p.clear()):m.push(c=p.delete(o(i)))}else{let[e,n]=d?u?[r,a]:[r,null]:[a,null];if(d)for(let a=0;a<f;++a)m.push(c=n&&void 0!==n[a]?p[t](e[a],n[a]):p[t](e[a])),c.onerror=y;else for(let n=0;n<f;++n)m.push(c=p[t](e[n])),c.onerror=y}let b=e=>{let n=e.target.result;m.forEach((e,n)=>null!=e.error&&(h[n]=e.error)),s({numFailures:g,failures:h,results:"delete"===t?a:m.map(e=>e.result),lastResult:n})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:t})=>new Promise((a,o)=>{a=s7(a);let r=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&&a(s)},d=l2(o);for(let e=0;e<i;++e)null!=t[e]&&((l=r.get(t[e]))._pos=e,l.onsuccess=u,l.onerror=d,++c);0===c&&a(s)}),get:({trans:e,key:t})=>new Promise((a,o)=>{a=s7(a);let r=e.objectStore(n).get(t);r.onsuccess=e=>a(e.target.result),r.onerror=l2(o)}),query:e=>new Promise((t,a)=>{t=s7(t);let{trans:r,values:s,limit:l,query:c}=e,p=l===1/0?void 0:l,{index:u,range:d}=c,f=r.objectStore(n),m=u.isPrimaryKey?f:f.index(u.name),h=o(d);if(0===l)return t({result:[]});if(i){let e=s?m.getAll(h,p):m.getAllKeys(h,p);e.onsuccess=e=>t({result:e.target.result}),e.onerror=l2(a)}else{let e=0,n=!s&&"openKeyCursor"in m?m.openKeyCursor(h):m.openCursor(h),o=[];n.onsuccess=a=>{let r=n.result;return r?(o.push(s?r.value:r.primaryKey),++e===l?t({result:o}):void r.continue()):t({result:o})},n.onerror=l2(a)}}),openCursor:function({trans:e,values:t,query:a,reverse:r,unique:i}){return new Promise((s,l)=>{s=s7(s);let{index:c,range:p}=a,u=e.objectStore(n),d=c.isPrimaryKey?u:u.index(c.name),f=r?i?"prevunique":"prev":i?"nextunique":"next",m=!t&&"openKeyCursor"in d?d.openKeyCursor(o(p),f):d.openCursor(o(p),f);m.onerror=l2(l),m.onsuccess=s7(n=>{let t=m.result;if(!t)return void s(null);t.___id=++co,t.done=!1;let a=t.continue.bind(t),o=t.continuePrimaryKey;o&&(o=o.bind(t));let r=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=s7(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=s7(e),m.onerror=l2(n),t.fail=n,t.stop=n=>{t.stop=t.continue=t.continuePrimaryKey=t.advance=i,e(n)}}),s=()=>{if(m.result)try{e()}catch(e){t.fail(e)}else t.done=!0,t.start=()=>{throw Error("Cursor behind last entry")},t.stop()};return m.onsuccess=s7(e=>{m.onsuccess=s,s()}),t.continue=a,t.continuePrimaryKey=o,t.advance=r,s(),n},s(t)},l)})},count({query:e,trans:t}){let{index:a,range:r}=e;return new Promise((e,i)=>{let s=t.objectStore(n),l=a.isPrimaryKey?s:s.index(a.name),c=o(r),p=c?l.count(c):l.count();p.onsuccess=s7(n=>e(n.target.result)),p.onerror=l2(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:cn(n),schema:r}}(n,t,o),e.dbcore.reduce((e,{create:n})=>({...e,...n(e)}),r))}}(e._middlewares,t,e._deps,n);e.core=a.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 cs({_novip:e},n,t,a){t.forEach(t=>{let o=a[t];n.forEach(n=>{let a=iV(n,t);(!a||"value"in a&&void 0===a.value)&&(n===e.Transaction.prototype||n instanceof e.Transaction?iL(n,t,{get(){return this.table(t)},set(e){iF(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):n[t]=new e.Table(t,o))})})}function cl({_novip:e},n){n.forEach(n=>{for(let t in n)n[t]instanceof e.Table&&delete n[t]})}function cc(e,n){return e._cfg.version-n._cfg.version}function cp(e,n){let t,a={del:[],add:[],change:[]};for(t in e)n[t]||a.del.push(t);for(t in n){let o=e[t],r=n[t];if(o){let e={name:t,def:r,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(r.primKey.keyPath||"")&&(o.primKey.auto===r.primKey.auto||lx)){let n,t=o.idxByName,i=r.idxByName;for(n in t)i[n]||e.del.push(n);for(n in i){let a=t[n],o=i[n];a?a.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&a.change.push(e)}else e.recreate=!0,a.change.push(e)}else a.add.push([t,r])}return a}function cu(e,n,t,a){let o=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return a.forEach(e=>cd(o,e)),o}function cd(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function cf(e,n,t){let a={};return iq(n.objectStoreNames,0).forEach(e=>{let n=t.objectStore(e),o=n.keyPath,r=l7(l9(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=l7(t.name,o,!!t.unique,!!t.multiEntry,!1,o&&"string"!=typeof o,!1);i.push(s)}a[e]=ce(e,r,i)}),a}function cm({_novip:e},n,t){let a=t.db.objectStoreNames;for(let o=0;o<a.length;++o){let r=a[o],i=t.objectStore(r);e._hasGetAll="getAll"in i;for(let e=0;e<i.indexNames.length;++e){let t=i.indexNames[e],a=i.index(t).keyPath,o="string"==typeof a?a:"["+iq(a).join("+")+"]";if(n[r]){let e=n[r].idxByName[o];e&&(e.name=t,delete n[r].idxByName[o],n[r].idxByName[t]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&iO.WorkerGlobalScope&&iO instanceof iO.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ch{_parseStoresSpec(e,n){iP(e).forEach(t=>{if(null!==e[t]){var a=e[t].split(",").map((e,n)=>{let t=(e=e.trim()).replace(/([&*]|\+\+)/g,""),a=/^\[/.test(t)?t.match(/^\[(.*)\]$/)[1].split("+"):t;return l7(t,a||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),iT(a),0===n)}),o=a.shift();if(o.multi)throw new sg.Schema("Primary key cannot be multi-valued");a.forEach(e=>{if(e.auto)throw new sg.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new sg.Schema("Index must have a name and cannot be an empty string")}),n[t]=ce(t,o,a)}})}stores(e){let n=this.db;this._cfg.storesSource=this._cfg.storesSource?iB(this._cfg.storesSource,e):e;let t=n._versions,a={},o={};return t.forEach(e=>{iB(a,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(a,o)}),n._dbSchema=o,cl(n,[n._allTables,n,n.Transaction.prototype]),cs(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],iP(o),o),n._storeNames=iP(o),this}upgrade(e){return this._cfg.contentUpgrade=sE(this._cfg.contentUpgrade||s_,e),this}}function cg(e,n){let t=e._dbNamesDB;return t||(t=e._dbNamesDB=new cB(lE,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function cy(e){return e&&"function"==typeof e.databases}function cb(e){return lr(function(){return sU.letThrough=!0,e()})}function c_(e){var n=n=>e.next(n),t=o(n),a=o(n=>e.throw(n));function o(e){return n=>{var o=e(n),r=o.value;return o.done?r:r&&"function"==typeof r.then?r.then(t,a):iT(r)?Promise.all(r).then(t,a):t(r)}}return o(n)()}function cv(e,n,t){var a=arguments.length;if(a<2)throw new sg.InvalidArgument("Too few arguments");for(var o=Array(a-1);--a;)o[a-1]=arguments[a];return t=o.pop(),[e,i1(o),t]}function c$(e,n,t){let a=iT(e)?e.slice():[e];for(let e=0;e<t;++e)a.push(n);return a}let cA={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(n){let t=e.table(n),{schema:a}=t,o={},r=[];function i(e,n,t){let a=cr(e),s=o[a]=o[a]||[],l=null==e?0:"string"==typeof e?1:e.length,c=n>0,p={...t,isVirtual:c,keyTail:n,keyLength:l,extractKey:ct(e),unique:!c&&t.unique};return s.push(p),p.isPrimaryKey||r.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(a.primaryKey.keyPath,0,a.primaryKey);for(let e of(o[":id"]=[s],a.indexes))i(e.keyPath,0,e);function l(n){var t,a;let o=n.query.index;return o.isVirtual?{...n,query:{index:o,range:(t=n.query.range,a=o.keyTail,{type:1===t.type?2:t.type,lower:c$(t.lower,t.lowerOpen?e.MAX_KEY:e.MIN_KEY,a),lowerOpen:!0,upper:c$(t.upper,t.upperOpen?e.MIN_KEY:e.MAX_KEY,a),upperOpen:!0})}}:n}return{...t,schema:{...a,primaryKey:s,indexes:r,getIndexByKeyPath:function(e){let n=o[cr(e)];return n&&n[0]}},count:e=>t.count(l(e)),query:e=>t.query(l(e)),openCursor(n){let{keyTail:a,isVirtual:o,keyLength:r}=n.query.index;return o?t.openCursor(l(n)).then(t=>t&&Object.create(t,{continue:{value:function(o){null!=o?t.continue(c$(o,n.reverse?e.MAX_KEY:e.MIN_KEY,a)):n.unique?t.continue(t.key.slice(0,r).concat(n.reverse?e.MIN_KEY:e.MAX_KEY,a)):t.continue()}},continuePrimaryKey:{value(n,o){t.continuePrimaryKey(c$(n,e.MAX_KEY,a),o)}},primaryKey:{get:()=>t.primaryKey},key:{get(){let e=t.key;return 1===r?e[0]:e.slice(0,r)}},value:{get:()=>t.value}})):t.openCursor(n)}}}}}};function ck(e,n,t,a){return t=t||{},a=a||"",iP(e).forEach(o=>{if(ij(n,o)){var r=e[o],i=n[o];if("object"==typeof r&&"object"==typeof i&&r&&i){let e=i8(r);e!==i8(i)?t[a+o]=n[o]:"Object"===e?ck(r,i,t,a+o+"."):r!==i&&(t[a+o]=n[o])}else r!==i&&(t[a+o]=n[o])}else t[a+o]=void 0}),iP(n).forEach(o=>{ij(e,o)||(t[a+o]=n[o])}),t}let cw={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(n){let t=e.table(n),{primaryKey:a}=t.schema;return{...t,mutate(e){let o=sU.trans,{deleting:r,creating:i,updating:s}=o.table(n).hook;switch(e.type){case"add":if(i.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(i.fire===s_&&s.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(r.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(r.fire===s_)break;return o._promise("readwrite",()=>(function e(n,o,r){return t.query({trans:n,values:!1,query:{index:a,range:o},limit:r}).then(({result:t})=>l({type:"delete",keys:t,trans:n}).then(a=>a.numFailures>0?Promise.reject(a.failures[0]):t.length<r?{failures:[],numFailures:0,lastResult:void 0}:e(n,{...o,lower:t[t.length-1],lowerOpen:!0},r)))})(e.trans,e.range,1e4),!0)}return t.mutate(e);function l(e){var n,o;let l=sU.trans,c=e.keys||("delete"===(n=e).type?n.keys:n.keys||n.values.map(a.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)r.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,a.outbound||iX(e.values[o],a.keyPath,t))}else{let n=ck(c,e.values[o]),a=s.fire.call(p,n,t,c,l);if(a){let n=e.values[o];Object.keys(a).forEach(e=>{ij(n,e)?n[e]=a[e]:iX(n,e,a[e])})}}return p});return t.mutate(e).then(({failures:t,results:a,numFailures:r,lastResult:i})=>{for(let r=0;r<c.length;++r){let i=a?a[r]:c[r],s=o[r];null==i?s.onerror&&s.onerror(t[r]):s.onsuccess&&s.onsuccess("put"===e.type&&n[r]?e.values[r]:i)}return{failures:t,results:a,numFailures:r,lastResult:i}}).catch(e=>(o.forEach(n=>n.onerror&&n.onerror(e)),Promise.reject(e)))})}}}}})};function cx(e,n,t){try{if(!n||n.keys.length<e.length)return null;let a=[];for(let o=0,r=0;o<n.keys.length&&r<e.length;++o)0===lG(n.keys[o],e[r])&&(a.push(t?i4(n.values[o]):n.values[o]),++r);return a.length===e.length?a:null}catch(e){return null}}let cC={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=cx(e.keys,e.trans._cache,"clone"===e.cache);return n?sY.resolve(n):t.getMany(e).then(n=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?i4(n):n},n))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),t.mutate(e))}}})};function cE(e){return!("from"in e)}let cS=function(e,n){if(!this){let n=new cS;return e&&"d"in e&&iB(n,e),n}iB(this,arguments.length?{d:1,from:e,to:arguments.length>1?n:e}:{d:0})};function cD(e,n,t){let a=lG(n,t);if(isNaN(a))return;if(a>0)throw RangeError();if(cE(e))return iB(e,{from:n,to:t,d:1});let o=e.l,r=e.r;if(0>lG(t,e.from))return o?cD(o,n,t):e.l={from:n,to:t,d:1,l:null,r:null},cO(e);if(lG(n,e.to)>0)return r?cD(r,n,t):e.r={from:n,to:t,d:1,l:null,r:null},cO(e);0>lG(n,e.from)&&(e.from=n,e.l=null,e.d=r?r.d+1:1),lG(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&&cM(e,o),r&&i&&cM(e,r)}function cM(e,n){cE(n)||function e(n,{from:t,to:a,l:o,r:r}){cD(n,t,a),o&&e(n,o),r&&e(n,r)}(e,n)}function cz(e){let n=cE(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>lG(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>=lG(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 cO(e){var n,t;let a=((null==(n=e.r)?void 0:n.d)||0)-((null==(t=e.l)?void 0:t.d)||0),o=a>1?"r":a<-1?"l":"";if(o){let n="r"===o?"l":"r",t={...e},a=e[o];e.from=a.from,e.to=a.to,e[o]=a[o],t[o]=a[n],e[n]=t,t.d=cP(t)}e.d=cP(e)}function cP({r:e,l:n}){return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1}iR(cS.prototype,{add(e){return cM(this,e),this},addKey(e){return cD(this,e,e),this},addKeys(e){return e.forEach(e=>cD(this,e,e)),this},[i7](){return cz(this)}});let cT={stack:"dbcore",level:0,create:e=>{let n=e.schema.name,t=new cS(e.MIN_KEY,e.MAX_KEY);return{...e,table:a=>{let o=e.table(a),{schema:r}=o,{primaryKey:i}=r,{extractKey:s,outbound:l}=i,c={...o,mutate:e=>{let i=e.trans,s=i.mutatedParts||(i.mutatedParts={}),l=e=>{let t=`idb://${n}/${a}/${e}`;return s[t]||(s[t]=new cS)},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]:[],m=e.trans._cache;return o.mutate(e).then(e=>{if(iT(d)){"delete"!==u&&(d=e.results),c.addKeys(d);let n=cx(d,m);n||"add"===u||p.addKeys(d),(n||f)&&r.indexes.forEach(function(e){let t=l(e.name||"");function a(n){return null!=n?e.extractKey(n):null}let o=n=>e.multiEntry&&iT(n)?n.forEach(e=>t.addKey(e)):t.addKey(n);(n||f).forEach((e,t)=>{let r=n&&a(n[t]),i=f&&a(f[t]);0!==lG(r,i)&&(null!=r&&o(r),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),r.indexes.forEach(e=>l(e.name).add(t));return e})}},p=({query:{index:n,range:t}})=>{var a,o;return[n,new cS(null!=(a=t.lower)?a:e.MIN_KEY,null!=(o=t.upper)?o:e.MAX_KEY)]},u={get:e=>[i,new cS(e.key)],getMany:e=>[i,(new cS).addKeys(e.keys)],count:p,query:p,openCursor:p};return iP(u).forEach(e=>{c[e]=function(r){let{subscr:i}=sU;if(i){let c=e=>{let t=`idb://${n}/${a}/${e}`;return i[t]||(i[t]=new cS)},p=c(""),d=c(":dels"),[f,m]=u[e](r);if(c(f.name||"").add(m),!f.isPrimaryKey){if("count"!==e){let n="query"===e&&l&&r.values&&o.query({...r,values:!1});return o[e].apply(this,arguments).then(t=>{if("query"===e){if(l&&r.values)return n.then(({result:e})=>(p.addKeys(e),t));let e=r.values?t.result.map(s):t.result;r.values?p.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=r.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 cB{constructor(e,n){var t;this._middlewares={},this.verno=0;const a=cB.dependencies;this._options=n={addons:cB.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.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 r={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:s_,dbReadyPromise:null,cancelOpen:s_,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};r.dbReadyPromise=new sY(e=>{r.dbReadyResolve=e}),r.openCanceller=new sY((e,n)=>{r.cancelOpen=n}),this._state=r,this.name=e,this.on=lT(this,"populate","blocked","versionchange","close",{ready:[sE,s_]}),this.on.ready.subscribe=iH(this.on.ready.subscribe,e=>(n,t)=>{cB.vip(()=>{let a=this._state;if(a.openComplete)a.dbOpenError||sY.resolve().then(n),t&&e(n);else if(a.onReadyBeingFired)a.onReadyBeingFired.push(n),t&&e(n);else{e(n);let a=this;t||e(function e(){a.on.ready.unsubscribe(n),a.on.ready.unsubscribe(e)})}})}),this.Collection=(t=this,lB(lq.prototype,function(e,n){this.db=t;let a=lz,o=null;if(n)try{a=n()}catch(e){o=e}let r=e._ctx,i=r.table,s=i.hook.reading.fire;this._ctx={table:i,index:r.index,isPrimKey:!r.index||i.schema.primKey.keyPath&&r.index===i.schema.primKey.name,range:a,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:r.or,valueMapper:s!==sv?s:null}})),this.Table=function(e){return lB(lP.prototype,function(n,t,a){this.db=e,this._tx=a,this.name=n,this.schema=t,this.hook=e._allTables[n]?e._allTables[n].hook:lT(null,{creating:[sk,s_],reading:[s$,sv],updating:[sx,s_],deleting:[sw,s_]})})}(this),this.Transaction=function(e){return lB(l8.prototype,function(n,t,a,o,r){this.db=e,this.mode=n,this.storeNames=t,this.schema=a,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lT(this,"complete","error","abort"),this.parent=r||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 sY((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(),lb(e)})})}(this),this.Version=function(e){return lB(ch.prototype,function(n){this.db=e,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lB(l1.prototype,function(n,t,a){this.db=e,this._ctx={table:n,index:":id"===t?null:t,or:a};let o=e._deps.indexedDB;if(!o)throw new sg.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=cn(n.IDBKeyRange),this._createTransaction=(e,n,t,a)=>new this.Transaction(e,n,t,this._options.chromeTransactionDurability,a),this._fireOnBlocked=e=>{this.on("blocked").fire(e),lw.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(n=>n.on("versionchange").fire(e))},this.use(cA),this.use(cw),this.use(cT),this.use(cC),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new sg.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new sg.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(cc),t.stores({}),this._state.autoSchema=!1,t)}_whenReady(e){return this.idbdb&&(this._state.openComplete||sU.letThrough||this._vip)?e():new sY((e,n)=>{if(this._state.openComplete)return n(new sg.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void n(new sg.DatabaseClosed);this.open().catch(s_)}this._state.dbReadyPromise.then(e,n)}).then(e)}use({stack:e,create:n,level:t,name:a}){a&&this.unuse({stack:e,name:a});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:n,level:null==t?10:t,name:a}),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:a}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?lb(t.dbOpenError):e);sa&&(t.openCanceller._stackHolder=si()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;let o=t.openCanceller;function r(){if(t.openCanceller!==o)throw new sg.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,l=!1;return sY.race([o,("u"<typeof navigator?sY.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 sY((n,o)=>{if(r(),!a)throw new sg.MissingAPI;let i=e.name,c=t.autoSchema?a.open(i):a.open(i,Math.round(10*e.verno));if(!c)throw new sg.MissingAPI;c.onerror=l2(o),c.onblocked=s7(e._fireOnBlocked),c.onupgradeneeded=s7(n=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=l3,s.abort(),c.result.close();let e=a.deleteDatabase(i);e.onsuccess=e.onerror=s7(()=>{o(new sg.NoSuchDatabase(`Database ${i} doesnt exist`))})}else{let t,a,i,d;s.onerror=l2(o);var r,p,u=n.oldVersion>0x4000000000000000?0:n.oldVersion;l=u<1,e._novip.idbdb=c.result,r=u/10,p=s,t=e._dbSchema,(a=e._createTransaction("readwrite",e._storeNames,t)).create(p),a._completion.catch(o),i=a._reject.bind(a),d=sU.transless||sU,lr(()=>{sU.trans=a,sU.transless=d,0===r?(iP(t).forEach(e=>{cu(p,e,t[e].primKey,t[e].indexes)}),ci(e,p),sY.follow(()=>e.on.populate.fire(a)).catch(i)):(function({_novip:e},n,t,a){let o=[],r=e._versions,i=e._dbSchema=cf(e,e.idbdb,a),s=!1;return r.filter(e=>e._cfg.version>=n).forEach(r=>{o.push(()=>{let o=i,l=r._cfg.dbschema;cm(e,o,a),cm(e,l,a),i=e._dbSchema=l;let c=cp(o,l);c.add.forEach(e=>{cu(a,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new sg.Upgrade("Not yet support for changing primary key");{let n=a.objectStore(e.name);e.add.forEach(e=>cd(n,e)),e.change.forEach(e=>{n.deleteIndex(e.name),cd(n,e)}),e.del.forEach(e=>n.deleteIndex(e))}});let p=r._cfg.contentUpgrade;if(p&&r._cfg.version>n){let n;ci(e,a),t._memoizedTables={},s=!0;let r=iQ(l);c.del.forEach(e=>{r[e]=o[e]}),cl(e,[e.Transaction.prototype]),cs(e,[e.Transaction.prototype],iP(r),r),t.schema=r;let i=st(p);i&&li();let u=sY.follow(()=>{if((n=p(t))&&i){var e=ls.bind(null,null);n.then(e,e)}});return n&&"function"==typeof n.then?sY.resolve(n):u.then(()=>n)}}),o.push(n=>{var a;s&&lx||(a=r._cfg.dbschema,[].slice.call(n.db.objectStoreNames).forEach(e=>null==a[e]&&n.db.deleteObjectStore(e))),cl(e,[e.Transaction.prototype]),cs(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),t.schema=e._dbSchema})}),(function e(){return o.length?sY.resolve(o.shift()(t.idbtrans)).then(e):sY.resolve()})().then(()=>{var e;iP(e=i).forEach(n=>{a.db.objectStoreNames.contains(n)||cu(a,n,e[n].primKey,e[n].indexes)})})})(e,r,a,p).catch(i)})}},o),c.onsuccess=s7(()=>{s=null;let a=e._novip.idbdb=c.result,o=iq(a.objectStoreNames);if(o.length>0)try{let n,r=a.transaction(1===o.length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},n,t){e.verno=n.version/10;let a=e._dbSchema=cf(0,n,t);e._storeNames=iq(n.objectStoreNames,0),cs(e,[e._allTables],iP(a),a)}(e,a,r):(cm(e,e._dbSchema,r),((n=cp(cf(0,e.idbdb,r),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.")),ci(e,r)}catch(e){}lw.push(e),a.onversionchange=s7(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),a.onclose=s7(n=>{e.on("close").fire(n)}),l&&function({indexedDB:e,IDBKeyRange:n},t){cy(e)||t===lE||cg(e,n).put({name:t}).catch(s_)}(e._deps,i),n()},o)}))]).then(()=>(r(),t.onReadyBeingFired=[],sY.resolve(cb(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let a=t.onReadyBeingFired.reduce(sE,s_);return t.onReadyBeingFired=[],sY.resolve(cb(()=>a(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(),lb(n)}).finally(()=>{t.openComplete=!0,i()})}(this)}_close(){let e=this._state,n=lw.indexOf(this);if(n>=0&&lw.splice(n,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sY(n=>{e.dbReadyResolve=n}),e.openCanceller=new sY((n,t)=>{e.cancelOpen=t})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new sg.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,n=this._state;return new sY((t,a)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=s7(()=>{!function({indexedDB:e,IDBKeyRange:n},t){cy(e)||t===lE||cg(e,n).delete(t).catch(s_)}(this._deps,this.name),t()}),e.onerror=l2(a),e.onblocked=this._fireOnBlocked};if(e)throw new sg.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 iP(this._allTables).map(e=>this._allTables[e])}transaction(){let e=cv.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,n,t){let a,o,r=sU.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=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===lS)a=lS;else{if("rw"!=e&&e!=lD)throw new sg.InvalidArgument("Invalid transaction mode: "+e);a=lD}if(r){if(r.mode===lS&&a===lD){if(!i)throw new sg.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&o.forEach(e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!i)throw new sg.SubTransaction("Table "+e+" not included in parent transaction.");r=null}}),i&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,(n,t)=>{t(e)}):lb(e)}let s=(function e(n,t,a,o,r){return sY.resolve().then(()=>{let i,s=sU.transless||sU,l=n._createTransaction(t,a,n._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),n._state.PR1398_maxLoop=3}catch(o){return o.name===sh.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,a,null,r))):lb(o)}let c=st(r);c&&li();let p=sY.follow(()=>{if(i=r.call(l,l))if(c){var e=ls.bind(null,null);i.then(e,e)}else"function"==typeof i.next&&"function"==typeof i.throw&&(i=c_(i))},{trans:l,transless:s});return(i&&"function"==typeof i.then?sY.resolve(i).then(e=>l.active?e:lb(new sg.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),lb(e)))})}).bind(null,this,a,o,r,t);return r?r._promise(a,s,"lock"):sU.trans?lf(sU.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!ij(this._allTables,e))throw new sg.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let cI="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class cN{constructor(e){this._subscribe=e}subscribe(e,n,t){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:n,complete:t})}[cI](){return this}}function cj(e,n){return iP(n).forEach(t=>{cM(e[t]||(e[t]=new cS),n[t])}),e}try{o={indexedDB:iO.indexedDB||iO.mozIndexedDB||iO.webkitIndexedDB||iO.msIndexedDB,IDBKeyRange:iO.IDBKeyRange||iO.webkitIDBKeyRange}}catch(e){o={indexedDB:null,IDBKeyRange:null}}function cR(e){let n=cF;try{cF=!0,l6.storagemutated.fire(e)}finally{cF=n}}iR(cB,{...sb,delete:e=>new cB(e,{addons:[]}).delete(),exists:e=>new cB(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:n}){return cy(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==lE)):cg(e,n).toCollection().primaryKeys()})(cB.dependencies).then(e)}catch(e){return lb(new sg.MissingAPI)}},defineClass:()=>function(e){iB(this,e)},ignoreTransaction:e=>sU.trans?lf(sU.transless,e):e(),vip:cb,async:function(e){return function(){try{var n=c_(e.apply(this,arguments));return n&&"function"==typeof n.then?n:sY.resolve(n)}catch(e){return lb(e)}}},spawn:function(e,n,t){try{var a=c_(e.apply(t,n||[]));return a&&"function"==typeof a.then?a:sY.resolve(a)}catch(e){return lb(e)}},currentTransaction:{get:()=>sU.trans||null},waitFor:function(e,n){let t=sY.resolve("function"==typeof e?cB.ignoreTransaction(e):e).timeout(n||6e4);return sU.trans?sU.trans.waitFor(t):t},Promise:sY,debug:{get:()=>sa,set:e=>{sa=e,so="dexie"===e?()=>!0:lC}},derive:iW,extend:iB,props:iR,override:iH,Events:lT,on:l6,liveQuery:function(e){let n,t=!1,a=new cN(a=>{let o=st(e),r=!1,i={},s={},l={get closed(){return r},unsubscribe:()=>{r=!0,l6.storagemutated.unsubscribe(d)}};a.start&&a.start(l);let c=!1,p=!1;function u(){return iP(s).some(e=>i[e]&&function(e,n){let t=cz(n),a=t.next();if(a.done)return!1;let o=a.value,r=cz(e),i=r.next(o.from),s=i.value;for(;!a.done&&!i.done;){if(0>=lG(s.from,o.to)&&lG(s.to,o.from)>=0)return!0;0>lG(o.from,s.from)?o=(a=t.next(s.from)).value:s=(i=r.next(o.from)).value}return!1}(i[e],s[e]))}let d=e=>{cj(i,e),u()&&f()},f=()=>{let m,h;if(c||r)return;i={};let g={},y=(o&&li(),m=()=>lr(e,{subscr:g,trans:null}),h=sU.trans?lf(sU.transless,m):m(),o&&h.then(ls,ls),h);p||(l6(l5,d),p=!0),c=!0,Promise.resolve(y).then(e=>{t=!0,n=e,c=!1,r||(u()?f():(i={},s=g,a.next&&a.next(e)))},e=>{c=!1,t=!1,a.error&&a.error(e),l.unsubscribe()})};return f(),l});return a.hasValue=()=>t,a.getValue=()=>n,a},extendObservabilitySet:cj,getByKeyPath:iZ,setByKeyPath:iX,delByKeyPath:function(e,n){"string"==typeof n?iX(e,n,void 0):"length"in n&&[].map.call(n,function(n){iX(e,n,void 0)})},shallowClone:iQ,deepClone:i4,getObjectDiff:ck,cmp:lG,asap:iY,minKey:l$,addons:[],connections:lw,errnames:sh,dependencies:o,semVer:l_,version:l_.split(".").map(e=>parseInt(e)).reduce((e,n,t)=>e+n/Math.pow(10,2*t))}),cB.maxKey=cn(cB.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(l6(l5,e=>{if(!cF){let n;lx?(n=document.createEvent("CustomEvent")).initCustomEvent(l4,!0,!0,e):n=new CustomEvent(l4,{detail:e}),cF=!0,dispatchEvent(n),cF=!1}}),addEventListener(l4,({detail:e})=>{cF||cR(e)}));let cF=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(l4);"function"==typeof e.unref&&e.unref(),l6(l5,n=>{cF||e.postMessage(n)}),e.onmessage=e=>{e.data&&cR(e.data)}}else if("u">typeof self&&"u">typeof navigator){l6(l5,e=>{try{cF||("u">typeof localStorage&&localStorage.setItem(l4,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:l4,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===l4){let n=JSON.parse(e.newValue);n&&cR(n.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===l4&&cR(e.changedParts)})}function cL(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}sY.rejectionMapper=function(e,n){if(!e||e instanceof su||e instanceof TypeError||e instanceof SyntaxError||!e.name||!sy[e.name])return e;var t=new sy[e.name](n||e.message,e);return"stack"in e&&iL(t,"stack",{get:function(){return this.inner.stack}}),t},so=lC;class cW extends cB{constructor(){super("EsmOffline"),cL(this,"syncQueue",void 0),cL(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 cG(){return new cW}let cV=new cW,cU={},cq=V("offline-synchronization",{});function cH(){return cq}async function cK(){if(cq.getState().synchronization)return;let e=await cV.syncQueue.count(),n={},t=Object.entries(cU),a=t.length,o={},r=new AbortController,i=()=>{let e=cq.getState().synchronization;cq.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{cq.setState({synchronization:{totalCount:e,pendingCount:e,abortController:r}});for(let e=0;e<a&&t.length>0;e++)for(let e=t.length;e--;){let[a,s]=t[e],l=s.dependsOn.map(e=>n[e]);l.every(Boolean)&&(o[a]={},await Promise.all(l),n[a]=cY(s,o,r,i),t.splice(e,1))}await Promise.allSettled(Object.values(n))}finally{cq.setState({synchronization:void 0})}}async function cY({type:e,dependsOn:n,process:t},a,o,r){let i=[],s=[],l=await cJ();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 r=await t(u,{abort:o,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:t})=>n.includes(t)?a[t][e]:void 0)});void 0!==d&&(a[e][d]=r),await cV.syncQueue.delete(p)}catch(e){await cV.syncQueue.update(p,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{r()}}}async function cJ(){let e=await oM();return e?.uuid||"*"}async function cZ(e,n,t,a){let o=a&&a.id;return void 0!==o&&await cV.syncQueue.where({type:n,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(cB.errnames.DatabaseClosed),await cV.syncQueue.add({type:n,content:t,userId:e,descriptor:a||{},createdOn:new Date}).catch(cB.errnames.DatabaseClosed,()=>-1)}async function cX(e,n,t){let a=await cJ();return await cZ(a,e,n,t)}async function cQ(e,n){return(await c0(e,n)).map(e=>e.content)}async function c0(e,n){return await cV.syncQueue.where(n?{type:n,userId:e}:{userId:e}).toArray().catch(cB.errnames.DatabaseClosed,()=>[])}async function c1(e){let n=await cJ();return await cQ(n,e)}async function c2(e){let n=await cJ();return await c0(n,e)}async function c3(e){return await cV.syncQueue.get(e).catch(cB.errnames.DatabaseClosed,()=>void 0)}function c5(e){return!!cU[e]?.options.onBeginEditSyncItem}async function c4(e){let n=await c3(e);if(!n)throw Error(`No sync item with the ID ${e} exists.`);let t=cU[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 c6(e){await cV.syncQueue.delete(e).catch(cB.errnames.DatabaseClosed)}function c8(e,n,t,a={}){cU[e]={type:e,dependsOn:n,process:t,options:a}}let c7="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),c9=new Uint8Array(16),pe=[];for(let e=0;e<256;++e)pe.push((e+256).toString(16).slice(1));let pn=function(e,n,t){if(c7&&!n&&!e)return c7();let a=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="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 r(c9)})();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n){t=t||0;for(let e=0;e<16;++e)n[t+e]=a[e];return n}return function(e,n=0){return pe[e[n+0]]+pe[e[n+1]]+pe[e[n+2]]+pe[e[n+3]]+"-"+pe[e[n+4]]+pe[e[n+5]]+"-"+pe[e[n+6]]+pe[e[n+7]]+"-"+pe[e[n+8]]+pe[e[n+9]]+"-"+pe[e[n+10]]+pe[e[n+11]]+pe[e[n+12]]+pe[e[n+13]]+pe[e[n+14]]+pe[e[n+15]]}(a)},pt="OFFLINE+";function pa(){return pt+pn()}function po(e){return e.startsWith(pt)}let pr={};function pi(){return Object.values(pr)}function ps(e){pr[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.`),pr[e.id]=e}async function pl(e){let n=await pg();return await pc(n,e)}async function pc(e,n){let t=new cW;return await t.dynamicOfflineData.where(n?{type:n,users:e}:{users:e}).toArray().catch(cB.errnames.DatabaseClosed,()=>[])}async function pp(e,n){let t=await pg();return await pu(t,e,n)}async function pu(e,n,t){let a=new cW,o=await a.dynamicOfflineData.get({type:n,identifier:t}).catch(cB.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await a.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(cB.errnames.DatabaseClosed):await a.dynamicOfflineData.add({users:[e],type:n,identifier:t}).catch(cB.errnames.DatabaseClosed)}async function pd(e,n){let t=await pg();return await pf(t,e,n)}async function pf(e,n,t){let a=new cW,o=await a.dynamicOfflineData.get({type:n,identifier:t,users:e}).catch(cB.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await a.dynamicOfflineData.update(o.id,{users:o.users.filter(n=>n!==e)}).catch(cB.errnames.DatabaseClosed):await a.dynamicOfflineData.delete(o.id).catch(cB.errnames.DatabaseClosed))}async function pm(e,n){let t=await pl(e);await Promise.all(t.map(async e=>ph(e.type,e.identifier,n)))}async function ph(e,n,t){await pp(e,n);let a=new cW,o=await pg(),r=await a.dynamicOfflineData.get({type:e,identifier:n}).catch(cB.errnames.DatabaseClosed,()=>void 0),i=pi().filter(n=>n.type===e);if(!r)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};r.id&&await a.dynamicOfflineData.update(r.id,{syncState:u}).catch(cB.errnames.DatabaseClosed)}async function pg(){let e=(await oM()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let py=V("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function pb(){return p$(),py}function p_(e,n){p$(),ps({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 pv(e){p$(),await ph("patient",e)}function p$(){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 pA(e,n,t=!0){if(e){let a=null,[o,r]=await Promise.all([o_(`${og}/Patient/${e}`,n).catch(e=>a=e),t?pk(e):Promise.resolve(null)]);if(o.ok)return o.data;if(r)return r;if(a)throw a}return null}async function pk(e){let n=(await c1("patient-registration")).find(n=>n.fhirPatient.id===e);return n?.fhirPatient??null}function pw(e,n){let t=new CustomEvent(`openmrs:${e}`,{detail:n??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(t)}function px(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 pC=t(56170);function pE(e){return{uuid:e.uuid,display:e.display}}function pS(e=null,n=null){let t=new URLSearchParams;e&&t.set("tag",e),n&&t.set("q",n);let a=t.toString();return ov(`${oh}/location${a?"?"+a:""}`).pipe((0,pC.map)(e=>e.data.results.map(pE))).pipe((0,pC.take)(1))}function pD(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pM(){return ov(`${oh}/visittype`).pipe((0,pC.map)(e=>e.data.results.map(pD))).pipe((0,pC.take)(1))}var pz=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),pO=((en={}).NOTSTARTED="notStarted",en.ONGOING="ongoing",en);let pP="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))",pT=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function pB(){return q("visit",pT)}function pI(e,n){pB().setState({patientUuid:e,manuallySetVisitUuid:n})}function pN(e,n){return o_(`${oh}/visit`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function pj(e,n,t){return o_(`${oh}/visit/${e}`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:n})}function pR(e,n,t){return o_(`${oh}/visit?patient=${e}&v=${t??pP}`,{signal:n.signal,method:"GET",headers:{"Content-type":"application/json"}})}pB().subscribe(e=>{var n;n=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(n))});let pF=new eo.BehaviorSubject(null);class pL{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+pL.version}static addUnaryOp(e){return pL.max_unop_len=Math.max(e.length,pL.max_unop_len),pL.unary_ops[e]=1,pL}static addBinaryOp(e,n,t){return pL.max_binop_len=Math.max(e.length,pL.max_binop_len),pL.binary_ops[e]=n,t?pL.right_associative.add(e):pL.right_associative.delete(e),pL}static addIdentifierChar(e){return pL.additional_identifier_chars.add(e),pL}static addLiteral(e,n){return pL.literals[e]=n,pL}static removeUnaryOp(e){return delete pL.unary_ops[e],e.length===pL.max_unop_len&&(pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops)),pL}static removeAllUnaryOps(){return pL.unary_ops={},pL.max_unop_len=0,pL}static removeIdentifierChar(e){return pL.additional_identifier_chars.delete(e),pL}static removeBinaryOp(e){return delete pL.binary_ops[e],e.length===pL.max_binop_len&&(pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops)),pL.right_associative.delete(e),pL}static removeAllBinaryOps(){return pL.binary_ops={},pL.max_binop_len=0,pL}static removeLiteral(e){return delete pL.literals[e],pL}static removeAllLiterals(){return pL.literals={},pL}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 pL(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 pL.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!pL.binary_ops[String.fromCharCode(e)]||pL.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return pL.isIdentifierStart(e)||pL.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(pL.hooks[e]){let t={context:this,node:n};return pL.hooks.run(e,t),t.node}return n}searchHook(e){if(pL.hooks[e]){let n={context:this};return pL.hooks[e].find(function(e){return e.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let e=this.code;for(;e===pL.SPACE_CODE||e===pL.TAB_CODE||e===pL.LF_CODE||e===pL.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:pL.COMPOUND,body:e};return this.runHook("after-all",n)}gobbleExpressions(e){let n=[],t,a;for(;this.index<this.expr.length;)if((t=this.code)===pL.SEMCOL_CODE||t===pL.COMMA_CODE)this.index++;else if(a=this.gobbleExpression())n.push(a);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,pL.max_binop_len),n=e.length;for(;n>0;){if(pL.binary_ops.hasOwnProperty(e)&&(!pL.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!pL.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,a,o,r,i,s,l;if(!(r=this.gobbleToken())||!(n=this.gobbleBinaryOp()))return r;for(o={value:n,prec:pL.binaryPrecedence(n),right_a:pL.right_associative.has(n)},(i=this.gobbleToken())||this.throwError("Expected expression after "+n),a=[r,o,i];n=this.gobbleBinaryOp();){if(0===(t=pL.binaryPrecedence(n))){this.index-=n.length;break}o={value:n,prec:t,right_a:pL.right_associative.has(n)},l=n;let s=e=>o.right_a&&e.right_a?t>e.prec:t<=e.prec;for(;a.length>2&&s(a[a.length-2]);)i=a.pop(),n=a.pop().value,r=a.pop(),e={type:pL.BINARY_EXP,operator:n,left:r,right:i},a.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),a.push(o,e)}for(s=a.length-1,e=a[s];s>1;)e={type:pL.BINARY_EXP,operator:a[s-1].value,left:a[s-2],right:e},s-=2;return e}gobbleToken(){let e,n,t,a;if(this.gobbleSpaces(),a=this.searchHook("gobble-token"))return this.runHook("after-token",a);if(e=this.code,pL.isDecimalDigit(e)||e===pL.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===pL.SQUOTE_CODE||e===pL.DQUOTE_CODE)a=this.gobbleStringLiteral();else if(e===pL.OBRACK_CODE)a=this.gobbleArray();else{for(t=(n=this.expr.substr(this.index,pL.max_unop_len)).length;t>0;){if(pL.unary_ops.hasOwnProperty(n)&&(!pL.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!pL.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:pL.UNARY_EXP,operator:n,argument:e,prefix:!0})}n=n.substr(0,--t)}pL.isIdentifierStart(e)?(a=this.gobbleIdentifier(),pL.literals.hasOwnProperty(a.name)?a={type:pL.LITERAL,value:pL.literals[a.name],raw:a.name}:a.name===pL.this_str&&(a={type:pL.THIS_EXP})):e===pL.OPAREN_CODE&&(a=this.gobbleGroup())}return a?(a=this.gobbleTokenProperty(a),this.runHook("after-token",a)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let n=this.code;for(;n===pL.PERIOD_CODE||n===pL.OBRACK_CODE||n===pL.OPAREN_CODE||n===pL.QUMARK_CODE;){let t;if(n===pL.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==pL.PERIOD_CODE)break;t=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===pL.OBRACK_CODE?((e={type:pL.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==pL.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===pL.OPAREN_CODE?e={type:pL.CALL_EXP,arguments:this.gobbleArguments(pL.CPAREN_CODE),callee:e}:(n===pL.PERIOD_CODE||t)&&(t&&this.index--,this.gobbleSpaces(),e={type:pL.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(;pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===pL.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);pL.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++));pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);pL.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return t=this.code,pL.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(t===pL.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===pL.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:pL.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",n=this.index,t=this.expr.charAt(this.index++),a=!1;for(;this.index<this.expr.length;){let n=this.expr.charAt(this.index++);if(n===t){a=!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 a||this.throwError('Unclosed quote after "'+e+'"'),{type:pL.LITERAL,value:e,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let e=this.code,n=this.index;for(pL.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,pL.isIdentifierPart(e))this.index++;else break;return{type:pL.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(e){let n=[],t=!1,a=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){t=!0,this.index++,e===pL.CPAREN_CODE&&a&&a>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===pL.COMMA_CODE){if(this.index++,++a!==n.length){if(e===pL.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===pL.CBRACK_CODE)for(let e=n.length;e<a;e++)n.push(null)}}else if(n.length!==a&&0!==a)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==pL.COMPOUND||this.throwError("Expected comma"),n.push(e)}}return t||this.throwError("Expected "+String.fromCharCode(e)),n}gobbleGroup(){this.index++;let e=this.gobbleExpressions(pL.CPAREN_CODE);if(this.code===pL.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:pL.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:pL.ARRAY_EXP,elements:this.gobbleArguments(pL.CBRACK_CODE)}}}Object.assign(pL,{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)})}}(pL),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"}),pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops),pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops);let pW=e=>new pL(e).parse(),pG=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(pL).filter(e=>!pG.includes(e)&&void 0===pW[e]).forEach(e=>{pW[e]=pL[e]}),pW.Jsep=pL,pW.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,a=this.gobbleExpression();if(a||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:a,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let a=t;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;n.node.test=a.right,a.right=n.node,n.node=t}}else this.throwError("Expected :")}})}});let pV="ArrowFunctionExpression",pU={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)}},pq={...pU,Promise};function pH(e,n={}){return pQ(e,n,p2)}async function pK(e,n={}){return p0(e,n,p2)}function pY(e,n={}){return pQ(e,n,p3)}function pJ(e,n={}){return p0(e,n,p3)}function pZ(e,n={}){return pQ(e,n,p5)}function pX(e,n={}){return p0(e,n,p5)}function pQ(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 a=p8(n,pU),o=p4("string"==typeof e?pW(e):e,a);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 p0(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 a=p8(n,pq);return Promise.resolve(p4("string"==typeof e?pW(e):e,a)).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 p1(e){return pW(e)}function p2(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function p3(e){return"boolean"==typeof e}function p5(e){return"number"==typeof e}function p4(e,n){switch(e.type){case"UnaryExpression":var t,a,o,r,i,s,l,c,p,u,d,f,m=e,h=n;let g=p4(m.argument,h);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var y=e,b=n;let v=p4(y.left,b),$=p4(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,a=n,p4(t.test,a)?p4(t.consequent,a):p4(t.alternate,a);case"CallExpression":var A=e,k=n;let w=A.arguments?.map(p7(k)),x=p4(A.callee,k);if(x){if("function"!=typeof x)throw`${ue(A.callee)} is not a function`}else throw`No function named ${ue(A.callee)} is defined in this context`;return x(...w);case"ArrowFunctionExpression":let C;return o=e,r=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,a)=>{let o=e[a];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 p4(o.body,r.addVariables(n))}).bind(r.thisObj??null);case"MemberExpression":return function(e,n){let t,a=p4(e.object,n);if(void 0===a)switch(e.object.type){case"Identifier":{let t=p6(e.object,n);throw ReferenceError(`ReferenceError: ${t} is not defined`)}case"MemberExpression":{let t=p6(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=a;if("string"==typeof a)o=String.prototype;else if("number"==typeof a)o=Number.prototype;else if("function"==typeof a);else if("object"!=typeof a)throw`VisitMemberExpression does not support member access on type ${typeof a}`;switch(n.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":t=p4(e.property,n);break;default:{let o=p4(e.property,n);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};p9(o),t=a[o]}}return"function"==typeof t?t.bind(a):t}(e,n);case"ArrayExpression":return i=e,s=n,i.elements?.map(p7(s));case"SequenceExpression":let E;return l=e,c=n,(E=l.expressions.map(p7(c)))[E.length-1];case"NewExpression":var S=e,D=n;if(S.callee&&"Identifier"===S.callee.type){let e=S.arguments?.map(p7(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 p9((p=e).value),p.value;case"Identifier":var M=e,z=n;p9(M.name);let O=z.thisObj;if(O&&("object"==typeof O||"function"==typeof O)&&M.name in O){let e=O[M.name];return p9(e),e}if(z.variables&&M.name in z.variables){let e=z.variables[M.name];return p9(e),e}return M.name in z.globals?z.globals[M.name]:void 0;case"TemplateLiteral":let P,T;return u=e,d=n,P=u.expressions?.map(p7(d))??[],(T=u.quasis?.map(p7(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+T.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 p6(e,n){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return p6(e.property,n);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function p8(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 p7(e){return function(n){return null===n?null:p4(n,e)}}function p9(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function ue(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function un(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:{...pq},isLocalExpression:!1,variables:new Set};return ut("string"==typeof e?pW(e):e,n),[...n.variables]}function ut(e,n){switch(e.type){case"UnaryExpression":return a=e,o=n,ut(a.argument,o);case"BinaryExpression":return r=e,i=n,[ut(r.left,i),ut(r.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=n,[ut(s.consequent,l),ut(s.test,l),ut(s.alternate,l)].filter(Boolean);case"CallExpression":let t;return c=e,p=n,t=ut(c.callee,p),c.arguments?.map(ua(p)),t;case"ArrowFunctionExpression":var a,o,r,i,s,l,c,p,u,d,f,m,h,g,y,b,v,$,A=e,k=n;let w={...k};w.isLocalExpression=!0;let x=A.params?.map(ua(w))??[],C=ut(A.body,w)??[];if(C&&Array.isArray(C))for(let e of C)x.includes(e)||k.variables.add(e);return;case"MemberExpression":let E;return u=e,d=n,ut(u.object,d),void((E={...d}).isLocalExpression=!0,ut(u.property,E));case"ArrayExpression":return f=e,m=n,void f.elements?.map(ua(m));case"SequenceExpression":return h=e,g=n,void h.expressions?.map(ua(g));case"NewExpression":return y=e,b=n,void y.arguments?.map(ua(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(ua($)),v.quasis?.map(ua($)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ua(e){return function(n){return null===n?null:ut(n,e)}}pW.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)})}}),pW.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 a=n.node;for(;a.type===e.MEMBER_EXP||a.type===e.CALL_EXP&&a.callee.type===e.MEMBER_EXP;)a=a.type===e.MEMBER_EXP?a.object:a.callee.object;a.type="NewExpression"}})}}),pW.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,a="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:a+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(a+=this.expr.charAt(this.index++),o());let r=this.char;("e"===r||"E"===r)&&(a+=this.expr.charAt(this.index++),("+"===(r=this.char)||"-"===r)&&(a+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+a+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+a+this.char+")");else if(i===e.PERIOD_CODE){a.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:a},null,2)}`),this.index=t;return}n.node={type:e.LITERAL,value:parseFloat(a),raw:this.expr.substring(t,this.index)}}e.hooks.add("gobble-token",function(a){if(48===this.code){var o,r,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,r=c,95===o||r.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,a);return}this.throwError("unexpected char within number")}a.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,a)})}}),pW.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(n){if(47===this.code){let t=++this.index,a=!1;for(;this.index<this.expr.length;){if(47===this.code&&!a){let a,o=this.expr.slice(t,this.index),r="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)r+=this.char;else break}try{a=new RegExp(o,r)}catch(e){this.throwError(e.message)}return n.node={type:e.LITERAL,value:a,raw:this.expr.slice(t-1,this.index)},n.node=this.gobbleTokenProperty(n.node),n.node}this.code===e.OBRACK_CODE?a=!0:a&&this.code===e.CBRACK_CODE&&(a=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),pW.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,a=this.gobbleExpression();if(a||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:a,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let a=t;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;n.node.test=a.right,a.right=n.node,n.node=t}}else this.throwError("Expected :")}})}}),pW.plugins.register({name:"jsepTemplateLiteral",init(e){function n(e,t=!0){if(96===this.code){let n={type:"TemplateLiteral",quasis:[],expressions:[]},a="",o="",r=!1,i=this.expr.length,s=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:a},tail:r});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,r=!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="",a="",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":a+="\n";break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;default:a+=i}else a+=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})}}),pW.addBinaryOp("in",7),pW.addBinaryOp("??",1);let uo=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:",""),a=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${t}`)||"{}");e[t]={enabled:"true"===localStorage.getItem(n),...a}}return e}()});function ur(e,n,t){uo.setState(a=>({flags:{...a.flags,[e]:{enabled:a.flags[e]?.enabled??!1,label:n,description:t}}}))}function ui(){let e=uo.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 us(e){return uo.getState().flags[e].enabled}function ul(e,n){uo.subscribe(t=>{n(t.flags[e].enabled)})}function uc(e,n){uo.setState(t=>({flags:{...t.flags,[e]:{...t.flags[e],enabled:n}}}))}function up(e){return!window.offlineEnabled||(e??navigator.onLine)}uo.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 uu=e8(function(e,n,t){eZ(e,n,t)});function ud(e=!0,n=!1){return uf(up(),e,n)}function uf(e,n=!0,t=!1){return!!(e?n:t)}let um=V("extensionsInternal",{slots:{},extensions:{}}),uh=()=>q("extensionsInternal",{slots:{},extensions:{}});function ug(e){let n=um.getState(),t=e(n);t!==n&&um.setState(t)}let uy=()=>q("extensions",{slots:{}});function ub(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});ne(nQ.getState().mountedExtensions,n)||nQ.setState({mountedExtensions:n})}ub(um.getState()),um.subscribe(ub);let u_=uh(),uv=uy(),u$=n1(),uA=n5();function uk(e,n,t,a,o){let r={},i=up(),s=Object.entries(a.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[a,l]of Object.entries(e.slots)){let{config:c}=n3(n,l.name),p=uT(a,e,c,t,s,i,o.session);r[a]={moduleName:l.moduleName,assignedExtensions:p}}ne(uv.getState().slots,r)||uv.setState({slots:r})}function uw(){uk(u_.getState(),u$.getState(),uA.getState(),uo.getState(),oA.getState())}function ux(e,n,t){return{moduleName:n,name:e,attachedIds:[],config:null,state:t}}function uC(e){let[n]=e.split("#");return n}function uE(e,n){let t=uC(n);return e.extensions[t]}function uS(e){return uE(u_.getState(),e)}u_.subscribe(e=>{uk(e,u$.getState(),uA.getState(),uo.getState(),oA.getState())}),u$.subscribe(e=>{uk(u_.getState(),e,uA.getState(),uo.getState(),oA.getState())}),uA.subscribe(e=>{uk(u_.getState(),u$.getState(),e,uo.getState(),oA.getState())}),uo.subscribe(e=>{uk(u_.getState(),u$.getState(),uA.getState(),e,oA.getState())}),oA.subscribe(e=>{uk(u_.getState(),u$.getState(),uA.getState(),uo.getState(),e)}),uw(),g(uw);let uD=e=>u_.setState(n=>(n.extensions[e.name]={...e,instances:[]},n));function uM(e,n){ug(t=>{let a=t.slots[e];return a?{...t,slots:{...t.slots,[e]:{...a,attachedIds:[...a.attachedIds,n]}}}:{...t,slots:{...t.slots,[e]:{...ux(e),attachedIds:[n]}}}})}function uz(e,n){ug(t=>{let a=t.slots[e];return a&&a.attachedIds.includes(n)?{...t,slots:{...t.slots,[e]:{...a,attachedIds:a.attachedIds.filter(e=>e!==n)}}}:t})}function uO(e){ug(n=>{let t=n.slots[e];return t?{...n,slots:{...n.slots,[e]:{...t,attachedIds:[]}}}:n})}function uP(e,n,t,a){let o=n.indexOf(e);if(-1!==o)return o;{if(void 0!==t)return 1e3+t;let n=a.indexOf(e);return -1!==n?2e3+n:-1}}function uT(e,n,t,a,o,r,i){let s=function(e,n){let t=e.add||[],a=e.remove||[],o=e.order||[],{extensions:r}=u_.getState();return[...n,...t].filter(e=>!a.includes(e)).sort((e,t)=>{let a=uP(e,o,r[uC(e)]?.order,n),i=uP(t,o,r[uC(t)]?.order,n);return -1===i?-1:-1===a?1:a-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}=n6(a,e,c),u=uu(s,n8(t,e,c)),d=uC(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||!oD(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(!pY(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&&!uf(r,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 uB(e){let n=u_.getState(),{config:t}=n2(e),a=uA.getState(),o=uo.getState(),r=oA.getState(),i=up();return uT(e,n,t,a,Object.entries(o.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),i,r.session)}let uI=(e,n,t)=>u_.setState(a=>{let o=a.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}.`),a;if(o&&o==e)return a;if(a.slots[n])return{...a,slots:{...a.slots,[n]:{...a.slots[n],moduleName:e,state:t}}};let r=ux(n,e,t);return{...a,slots:{...a.slots,[n]:{...r}}}});function uN(e,n,t=!1){u_.setState(a=>{let o=t?uu(a.slots[e].state,n):n;return{...a,slots:{...a.slots,[e]:{...a.slots[e],state:o}}}})}let uj=()=>uv.setState(()=>({slots:{},extensions:{}})),uR=V("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uF({name:e,basePath:n,mode:t,componentContext:a,state:o}){uR.setState({slotName:e,basePath:n,mode:t??"normal",componentContext:a,state:o})}function uL(e){uR.getState().slotName===e&&uR.setState(uR.getInitialState(),!0)}let uW=V("modalRegistry",{modals:{}});function uG(e){uW.setState(n=>(n.modals[e.name]=e,n))}function uV(e){let n=uW.getState().modals[e];if(!n){let t=uS(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.`),uG(n))}return n}let uU=V("workspaceRegistrations",{workspaces:{}}),uq=V("workspaceGroups",{workspaceGroups:{}});function uH(e){uU.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){uq.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 uY=new Set;function uJ(e){let n=uU.getState().workspaces;if(n[e])return n[e];{let n=uS(e);if(n){var t;let a;return uY.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.`),uY.add(e)),{name:n.name,title:(t=n,"string"==typeof(a=t?.meta?.title)?a:a&&"object"==typeof a?rb(t.moduleName,a.key,a.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 uZ(e){let n=uq.getState().workspaceGroups;if(n[e])return n[e];throw Error(`No workspace group named '${e}' has been registered.`)}let uX=V("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function uQ(e){let{registeredWorkspacesByName:n,registeredWindowsByName:t}=uX.getState(),a=n[e];if(a){let n=t[a.window];if(n)return n;throw Error(`No workspace window found with name: ${a.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u0(e){let{registeredGroupsByName:n,registeredWindowsByName:t}=uX.getState(),a=t[e];if(a){let t=n[a.group];if(t)return t;throw Error(`No workspace group found with name: ${a.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u1(e){let{openedWindows:n}=uX.getState();return n.findIndex(n=>n.openedWorkspaces.find(n=>n.workspaceName===e))}function u2(e,n){if(0==n.length)return;let{registeredGroupsByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace group ${t.name} more than once`);a[t.name]={...t,moduleName:e}}uX.setState({registeredGroupsByName:a})}function u3(e,n){if(0==n.length)return;let{registeredWindowsByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace window ${t.name} more than once`);let n={...t,moduleName:e};a[t.name]=n}uX.setState({registeredWindowsByName:a})}function u5(e,n){if(0==n.length)return;let{registeredWorkspacesByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace ${t.name} more than once`);let n={...t,moduleName:e};a[t.name]=n}uX.setState({registeredWorkspacesByName:a})}let u4=0;async function u6(e,n,t,a,o=e=>e,r={}){let i=uC(a),s=uS(a),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(ud(u,d)){ug(o=>({...o,extensions:{...o.extensions,[i]:{...o.extensions[i],instances:[...o.extensions[i].instances,{domElement:e,id:a,slotName:n,slotModuleName:t}]}}}));let s=await f(),u=u4++;l=ay(o({...s,name:`${n}/${i}-${u}`}),{...r,_meta:c,_extensionContext:{extensionId:a,extensionSlotName:n,extensionSlotModuleName:t,extensionModuleName:p},domElement:e})}}else console.warn(`Tried to render ${a} into ${n} but no DOM element was available.`);return l}var u8=t(60695),u7=t.n(u8);let u9=(0,u8.createContext)({moduleName:"",featureName:""});function de({to:e,templateParams:n,onBeforeNavigate:t,children:a,...o}){return(0,u8.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}`)},[]),u7().createElement("a",{onClick:a=>{0===a.button&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey&&(a.preventDefault(),t?.(a),or({to:e,templateParams:n})),0===a.button&&(a.ctrlKey||a.metaKey)&&t?.(a),0===a.button&&a.shiftKey&&t?.(a),1===a.button&&t?.(a)},href:oa(e,n),...o},a)}let dn=({state:e,children:n,...t})=>{let{extension:a}=(0,u8.useContext)(u9),o=(0,u8.useRef)(null),r=(0,u8.useRef)(Promise.resolve()),i=(0,u8.useCallback)(n=>{a?.extensionSlotName&&a.extensionSlotModuleName&&a.extensionSlotModuleName&&!o.current&&u6(n,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,u8.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":r.current&&r.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,u8.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,r.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(r.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),a?u7().createElement("div",{ref:i,"data-extension-id":a?.extensionId,style:{position:"relative"},...t}):null};function dt(e,n){"function"==typeof n&&(n=n(e));let t={};for(let[a,o]of Object.entries(n)){let n=function(...n){e.setState(e=>o(e,...n))};t[a]=n}return t}let da=()=>e=>e;function dr(e,n=da(),t){let a=(0,u8.useCallback)(n=>e.subscribe(n),[e]),o=(0,u8.useCallback)(()=>n(e.getState()),[e,n]),r=(0,u8.useSyncExternalStore)(a,o,o),i=(0,u8.useMemo)(()=>t?dt(e,t):{},[e,t]);return{...r,...i}}function di(e,n){return dr(e,da(),n)}function ds(e){return function(n){let t=(0,u8.useCallback)(n=>e.subscribe(n),[]),a=(0,u8.useCallback)(()=>e.getState(),[]),o=(0,u8.useSyncExternalStore)(t,a,a),r=(0,u8.useMemo)(()=>n?dt(e,n):{},[n]);return{...o,...r}}}let dl=e=>dr(uy(),n=>n.slots?.[e]);function dc(e){let n=dl(e);return n?.assignedExtensions??[]}function dp(e,n){let{moduleName:t}=(0,u8.useContext)(u9),a=(0,u8.useRef)(!0);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,u8.useEffect)(()=>{uI(t,e,n),a.current=!1},[]),(0,u8.useEffect)(()=>{a.current||uN(e,n)},[e,n]),{extensions:dc(e),extensionSlotName:e,extensionSlotModuleName:t}}function du(e){return e}function dd({name:e,extensionSlotName:n,select:t=du,children:a,state:o,style:r,...i}){if(a&&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,u8.useRef)(null),{extensions:c,extensionSlotModuleName:p}=dp(s,o),u=(0,u8.useMemo)(()=>t(c),[t,c]),d=(0,u8.useMemo)(()=>{if("function"==typeof a&&!u7().isValidElement(a))return u.map(e=>a(e,o))},[a,u]);return u7().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":p,style:{...r,position:"relative"},...i},s&&u?.map((e,n)=>u7().createElement(u9.Provider,{key:e.id,value:{moduleName:p,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:p}}},d?.[n]??("function"!=typeof a?a:null)??u7().createElement(dn,{state:o}))))}var df=t(5338);function dm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dh(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dm(Object(t),!0).forEach(function(n){var a,o,r;a=e,o=n,r=t[n],o in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dg(e){return(dg="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 dy(e){return(dy="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 db(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(dy(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(dy(e)));return e}}var d_=null;try{d_=require("react").createContext()}catch(e){}var dv={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 d$(e,n){return e.rootComponent?Promise.resolve():e.loadRootComponent(n).then(function(n){e.rootComponent=n})}function dA(e,n){return new Promise(function(t,a){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,r=dC(e,n,function(){t(this)}),i=db(e,n)(),s=function(e){var n=e.reactDom,t=e.renderType,a=e.elementToRender,o=e.domElement,r=n[t];if("function"!=typeof r)throw Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=r(o);return i.render(a),i;case"hydrateRoot":return r(o,a);default:return r(a,o),null}}({elementToRender:r,domElement:i,reactDom:dx(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[n.name]=i,e.renderResults[n.name]=s})}function dk(e,n){return new Promise(function(t){e.unmountResolves[n.name]=t;var a=e.renderResults[n.name];a&&a.unmount?a.unmount():dx(e).unmountComponentAtNode(e.domElements[n.name]),delete e.domElements[n.name],delete e.renderResults[n.name]})}function dw(e,n){return new Promise(function(t){e.updateResolves[n.name]||(e.updateResolves[n.name]=[]),e.updateResolves[n.name].push(t);var a=dC(e,n,null),o=e.renderResults[n.name];if(o&&o.render)o.render(a);else{var r=db(e,n)();dx(e).render(a,r)}})}function dx(e){return e.ReactDOMClient||e.ReactDOM}function dC(e,n,t){var a=e.React.createElement(e.rootComponent,n),o=d_?e.React.createElement(d_.Provider,{value:n},a):a;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,dh(dh({},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 dE=t(70287),dS=t(59324),dD=t(32108);let dM={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},dz=new Map;(0,dD.initCache)(dz);let dO={errorRetryCount:3,fetcher:o_,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof o$){let n=e.response.status;return!!(n>=500)||401===n||403===n||429===n}return!0},provider:()=>dz};function dP(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let n=Object.assign({},dM,e),t={...dO,...n.swrConfig};return function(e){var a,o,r,i,s;return r=o=class extends(a=u7().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 u7().createElement("div",null,"An error has occurred. Please try reloading the page.");{let a=u7().createElement(u8.Suspense,{fallback:null},u7().createElement(dS.BE,{value:t},u7().createElement(u9.Provider,{value:this.state.config},n.disableTranslations?u7().createElement(e,this.props):u7().createElement(dE.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},u7().createElement(e,this.props)))));return n.strictMode&&u7().StrictMode?u7().createElement(u7().StrictMode,null,a):a}}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 r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,o}}function dT(e,n){return function(e){if("object"!==dg(e))throw Error("single-spa-react requires a configuration object");var n,t=dh(dh({},dv),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");!d_&&t.React.createContext&&(d_=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 a={bootstrap:d$.bind(null,t),mount:dA.bind(null,t),unmount:dk.bind(null,t)};return t.parcelCanUpdate&&(a.update=dw.bind(null,t)),a}({React:u7(),ReactDOMClient:df,rootComponent:dP(n)(e)})}function dB(e,n){return()=>e().then(({default:e})=>dT(e,n))}function dI(e,n){return()=>Promise.resolve(dT(e,n))}let dN=dB,dj=L()(()=>({}));U("openmrs-app-context",dj);let dR={};function dF(e,n=e=>e){let t=dj.getState();return e in t?Object.freeze(Object.assign({},n?n(t[e]):t[e])):null}function dL(e,n){dj.setState(t=>(e in t||(t[e]={}),t[e]=n(t[e]),Object.assign({},t)))}function dW(e){return null===e?null:Object.freeze(Object.assign({},e))}let dG=new Map;function dV(e,n){let t=(0,u8.useRef)(n??{}),a=(0,u8.useRef)(n=>dL(e,n)),o=(0,u8.useRef)(Symbol());return(0,u8.useEffect)(()=>{let t=n??{},a=o.current;return null===dF(e)?!function(e,n=dR){dj.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===dR?{}: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.`),dL(e,()=>t)),dG.set(e,a),()=>{dG.get(e)===a&&(dj.setState(n=>(e in n&&delete n[e],n)),dG.delete(e))}},[e]),(0,u8.useEffect)(()=>{let a=n??{};N(t.current,a)||(dL(e,()=>a),t.current=a)},[n]),a.current}function dU({namespace:e,value:n}){return dV(e,n),null}let dq=({children:e,value:n,fallback:t})=>n?u7().createElement(u7().Fragment,null,e):t?u7().createElement(u7().Fragment,null,t):null;function dH(){let e=(0,u8.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,u8.useEffect)(()=>{let n=e.current;return()=>n?.abort()},[]),e.current}function dK(e,n=e=>e??{}){let[t,a]=(0,u8.useState)(()=>{if(dY(e))return;let t=dF(e);if(null!==t)return n?n(t):t});return(0,u8.useEffect)(()=>{if(dY(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,u8.useEffect)(()=>{var t;let o;return(t=e=>{if(null==e)return void a(void 0);let t=n?n(e):e;a(e=>N(e,t)?e:t)})(dW(o=dF(e))),dj.subscribe(n=>{let a=e in n?n[e]:null;a!==o&&(o=a,t(dW(a)))})},[e,n]),t}function dY(e){return"string"!=typeof e||0===e.trim().length}function dJ(e){let[n,t]=(0,u8.useState)([]);return(0,u8.useEffect)(()=>uy().subscribe(a=>{let o=a.slots[e]?.assignedExtensions.map(e=>e.id)??[];ne(o,n)||t(o)}),[]),n}function dZ(e,n){let{data:t,error:a,mutate:o,isLoading:r,isValidating:i}=(0,dS.Ay)(`${r9}?patient=${e}&includeEncounterless=${n}`,o_);return(0,u8.useMemo)(()=>({isLoading:r,data:t?.data.results??[],error:a,mutate:o,isValidating:i}),[t,a,r,i,o])}function dX(e){(0,u8.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dQ={},d0=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
15
|
+
${this.stack}`}}let oA=V("session",{loaded:!1,session:null}),ok=0;function ow(e={includeAuthStatus:!0}){return(ok<Date.now()-6e4||!oA.getState().loaded)&&oE(),new eo.Observable(n=>{let t=t=>{t.loaded&&(e.includeAuthStatus?n.next(t.session):n.next(t.session?.user))};return t(oA.getState()),oA.subscribe(t)})}function ox(){return(ok<Date.now()-6e4||!oA.getState().loaded)&&oE(),oA}function oC(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 oE(e,n){ok=Date.now();let t={};return e&&n&&(t.Authorization=`Basic ${window.btoa(`${e}:${n}`)}`),oT(o_(oy,{headers:t}))}function oS(){oA.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oD(e,n){var t,a;if(void 0===n)return!e;if(!e)return!0;return t=e,a=n,("string"==typeof t?!Y(a.privileges.find(e=>t===e.display)):Array.isArray(t)?t.every(e=>!Y(a.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 oM(){let e,n;return new Promise(t=>{let a=a=>{a.loaded&&a.session.user&&(e=a.session.user,t(a.session.user),n&&n())};a(oA.getState()),e||(n=oA.subscribe(a))})}function oz(){return new Promise((e,n)=>{ow().subscribe(n=>{e(n.sessionLocation)},n).unsubscribe()})}async function oO(e,n){return oT(o_(oy,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal}))}async function oP(e,n,t){return t||(t=new AbortController),await o_(`${oh}/user/${e}`,{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:t.signal}),oE()}function oT(e){return new Promise((n,t)=>{e.then(e=>{let a;"object"==typeof e?.data?(a={loaded:!0,session:e.data},oA.setState(a),n(a)):(a={loaded:!1,session:null},oA.setState(a),t(a))}).catch(e=>{T(`Failed to fetch new session information: ${e}`);let n={loaded:!1,session:null};oA.setState(n),t(n)})})}function oB(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oA.subscribe(e=>{e.loaded&&e.session&&oC(e.session)});let oI={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function oN(){ta("@openmrs/esm-api",of),oE()}let oj={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"},oR=e=>"string"==typeof e,oF=()=>{let e,n,t=new Promise((t,a)=>{e=t,n=a});return t.resolve=e,t.reject=n,t},oL=e=>null==e?"":""+e,oW=/###/g,oG=e=>e&&e.indexOf("###")>-1?e.replace(oW,"."):e,oV=e=>!e||oR(e),oU=(e,n,t)=>{let a=oR(n)?n.split("."):n,o=0;for(;o<a.length-1;){if(oV(e))return{};let n=oG(a[o]);!e[n]&&t&&(e[n]=new t),e=Object.prototype.hasOwnProperty.call(e,n)?e[n]:{},++o}return oV(e)?{}:{obj:e,k:oG(a[o])}},oq=(e,n,t)=>{let{obj:a,k:o}=oU(e,n,Object);if(void 0!==a||1===n.length){a[o]=t;return}let r=n[n.length-1],i=n.slice(0,n.length-1),s=oU(e,i,Object);for(;void 0===s.obj&&i.length;)r=`${i[i.length-1]}.${r}`,s=oU(e,i=i.slice(0,i.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${r}`]&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=t},oH=(e,n)=>{let{obj:t,k:a}=oU(e,n);if(t&&Object.prototype.hasOwnProperty.call(t,a))return t[a]},oK=(e,n,t)=>{for(let a in n)"__proto__"!==a&&"constructor"!==a&&(a in e?oR(e[a])||e[a]instanceof String||oR(n[a])||n[a]instanceof String?t&&(e[a]=n[a]):oK(e[a],n[a],t):e[a]=n[a]);return e};var oY={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let oJ=e=>oR(e)?e.replace(/[&<>"'\/]/g,e=>oY[e]):e,oZ=[" ",",","?","!",";"],oX=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let n=this.regExpMap.get(e);if(void 0!==n)return n;let t=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,t),this.regExpQueue.push(e),t}}(20),oQ=(e,n,t=".")=>{if(!e)return;if(e[n]){if(!Object.prototype.hasOwnProperty.call(e,n))return;return e[n]}let a=n.split(t),o=e;for(let e=0;e<a.length;){let n;if(!o||"object"!=typeof o)return;let r="";for(let i=e;i<a.length;++i)if(i!==e&&(r+=t),r+=a[i],void 0!==(n=o[r])){if(["string","number","boolean"].indexOf(typeof n)>-1&&i<a.length-1)continue;e+=i-e+1;break}o=n}return o},o0=e=>e?.replace("_","-"),o1={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class o2{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||o1,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,t,a){return a&&!this.debug?null:(oR(e[0])&&(e[0]=`${t}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new o2(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new o2(this.logger,e)}}var o3=new o2;class o5{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let t=this.observers[e].get(n)||0;this.observers[e].set(n,t+1)}),this}off(e,n){if(this.observers[e]){if(!n)return void delete this.observers[e];this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,t])=>{for(let a=0;a<t;a++)e(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([t,a])=>{for(let o=0;o<a;o++)t.apply(t,[e,...n])})}}class o4 extends o5{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,t,a={}){let o,r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],t&&(Array.isArray(t)?o.push(...t):oR(t)&&r?o.push(...t.split(r)):o.push(t)));let s=oH(this.data,o);return(!s&&!n&&!t&&e.indexOf(".")>-1&&(e=o[0],n=o[1],t=o.slice(2).join(".")),!s&&i&&oR(t))?oQ(this.data?.[e]?.[n],t,r):s}addResource(e,n,t,a,o={silent:!1}){let r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=[e,n];t&&(i=i.concat(r?t.split(r):t)),e.indexOf(".")>-1&&(i=e.split("."),a=n,n=i[1]),this.addNamespaces(n),oq(this.data,i,a),o.silent||this.emit("added",e,n,t,a)}addResources(e,n,t,a={silent:!1}){for(let a in t)(oR(t[a])||Array.isArray(t[a]))&&this.addResource(e,n,a,t[a],{silent:!0});a.silent||this.emit("added",e,n,t)}addResourceBundle(e,n,t,a,o,r={silent:!1,skipCopy:!1}){let i=[e,n];e.indexOf(".")>-1&&(i=e.split("."),a=t,t=n,n=i[1]),this.addNamespaces(n);let s=oH(this.data,i)||{};r.skipCopy||(t=JSON.parse(JSON.stringify(t))),a?oK(s,t,o):s={...s,...t},oq(this.data,i,s),r.silent||this.emit("added",e,n,t)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return void 0!==this.getResource(e,n)}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(e=>n[e]&&Object.keys(n[e]).length>0)}toJSON(){return this.data}}var o6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,t,a,o){return e.forEach(e=>{n=this.processors[e]?.process(n,t,a,o)??n}),n}};let o8=Symbol("i18next/PATH_KEY");function o7(e,n){let t,a,o,{[o8]:r}=e((a=[],(o=Object.create(null)).get=(e,n)=>(t?.revoke?.(),n===o8)?a:(a.push(n),(t=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return r.join(n?.keySeparator??".")}let o9={},re=e=>!oR(e)&&"boolean"!=typeof e&&"number"!=typeof e;class rn extends o5{constructor(e,n={}){super(),((e,n,t)=>{e.forEach(e=>{n[e]&&(t[e]=n[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=o3.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){let t={...n};if(null==e)return!1;let a=this.resolve(e,t);if(a?.res===void 0)return!1;let o=re(a.res);return!1!==t.returnObjects||!o}extractFromKey(e,n){let t=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===t&&(t=":");let a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS||[],r=t&&e.indexOf(t)>-1,i=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!((e,n,t)=>{n=n||"",t=t||"";let a=oZ.filter(e=>0>n.indexOf(e)&&0>t.indexOf(e));if(0===a.length)return!0;let o=oX.getRegExp(`(${a.map(e=>"?"===e?"\\?":e).join("|")})`),r=!o.test(e);if(!r){let n=e.indexOf(t);n>0&&!o.test(e.substring(0,n))&&(r=!0)}return r})(e,t,a);if(r&&!i){let n=e.match(this.interpolator.nestingRegexp);if(n&&n.length>0)return{key:e,namespaces:oR(o)?[o]:o};let r=e.split(t);(t!==a||t===a&&this.options.ns.indexOf(r[0])>-1)&&(o=r.shift()),e=r.join(a)}return{key:e,namespaces:oR(o)?[o]:o}}translate(e,n,t){let a="object"==typeof n?{...n}:n;if("object"!=typeof a&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof a&&(a={...a}),a||(a={}),null==e)return"";"function"==typeof e&&(e=o7(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],a),l=s[s.length-1],c=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");let p=a.lng||this.language,u=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return u?o?{res:`${l}${c}${i}`,usedKey:i,exactUsedKey:i,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:`${l}${c}${i}`:o?{res:i,usedKey:i,exactUsedKey:i,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:i;let d=this.resolve(e,a),f=d?.res,m=d?.usedKey||i,h=d?.exactUsedKey||i,g=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==a.count&&!oR(a.count),v=rn.hasDefaultValue(a),$=b?this.pluralResolver.getSuffix(p,a.count,a):"",A=a.ordinal&&b?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",k=b&&!a.ordinal&&0===a.count,w=k&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${$}`]||a[`defaultValue${A}`]||a.defaultValue,x=f;y&&!f&&v&&(x=w);let C=re(x),E=Object.prototype.toString.apply(x);if(y&&x&&C&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(E)&&!(oR(g)&&Array.isArray(x))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,x,{...a,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(d.res=e,d.usedParams=this.getUsedParamsDetails(a),d):e}if(r){let e=Array.isArray(x),n=e?[]:{},t=e?h:m;for(let e in x)if(Object.prototype.hasOwnProperty.call(x,e)){let o=`${t}${r}${e}`;v&&!f?n[e]=this.translate(o,{...a,defaultValue:re(w)?w[e]:void 0,...{joinArrays:!1,ns:s}}):n[e]=this.translate(o,{...a,joinArrays:!1,ns:s}),n[e]===o&&(n[e]=x[e])}f=n}}else if(y&&oR(g)&&Array.isArray(f))(f=f.join(g))&&(f=this.extendTranslation(f,e,a,t));else{let n=!1,o=!1;!this.isValidLookup(f)&&v&&(n=!0,f=w),this.isValidLookup(f)||(o=!0,f=i);let s=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,u=v&&w!==f&&this.options.updateMissing;if(o||n||u){if(this.logger.log(u?"updateKey":"missingKey",p,l,i,u?w:f),r){let e=this.resolve(i,{...a,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let t=(e,n,t)=>{let o=v&&t!==f?t:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,u,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,u,a),this.emit("missingKey",e,l,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let n=this.pluralResolver.getSuffixes(e,a);k&&a[`defaultValue${this.options.pluralSeparator}zero`]&&0>n.indexOf(`${this.options.pluralSeparator}zero`)&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{t([e],i+n,a[`defaultValue${n}`]||w)})}):t(e,i,w))}f=this.extendTranslation(f,e,a,d,t),o&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${i}`),(o||n)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${i}`:i,n?f:void 0,a))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(a),d):f}extendTranslation(e,n,t,a,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...t},t.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!t.skipInterpolation){let r;t.interpolation&&this.interpolator.init({...t,...{interpolation:{...this.options.interpolation,...t.interpolation}}});let i=oR(e)&&(t?.interpolation?.skipOnVariables!==void 0?t.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let n=e.match(this.interpolator.nestingRegexp);r=n&&n.length}let s=t.replace&&!oR(t.replace)?t.replace:t;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,t.lng||this.language||a.usedLng,t),i){let n=e.match(this.interpolator.nestingRegexp);r<(n&&n.length)&&(t.nest=!1)}!t.lng&&a&&a.res&&(t.lng=this.language||a.usedLng),!1!==t.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||t.context?this.translate(...e,n):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${n[0]}`),null),t)),t.interpolation&&this.interpolator.reset()}let r=t.postProcess||this.options.postProcess,i=oR(r)?[r]:r;return null!=e&&i?.length&&!1!==t.applyPostProcessor&&(e=o6.handle(i,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(t)},...t}:t,this)),e}resolve(e,n={}){let t,a,o,r,i;return oR(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let s=this.extractFromKey(e,n),l=s.key;a=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let p=void 0!==n.count&&!oR(n.count),u=p&&!n.ordinal&&0===n.count,d=void 0!==n.context&&(oR(n.context)||"number"==typeof n.context)&&""!==n.context,f=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(e=>{this.isValidLookup(t)||(i=e,!o9[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(o9[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${a}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(a=>{let i;if(this.isValidLookup(t))return;r=a;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,a,e,n);else{let e;p&&(e=this.pluralResolver.getSuffix(a,n.count,n));let t=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+t)),d){let a=`${l}${this.options.contextSeparator||"_"}${n.context}`;s.push(a),p&&(n.ordinal&&0===e.indexOf(o)&&s.push(a+e.replace(o,this.options.pluralSeparator)),s.push(a+e),u&&s.push(a+t))}}for(;i=s.pop();)this.isValidLookup(t)||(o=i,t=this.getResource(a,e,i,n))}))})}),{res:t,usedKey:a,exactUsedKey:o,usedLng:r,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,n,t,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,t,a):this.resourceStore.getResource(e,n,t,a)}getUsedParamsDetails(e={}){let n=e.replace&&!oR(e.replace),t=n?e.replace:e;if(n&&void 0!==e.count&&(t.count=e.count),this.options.interpolation.defaultVariables&&(t={...this.options.interpolation.defaultVariables,...t}),!n)for(let e of(t={...t},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete t[e];return t}static hasDefaultValue(e){let n="defaultValue";for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n===t.substring(0,n.length)&&void 0!==e[t])return!0;return!1}}class rt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=o3.create("languageUtils")}getScriptPartFromCode(e){if(!(e=o0(e))||0>e.indexOf("-"))return null;let n=e.split("-");return 2===n.length||(n.pop(),"x"===n[n.length-1].toLowerCase())?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(!(e=o0(e))||0>e.indexOf("-"))return e;let n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(oR(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch(e){}return(n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n)?n:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let n;return e?(e.forEach(e=>{if(n)return;let t=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(t))&&(n=t)}),!n&&this.options.supportedLngs&&e.forEach(e=>{if(n)return;let t=this.getScriptPartFromCode(e);if(this.isSupportedCode(t))return n=t;let a=this.getLanguagePartFromCode(e);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(e=>{if(e===a||!(0>e.indexOf("-")&&0>a.indexOf("-"))&&(e.indexOf("-")>0&&0>a.indexOf("-")&&e.substring(0,e.indexOf("-"))===a||0===e.indexOf(a)&&a.length>1))return e})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}getFallbackCodes(e,n){if(!e)return[];if("function"==typeof e&&(e=e(n)),oR(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let t=e[n];return t||(t=e[this.getScriptPartFromCode(n)]),t||(t=e[this.formatLanguageCode(n)]),t||(t=e[this.getLanguagePartFromCode(n)]),t||(t=e.default),t||[]}toResolveHierarchy(e,n){let t=this.getFallbackCodes((!1===n?[]:n)||this.options.fallbackLng||[],e),a=[],o=e=>{e&&(this.isSupportedCode(e)?a.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return oR(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):oR(e)&&o(this.formatLanguageCode(e)),t.forEach(e=>{0>a.indexOf(e)&&o(this.formatLanguageCode(e))}),a}}let ra={zero:0,one:1,two:2,few:3,many:4,other:5},ro={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class rr{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=o3.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){let t,a=o0("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:a,type:o});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];try{t=new Intl.PluralRules(a,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ro;if(!e.match(/-|_/))return ro;let a=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(a,n)}return this.pluralRulesCache[r]=t,t}needsPlural(e,n={}){let t=this.getRule(e,n);return t||(t=this.getRule("dev",n)),t?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,t={}){return this.getSuffixes(e,t).map(e=>`${n}${e}`)}getSuffixes(e,n={}){let t=this.getRule(e,n);return(t||(t=this.getRule("dev",n)),t)?t.resolvedOptions().pluralCategories.sort((e,n)=>ra[e]-ra[n]).map(e=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,n,t={}){let a=this.getRule(e,t);return a?`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,t))}}let ri=(e,n,t,a=".",o=!0)=>{let r,i=void 0!==(r=oH(e,t))?r:oH(n,t);return!i&&o&&oR(t)&&void 0===(i=oQ(e,t,a))&&(i=oQ(n,t,a)),i};class rs{constructor(e={}){this.logger=o3.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:n,escapeValue:t,useRawValueToEscape:a,prefix:o,prefixEscaped:r,suffix:i,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:u,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==n?n:oJ,this.escapeValue=void 0===t||t,this.useRawValueToEscape=void 0!==a&&a,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):r||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):d||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):m||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,n)=>e?.source===n?(e.lastIndex=0,e):RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,t,a){let o,r,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=ri(n,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,t,{...a,...n,interpolationkey:e}):o}let o=e.split(this.formatSeparator),r=o.shift().trim(),i=o.join(this.formatSeparator).trim();return this.format(ri(n,s,r,this.options.keySeparator,this.options.ignoreJSONStructure),i,t,{...a,...n,interpolationkey:r})};this.resetRegExp();let c=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(n=>{for(i=0;o=n.regex.exec(e);){let t=o[1].trim();if(void 0===(r=l(t)))if("function"==typeof c){let n=c(e,o,a);r=oR(n)?n:""}else if(a&&Object.prototype.hasOwnProperty.call(a,t))r="";else if(p){r=o[0];continue}else this.logger.warn(`missed to pass in variable ${t} for interpolating ${e}`),r="";else oR(r)||this.useRawValueToEscape||(r=oL(r));let s=n.safeValue(r);if(e=e.replace(o[0],s),p?(n.regex.lastIndex+=r.length,n.regex.lastIndex-=o[0].length):n.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,n,t={}){let a,o,r,i=(e,n)=>{let t=this.nestingOptionsSeparator;if(0>e.indexOf(t))return e;let a=e.split(RegExp(`${t}[ ]*{`)),o=`{${a[1]}`;e=a[0];let i=(o=this.interpolate(o,r)).match(/'/g),s=o.match(/"/g);((i?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),n&&(r={...n,...r})}catch(n){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,n),`${e}${t}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let s=[];(r=(r={...t}).replace&&!oR(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;let l=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(-1!==l&&(s=a[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,l)),(o=n(i.call(this,a[1].trim(),r),r))&&a[0]===e&&!oR(o))return o;oR(o)||(o=oL(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,n)=>this.format(e,n,t.lng,{...t,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}let rl=e=>{let n={};return(t,a,o)=>{let r=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(r={...r,[o.interpolationkey]:void 0});let i=a+JSON.stringify(r),s=n[i];return s||(s=e(o0(a),o),n[i]=s),s(t)}},rc=e=>(n,t,a)=>e(o0(t),a)(n);class rp{constructor(e={}){this.logger=o3.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";let t=n.cacheInBuiltFormats?rl:rc;this.formats={number:t((e,n)=>{let t=new Intl.NumberFormat(e,{...n});return e=>t.format(e)}),currency:t((e,n)=>{let t=new Intl.NumberFormat(e,{...n,style:"currency"});return e=>t.format(e)}),datetime:t((e,n)=>{let t=new Intl.DateTimeFormat(e,{...n});return e=>t.format(e)}),relativetime:t((e,n)=>{let t=new Intl.RelativeTimeFormat(e,{...n});return e=>t.format(e,n.range||"day")}),list:t((e,n)=>{let t=new Intl.ListFormat(e,{...n});return e=>t.format(e)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=rl(n)}format(e,n,t,a={}){let o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,n)=>{let{formatName:o,formatOptions:r}=(e=>{let n=e.toLowerCase().trim(),t={};if(e.indexOf("(")>-1){let a=e.split("(");n=a[0].toLowerCase().trim();let o=a[1].substring(0,a[1].length-1);"currency"===n&&0>o.indexOf(":")?t.currency||(t.currency=o.trim()):"relativetime"===n&&0>o.indexOf(":")?t.range||(t.range=o.trim()):o.split(";").forEach(e=>{if(e){let[n,...a]=e.split(":"),o=a.join(":").trim().replace(/^'+|'+$/g,""),r=n.trim();t[r]||(t[r]=o),"false"===o&&(t[r]=!1),"true"===o&&(t[r]=!0),isNaN(o)||(t[r]=parseInt(o,10))}})}return{formatName:n,formatOptions:t}})(n);if(this.formats[o]){let n=e;try{let i=a?.formatParams?.[a.interpolationkey]||{},s=i.locale||i.lng||a.locale||a.lng||t;n=this.formats[o](e,s,{...r,...a,...i})}catch(e){this.logger.warn(e)}return n}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class ru extends o5{constructor(e,n,t,a={}){super(),this.backend=e,this.store=n,this.services=t,this.languageUtils=t.languageUtils,this.options=a,this.logger=o3.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(t,a.backend,a)}queueLoad(e,n,t,a){let o={},r={},i={},s={};return e.forEach(e=>{let a=!0;n.forEach(n=>{let i=`${e}|${n}`;!t.reload&&this.store.hasResourceBundle(e,n)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===r[i]&&(r[i]=!0):(this.state[i]=1,a=!1,void 0===r[i]&&(r[i]=!0),void 0===o[i]&&(o[i]=!0),void 0===s[n]&&(s[n]=!0)))}),a||(i[e]=!0)}),(Object.keys(o).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(r),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(s)}}loaded(e,n,t){let a=e.split("|"),o=a[0],r=a[1];n&&this.emit("failedLoading",o,r,n),!n&&t&&this.store.addResourceBundle(o,r,t,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&t&&(this.state[e]=0);let i={};this.queue.forEach(t=>{((e,n,t,a)=>{let{obj:o,k:r}=oU(e,n,Object);o[r]=o[r]||[],o[r].push(t)})(t.loaded,[o],r),void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--),n&&t.errors.push(n),0!==t.pendingCount||t.done||(Object.keys(t.loaded).forEach(e=>{i[e]||(i[e]={});let n=t.loaded[e];n.length&&n.forEach(n=>{void 0===i[e][n]&&(i[e][n]=!0)})}),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,n,t,a=0,o=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:n,fcName:t,tried:a,wait:o,callback:r});this.readingCalls++;let i=(i,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&s&&a<this.maxRetries?setTimeout(()=>{this.read.call(this,e,n,t,a+1,2*o,r)},o):r(i,s)},s=this.backend[t].bind(this.backend);if(2===s.length){try{let t=s(e,n);t&&"function"==typeof t.then?t.then(e=>i(null,e)).catch(i):i(null,t)}catch(e){i(e)}return}return s(e,n,i)}prepareLoading(e,n,t={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();oR(e)&&(e=this.languageUtils.toResolveHierarchy(e)),oR(n)&&(n=[n]);let o=this.queueLoad(e,n,t,a);if(!o.toLoad.length)return o.pending.length||a(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,n,t){this.prepareLoading(e,n,{},t)}reload(e,n,t){this.prepareLoading(e,n,{reload:!0},t)}loadOne(e,n=""){let t=e.split("|"),a=t[0],o=t[1];this.read(a,o,"read",void 0,void 0,(t,r)=>{t&&this.logger.warn(`${n}loading namespace ${o} for language ${a} failed`,t),!t&&r&&this.logger.log(`${n}loaded namespace ${o} for language ${a}`,r),this.loaded(e,t,r)})}saveMissing(e,n,t,a,o,r={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n))return void this.logger.warn(`did not save key "${t}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=t&&""!==t){if(this.backend?.create){let s={...r,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,n,t,a,s):l(e,n,t,a))&&"function"==typeof o.then?o.then(e=>i(null,e)).catch(i):i(null,o)}catch(e){i(e)}else l(e,n,t,a,i,s)}e&&e[0]&&this.store.addResource(e[0],n,t,a)}}}let rd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if("object"==typeof e[1]&&(n=e[1]),oR(e[1])&&(n.defaultValue=e[1]),oR(e[2])&&(n.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let t=e[3]||e[2];Object.keys(t).forEach(e=>{n[e]=t[e]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rf=e=>(oR(e.ns)&&(e.ns=[e.ns]),oR(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oR(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),rm=()=>{};class rh extends o5{constructor(e={},n){if(super(),this.options=rf(e),this.services={},this.logger=o3,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{"function"==typeof e[n]&&(e[n]=e[n].bind(e))})})(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),null==e.defaultNS&&e.ns&&(oR(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let t=rd();this.options={...t,...this.options,...rf(e)},this.options.interpolation={...t.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?o3.init(a(this.modules.logger),this.options):o3.init(null,this.options),e=this.modules.formatter?this.modules.formatter:rp;let n=new rt(this.options);this.store=new o4(this.options.resources,this.options);let o=this.services;o.logger=o3,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new rr(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==t.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===t.interpolation.format)&&(o.formatter=a(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new rs(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new ru(a(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...n)=>{this.emit(e,...n)}),this.modules.languageDetector&&(o.languageDetector=a(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=a(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new rn(this.services,this.options),this.translator.on("*",(e,...n)=>{this.emit(e,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=rm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...n)=>this.store[e](...n)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...n)=>(this.store[e](...n),this)});let o=oF(),r=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),o}loadResources(e,n=rm){let t=n,a=oR(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return t();let e=[],n=n=>{n&&"cimode"!==n&&this.services.languageUtils.toResolveHierarchy(n).forEach(n=>{"cimode"!==n&&0>e.indexOf(n)&&e.push(n)})};a?n(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>n(e)),this.options.preload?.forEach?.(e=>n(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,n,t){let a=oF();return"function"==typeof e&&(t=e,e=void 0),"function"==typeof n&&(t=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),t||(t=rm),this.services.backendConnector.reload(e,n,e=>{a.resolve(),t(e)}),a}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&o6.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;let t=oF();this.emit("languageChanging",e);let a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,r)=>{r?this.isLanguageChangingTo===e&&(a(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,t.resolve((...e)=>this.t(...e)),n&&n(o,(...e)=>this.t(...e))},r=n=>{e||n||!this.services.languageDetector||(n=[]);let t=oR(n)?n:n&&n[0],r=this.store.hasLanguageSomeTranslations(t)?t:this.services.languageUtils.getBestMatchFromCodes(oR(n)?[n]:n);r&&(this.language||a(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,e=>{o(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),t}getFixedT(e,n,t){let a=(e,n,...o)=>{let r,i;(r="object"!=typeof n?this.options.overloadTranslationOptionHandler([e,n].concat(o)):{...n}).lng=r.lng||a.lng,r.lngs=r.lngs||a.lngs,r.ns=r.ns||a.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||t||a.keyPrefix);let s=this.options.keySeparator||".";return r.keyPrefix&&Array.isArray(e)?i=e.map(e=>("function"==typeof e&&(e=o7(e,{...this.options,...n})),`${r.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=o7(e,{...this.options,...n})),i=r.keyPrefix?`${r.keyPrefix}${s}${e}`:e),this.t(i,r)};return oR(e)?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=t,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let t=n.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===t.toLowerCase())return!0;let r=(e,n)=>{let t=this.services.backendConnector.state[`${e}|${n}`];return -1===t||0===t||2===t};if(n.precheck){let e=n.precheck(this,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(t,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(t,e)&&(!a||r(o,e)))}loadNamespaces(e,n){let t=oF();return this.options.ns?(oR(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{t.resolve(),n&&n(e)}),t):(n&&n(),Promise.resolve())}loadLanguages(e,n){let t=oF();oR(e)&&(e=[e]);let a=this.options.preload||[],o=e.filter(e=>0>a.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{t.resolve(),n&&n(e)}),t):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let n=new Intl.Locale(e);if(n&&n.getTextInfo){let e=n.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let n=this.services?.languageUtils||new rt(rd());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){return new rh(e,n)}cloneInstance(e={},n=rm){let t=e.forkResourceStore;t&&delete e.forkResourceStore;let a={...this.options,...e,isClone:!0},o=new rh(a);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},t&&(o.store=new o4(Object.keys(this.store.data).reduce((e,n)=>(e[n]={...this.store.data[n]},e[n]=Object.keys(e[n]).reduce((t,a)=>(t[a]={...e[n][a]},t),e[n]),e),{}),a),o.services.resourceStore=o.store),o.translator=new rn(o.services,a),o.translator.on("*",(e,...n)=>{o.emit(e,...n)}),o.init(a,n),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let rg=rh.createInstance();rg.createInstance=rh.createInstance,rg.createInstance,rg.dir,rg.init,rg.loadResources,rg.reloadResources,rg.use,rg.changeLanguage,rg.getFixedT,rg.t,rg.exists,rg.setDefaultNamespace,rg.hasLoadedNamespace,rg.loadNamespaces,rg.loadLanguages;let ry=rg.default||rg;function rb(e,n,t,a){return ry.t(n,{ns:e,defaultValue:t,...a})}function r_(e,n,t){return oj[e]?rb("core",e,n??oj[e],t):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}ry.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let rv="import-map-override:",r$="import-map-overrides-disabled",rA="import-map-overrides:change",rk=!1,rw=null;async function rx(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),n=[];for(let t=0;t<e.length;t++){let a=e[t];try{if(a.src){let e=await fetch(a.src);n.push(await e.json())}else a.textContent&&n.push(JSON.parse(a.textContent))}catch(e){console.warn(`[import-maps] Failed to parse import map from script tag at index ${t}`,e)}}return rC(n)}function rC(e){let n={imports:{}};for(let t of e)t?.imports&&Object.assign(n.imports,t.imports);return n}function rE(){let e={};try{let n=rO();for(let t=0;t<localStorage.length;t++){let a=localStorage.key(t);if(a?.startsWith(rv)){let t=a.slice(rv.length);if(!n.includes(t)){let n=localStorage.getItem(a);n&&(e[t]=n)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function rS(){let e=await rx();return rk?rC([e,rw??rE()]):e}async function rD(){return rx()}async function rM(){return rk?rC([await rx(),rE()]):rx()}function rz(e){if(!rk)return{imports:{}};if(e){let e={};for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(rv)){let n=localStorage.getItem(t);n&&(e[t.slice(rv.length)]=n)}}return{imports:e}}return rE()}function rO(){if(!rk)return[];try{let e=localStorage.getItem(r$);if(e){let n=JSON.parse(e);if(Array.isArray(n))return n}}catch{}return[]}function rP(e){return!!rk&&rO().includes(e)}function rT(e,n){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(rv+e,n),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function rB(e){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(rv+e);let n=rO().filter(n=>n!==e);n.length>0?localStorage.setItem(r$,JSON.stringify(n)):localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function rI(){if(!rk)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(rv)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function rN(e){if(!rk)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let n=rO().filter(n=>n!==e);n.length>0?localStorage.setItem(r$,JSON.stringify(n)):localStorage.removeItem(r$),window.dispatchEvent(new CustomEvent(rA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let rj=!1;function rR(){!rj&&(rj=!0,(rk="development"===window.spaEnv)&&(rw=rE()))}function rF(e){return e.replace(/[\/\-@]/g,"_")}async function rL(e,n="./start",a){var o;let r,i=!a?.maxLoadingTime||a.maxLoadingTime<=0?6e5:a.maxLoadingTime;await Promise.race([rW(e,a?.importMap),new Promise((n,t)=>{r=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)})]),r&&clearTimeout(r);let s=rF(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 rW(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=rF(e);if(!window[t]){let t=n??await rG();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 a=t.imports[e];a.startsWith("./")&&(a=window.spaBase+a.substring(1));let o=e in rz().imports;try{return await new Promise((e,n)=>{!function(e,n,t){let a=document.head.querySelector(`script[src="${e}"]`),o=window[rV];if(o||(o=window[rV]=new Set([])),a)if(o.has(e)){let e,o,r;r=()=>{e&&a.removeEventListener("load",e),o&&a.removeEventListener("error",o)},e=()=>{r(),n(null)},o=e=>{r(),t(e.message)},a.addEventListener("load",e),a.addEventListener("error",o)}else console.warn(`Script at ${e} already loaded. Not loading it again.`),n(null);else{let a,r,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),a&&s.removeEventListener("load",a),r&&s.removeEventListener("error",r)},a=()=>{i(),n(null)},r=n=>{i();let a=`Failed to load script from ${e}`;console.error(a,n),t(n.message??a)},s.addEventListener("load",a),s.addEventListener("error",r),document.head.appendChild(s)}}(a,e,n)})}catch(e){return o&&D({kind:"error",title:r_("scriptLoadingFailed","Error: Script failed to load"),description:r_("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:a}),actionButtonLabel:r_("resetOverrides","Reset overrides"),onActionButtonClick(){rI(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function rG(){return rS()}let rV=Symbol("__openmrs_script_loading");function rU(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 rq(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&rU(n))}let rH="openmrs-routes:",rK="openmrs-routes:change",rY=!1,rJ=null;async function rZ(){let e=document.querySelectorAll("script[type='openmrs-routes']"),n=[];for(let t=0;t<e.length;t++){let a=e[t];try{let e;if(a.src){let n=await fetch(a.src);e=await n.json()}else a.textContent&&(e=JSON.parse(a.textContent));e&&rq(e)&&n.push(e)}catch(e){console.warn(`[route-maps] Failed to parse routes from script tag at index ${t}`,e)}}return rX(n)}function rX(e){let n={};for(let t of e)t&&"object"==typeof t&&Object.assign(n,t);return n}async function rQ(){let e={};try{let n=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(rH)){let e=localStorage.getItem(t);e&&n.push({moduleName:t.slice(rH.length),raw:e})}}for(let t of(await Promise.allSettled(n.map(async({moduleName:e,raw:n})=>{let t=JSON.parse(n);if(rU(t))return{moduleName:e,routes:t};if("string"==typeof t&&t.startsWith("http")){let n=await fetch(t),a=await n.json();if(rU(a))return{moduleName:e,routes:a};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 r0(){let e=await rZ();return rY?rX([e,rJ??await rQ()]):e}async function r1(){return rZ()}async function r2(){return rY?rX([await rZ(),await rQ()]):rZ()}function r3(){if(!rY)return{};let e={};try{for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(rH)){let n=localStorage.getItem(t);n&&(e[t.slice(rH.length)]=n)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function r5(e,n){if(!rY)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof n)if(n.startsWith("http"))localStorage.setItem(rH+e,JSON.stringify(n));else{let t=JSON.parse(n);if(!rU(t))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n);localStorage.setItem(rH+e,JSON.stringify(t))}else if(n instanceof URL)localStorage.setItem(rH+e,JSON.stringify(n.toString()));else{if(!rU(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(rH+e,JSON.stringify(n))}window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function r4(e){if(!rY)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(rH+e),window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function r6(){if(!rY)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(rH)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(rK))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let r8=null;function r7(){return r8||(r8=(rY="development"===window.spaEnv)?rQ().then(e=>{rJ=e}):Promise.resolve())}let r9=`${oh}/attachment`;function ie(e,n){return o_(`${r9}/${e}`,{signal:n.signal})}function it(e,n,t){return o_(`${r9}?patient=${e}&includeEncounterless=${n}`,{signal:t.signal})}async function ia(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)),o_(`${r9}`,{method:"POST",body:t})}function io(e,n){return o_(`${r9}/${e}`,{method:"DELETE",signal:n.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ir(e,n){return new Promise(function(t){var a=new MessageChannel;a.port1.onmessage=function(e){t(e.data)},e.postMessage(n,[a.port2])})}function ii(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function is(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var il=function(){var e=this;this.promise=new Promise(function(n,t){e.resolve=n,e.reject=t})};function ic(e,n){var t=location.href;return new URL(e,t).href===new URL(n,t).href}var ip=function(e,n){this.type=e,Object.assign(this,n)};function iu(e,n,t){return t?n?n(e):e:(e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e)}function id(){}var im={type:"SKIP_WAITING"};function ih(e,n){if(!n)return e&&e.then?e.then(id):Promise.resolve()}var ig=function(e){function n(n,t){var a,o;return void 0===t&&(t={}),(a=e.call(this)||this).nn={},a.tn=0,a.rn=new il,a.en=new il,a.on=new il,a.un=0,a.an=new Set,a.cn=function(){var e=a.fn,n=e.installing;a.tn>0||!ic(n.scriptURL,a.sn.toString())||performance.now()>a.un+6e4?(a.vn=n,e.removeEventListener("updatefound",a.cn)):(a.hn=n,a.an.add(n),a.rn.resolve(n)),++a.tn,n.addEventListener("statechange",a.ln)},a.ln=function(e){var n=a.fn,t=e.target,o=t.state,r=t===a.vn,i={sw:t,isExternal:r,originalEvent:e};!r&&a.mn&&(i.isUpdate=!0),a.dispatchEvent(new ip(o,i)),"installed"===o?a.wn=self.setTimeout(function(){"installed"===o&&n.waiting===t&&a.dispatchEvent(new ip("waiting",i))},200):"activating"===o&&(clearTimeout(a.wn),r||a.en.resolve(t))},a.dn=function(e){var n=a.hn,t=n!==navigator.serviceWorker.controller;a.dispatchEvent(new ip("controlling",{isExternal:t,originalEvent:e,sw:n,isUpdate:a.mn})),t||a.on.resolve(n)},o=function(e){var n=e.data,t=e.ports,o=e.source;return iu(a.getSW(),function(){a.an.has(o)&&a.dispatchEvent(new ip("message",{data:n,originalEvent:e,ports:t,sw:o}))})},a.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)}},a.sn=n,a.nn=t,navigator.serviceWorker.addEventListener("message",a.gn),a}n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var t,a,o=n.prototype;return o.register=function(e){var n=(void 0===e?{}:e).immediate,t=void 0!==n&&n;try{var a,o,r,i=this;return a=function(){if(!t&&"complete"!==document.readyState)return ih(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return i.mn=!!navigator.serviceWorker.controller,i.yn=i.pn(),iu(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&&ic(n.scriptURL,i.sn.toString())&&(i.hn=n,Promise.resolve().then(function(){i.dispatchEvent(new ip("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})},(r=a())&&r.then?r.then(o):o(r)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?ih(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 iu(this.getSW(),function(n){return ir(n,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ir(this.fn.waiting,im)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&ic(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 iu(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}}],ii(n.prototype,t),a&&ii(n,a),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 is(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)?is(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 iy(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 ig(e,n);return u=t.register().then(()=>t.controlling.then(()=>t))}function ib(){return u??Promise.resolve(void 0)}let i_="x-omrs-offline-response-body",iv="x-omrs-offline-response-status",i$="x-omrs-offline-caching-strategy";async function iA(e){let n=await ib();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 ik(){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 iw(){return!window.indexedDB}async function ix(){return new Promise(e=>{let n=indexedDB.open("test");n.onerror=()=>e(!0),n.onsuccess=()=>e(!1)})}async function iC(){return await ix()||await iw()||await ik()}let iE="openmrs3:offline-mode",iS="unavailable";function iD(){return{current:iS,notAvailable:"unavailable"===iS,active:"on"===iS}}function iM(e){"unavailable"!==iS&&"unavailable"!==e&&(localStorage.setItem(iE,"on"===e?"active":"disabled"),iS=e)}async function iz(){await iC()||(iS="active"===localStorage.getItem(iE)?"on":"off"),navigator.onLine}let iO="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iP=Object.keys,iT=Array.isArray;function iB(e,n){return"object"!=typeof n||iP(n).forEach(function(t){e[t]=n[t]}),e}"u"<typeof Promise||iO.Promise||(iO.Promise=Promise);let iI=Object.getPrototypeOf,iN={}.hasOwnProperty;function ij(e,n){return iN.call(e,n)}function iR(e,n){"function"==typeof n&&(n=n(iI(e))),("u"<typeof Reflect?iP:Reflect.ownKeys)(n).forEach(t=>{iL(e,t,n[t])})}let iF=Object.defineProperty;function iL(e,n,t,a){iF(e,n,iB(t&&ij(t,"get")&&"function"==typeof t.get?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},a))}function iW(e){return{from:function(n){return e.prototype=Object.create(n.prototype),iL(e.prototype,"constructor",e),{extend:iR.bind(null,e.prototype)}}}}let iG=Object.getOwnPropertyDescriptor;function iV(e,n){let t;return iG(e,n)||(t=iI(e))&&iV(t,n)}let iU=[].slice;function iq(e,n,t){return iU.call(e,n,t)}function iH(e,n){return n(e)}function iK(e){if(!e)throw Error("Assertion Failed")}function iY(e){iO.setImmediate?setImmediate(e):setTimeout(e,0)}function iJ(e,n){return e.reduce((e,t,a)=>{var o=n(t,a);return o&&(e[o[0]]=o[1]),e},{})}function iZ(e,n){if(ij(e,n))return e[n];if(!n)return e;if("string"!=typeof n){for(var t=[],a=0,o=n.length;a<o;++a){var r=iZ(e,n[a]);t.push(r)}return t}var i=n.indexOf(".");if(-1!==i){var s=e[n.substr(0,i)];return void 0===s?void 0:iZ(s,n.substr(i+1))}}function iX(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 a=0,o=n.length;a<o;++a)iX(e,n[a],t[a])}else{var r=n.indexOf(".");if(-1!==r){var i=n.substr(0,r),s=n.substr(r+1);if(""===s)void 0===t?iT(e)&&!isNaN(parseInt(i))?e.splice(i,1):delete e[i]:e[i]=t;else{var l=e[i];l&&ij(e,i)||(l=e[i]={}),iX(l,s,t)}}else void 0===t?iT(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function iQ(e){var n={};for(var t in e)ij(e,t)&&(n[t]=e[t]);return n}let i0=[].concat;function i1(e){return i0.apply([],e)}let i2="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(i1([8,16,32,64].map(e=>["Int","Uint","Float"].map(n=>n+e+"Array")))).filter(e=>iO[e]),i3=i2.map(e=>iO[e]);iJ(i2,e=>[e,!0]);let i5=null;function i4(e){i5="u">typeof WeakMap&&new WeakMap;let n=function e(n){if(!n||"object"!=typeof n)return n;let t=i5&&i5.get(n);if(t)return t;if(iT(n)){t=[],i5&&i5.set(n,t);for(var a=0,o=n.length;a<o;++a)t.push(e(n[a]))}else if(i3.indexOf(n.constructor)>=0)t=n;else{let a=iI(n);for(var r in t=a===Object.prototype?{}:Object.create(a),i5&&i5.set(n,t),n)ij(n,r)&&(t[r]=e(n[r]))}return t}(e);return i5=null,n}let{toString:i6}={};function i8(e){return i6.call(e).slice(8,-1)}let i7="u">typeof Symbol?Symbol.iterator:"@@iterator",i9="symbol"==typeof i7?function(e){var n;return null!=e&&(n=e[i7])&&n.apply(e)}:function(){return null},se={};function sn(e){var n,t,a,o;if(1==arguments.length){if(iT(e))return e.slice();if(this===se&&"string"==typeof e)return[e];if(o=i9(e)){for(t=[];!(a=o.next()).done;)t.push(a.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 st="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var sa="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),so=()=>!0;let sr=!Error("").stack;function si(){if(sr)try{throw si.arguments,Error()}catch(e){return e}return Error()}function ss(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(so).map(e=>"\n"+e).join("")):""}var sl=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(sl),sp={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 su(e,n){this._e=si(),this.name=e,this.message=n}function sd(e,n){return e+". Errors: "+Object.keys(n).map(e=>n[e].toString()).filter((e,n,t)=>t.indexOf(e)===n).join("\n")}function sf(e,n,t,a){this._e=si(),this.failures=n,this.failedKeys=a,this.successCount=t,this.message=sd(e,n)}function sm(e,n){this._e=si(),this.name="BulkError",this.failures=Object.keys(n).map(e=>n[e]),this.failuresByPos=n,this.message=sd(e,n)}iW(su).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ss(this._e,2))}},toString:function(){return this.name+": "+this.message}}),iW(sf).from(su),iW(sm).from(su);var sh=sc.reduce((e,n)=>(e[n]=n+"Error",e),{}),sg=sc.reduce((e,n)=>{var t=n+"Error";function a(e,a){this._e=si(),this.name=t,e?"string"==typeof e?(this.message=`${e}${a?"\n "+a:""}`,this.inner=a||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=sp[n]||t,this.inner=null)}return iW(a).from(su),e[n]=a,e},{});sg.Syntax=SyntaxError,sg.Type=TypeError,sg.Range=RangeError;var sy=sl.reduce((e,n)=>(e[n+"Error"]=sg[n],e),{}),sb=sc.reduce((e,n)=>(-1===["Syntax","Type","Range"].indexOf(n)&&(e[n+"Error"]=sg[n]),e),{});function s_(){}function sv(e){return e}function s$(e,n){return null==e||e===sv?n:function(t){return n(e(t))}}function sA(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function sk(e,n){return e===s_?n:function(){var t=e.apply(this,arguments);void 0!==t&&(arguments[0]=t);var a=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var r=n.apply(this,arguments);return a&&(this.onsuccess=this.onsuccess?sA(a,this.onsuccess):a),o&&(this.onerror=this.onerror?sA(o,this.onerror):o),void 0!==r?r:t}}function sw(e,n){return e===s_?n:function(){e.apply(this,arguments);var t=this.onsuccess,a=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?sA(t,this.onsuccess):t),a&&(this.onerror=this.onerror?sA(a,this.onerror):a)}}function sx(e,n){return e===s_?n:function(t){var a=e.apply(this,arguments);iB(t,a);var o=this.onsuccess,r=this.onerror;this.onsuccess=null,this.onerror=null;var i=n.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?sA(o,this.onsuccess):o),r&&(this.onerror=this.onerror?sA(r,this.onerror):r),void 0===a?void 0===i?void 0:i:iB(a,i)}}function sC(e,n){return e===s_?n:function(){return!1!==n.apply(this,arguments)&&e.apply(this,arguments)}}function sE(e,n){return e===s_?n:function(){var t=e.apply(this,arguments);if(t&&"function"==typeof t.then){for(var a=this,o=arguments.length,r=Array(o);o--;)r[o]=arguments[o];return t.then(function(){return n.apply(a,r)})}return n.apply(this,arguments)}}sb.ModifyError=sf,sb.DexieError=su,sb.BulkError=sm;var sS={};let[sD,sM,sz]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iI(e),e];let n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,iI(n),e]})(),sO=sM&&sM.then,sP=sD&&sD.constructor,sT=!!sz;var sB=!1,sI=sz?()=>{sz.then(s3)}:iO.setImmediate?setImmediate.bind(null,s3):iO.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{s3(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(s3,0)},sN=function(e,n){sq.push([e,n]),sR&&(sI(),sR=!1)},sj=!0,sR=!0,sF=[],sL=[],sW=null,sG=sv,sV={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ly,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{ly(e[0],e[1])}catch(e){}})}},sU=sV,sq=[],sH=0,sK=[];function sY(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=s_,this._lib=!1;var n=this._PSD=sU;if(sa&&(this._stackHolder=si(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==sS)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&sX(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 a=n._lib&&s5();t&&"function"==typeof t.then?e(n,(e,n)=>{t instanceof sY?t._then(e,n):t.then(e,n)}):(n._state=!0,n._value=t,sQ(n)),a&&s4()}},sX.bind(null,n))}catch(e){sX(n,e)}}(this,e)}let sJ={get:function(){var e=sU,n=la;function t(t,a){var o=!e.global&&(e!==sU||n!==la);let r=o&&!ls();var i=new sY((n,i)=>{s0(this,new sZ(lm(t,e,o,r),lm(a,e,o,r),n,i,e))});return sa&&s2(i,this),i}return t.prototype=sS,t},set:function(e){iL(this,"then",e&&e.prototype===sS?sJ:{get:function(){return e},set:sJ.set})}};function sZ(e,n,t,a,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=a,this.psd=o}function sX(e,n){if(sL.push(n),null===e._state){var t=e._lib&&s5();n=sG(n),e._state=!1,e._value=n,sa&&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,iL(n,"stack",{get:()=>sB?t&&(t.get?t.get.apply(n):t.value):e.stack})}),sF.some(n=>n._value===e._value)||sF.push(e),sQ(e),t&&s4()}}function sQ(e){var n=e._listeners;e._listeners=[];for(var t=0,a=n.length;t<a;++t)s0(e,n[t]);var o=e._PSD;--o.ref||o.finalize(),0===sH&&(++sH,sN(()=>{0==--sH&&s6()},[]))}function s0(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,++sH,sN(s1,[t,e,n])}else e._listeners.push(n)}function s1(e,n,t){try{sW=n;var a,o=n._value;n._state?a=e(o):(sL.length&&(sL=[]),a=e(o),-1===sL.indexOf(o)&&function(e){for(var n=sF.length;n;)if(sF[--n]._value===e._value)return void sF.splice(n,1)}(n)),t.resolve(a)}catch(e){t.reject(e)}finally{sW=null,0==--sH&&s6(),--t.psd.ref||t.psd.finalize()}}function s2(e,n){var t=n?n._numPrev+1:0;t<100&&(e._prev=n,e._numPrev=t)}function s3(){s5()&&s4()}function s5(){var e=sj;return sj=!1,sR=!1,e}function s4(){var e,n,t;do for(;sq.length>0;)for(e=sq,sq=[],t=e.length,n=0;n<t;++n){var a=e[n];a[0].apply(null,a[1])}while(sq.length>0);sj=!0,sR=!0}function s6(){var e=sF;sF=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var n=sK.slice(0),t=n.length;t;)n[--t]()}function s8(e){return new sY(sS,!1,e)}function s7(e,n){var t=sU;return function(){var a=s5(),o=sU;try{return lu(t,!0),e.apply(this,arguments)}catch(e){n&&n(e)}finally{lu(o,!1),a&&s4()}}}iR(sY.prototype,{then:sJ,_then:function(e,n){s0(this,new sZ(null,null,e,n,sU))},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):s8(e)):this.then(null,e=>e&&e.name===n?t(e):s8(e))},finally:function(e){return this.then(n=>(e(),n),n=>(e(),s8(n)))},stack:{get:function(){if(this._stack)return this._stack;try{sB=!0;var e=(function e(n,t,a){if(t.length===a)return t;var o="";if(!1===n._state){var r,i,s=n._value;null!=s?(r=s.name||"Error",i=s.message||s,o=ss(s,0)):(r=s,i=""),t.push(r+(i?": "+i:"")+o)}return sa&&((o=ss(n._stackHolder,2))&&-1===t.indexOf(o)&&t.push(o),n._prev&&e(n._prev,t,a)),t})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{sB=!1}}},timeout:function(e,n){return e<1/0?new sY((t,a)=>{var o=setTimeout(()=>a(new sg.Timeout(n)),e);this.then(t,a).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iL(sY.prototype,Symbol.toStringTag,"Dexie.Promise"),sV.env=ld(),iR(sY,{all:function(){var e=sn.apply(null,arguments).map(ll);return new sY(function(n,t){0===e.length&&n([]);var a=e.length;e.forEach((o,r)=>sY.resolve(o).then(t=>{e[r]=t,--a||n(e)},t))})},resolve:e=>{if(e instanceof sY)return e;if(e&&"function"==typeof e.then)return new sY((n,t)=>{e.then(n,t)});var n=new sY(sS,!0,e);return s2(n,sW),n},reject:s8,race:function(){var e=sn.apply(null,arguments).map(ll);return new sY((n,t)=>{e.map(e=>sY.resolve(e).then(n,t))})},PSD:{get:()=>sU,set:e=>sU=e},totalEchoes:{get:()=>la},newPSD:lr,usePSD:lf,scheduler:{get:()=>sN,set:e=>{sN=e}},rejectionMapper:{get:()=>sG,set:e=>{sG=e}},follow:(e,n)=>new sY((t,a)=>lr((n,t)=>{var a=sU;a.unhandleds=[],a.onunhandled=t,a.finalize=sA(function(){var e;e=()=>{0===this.unhandleds.length?n():t(this.unhandleds[0])},sK.push(function n(){e(),sK.splice(sK.indexOf(n),1)}),++sH,sN(()=>{0==--sH&&s6()},[])},a.finalize),e()},n,t,a))}),sP&&(sP.allSettled&&iL(sY,"allSettled",function(){let e=sn.apply(null,arguments).map(ll);return new sY(n=>{0===e.length&&n([]);let t=e.length,a=Array(t);e.forEach((e,o)=>sY.resolve(e).then(e=>a[o]={status:"fulfilled",value:e},e=>a[o]={status:"rejected",reason:e}).then(()=>--t||n(a)))})}),sP.any&&"u">typeof AggregateError&&iL(sY,"any",function(){let e=sn.apply(null,arguments).map(ll);return new sY((n,t)=>{0===e.length&&t(AggregateError([]));let a=e.length,o=Array(a);e.forEach((e,r)=>sY.resolve(e).then(e=>n(e),e=>{o[r]=e,--a||t(AggregateError(o))}))})}));let s9={awaits:0,echoes:0,id:0};var le=0,ln=[],lt=0,la=0,lo=0;function lr(e,n,t,a){var o=sU,r=Object.create(o);r.parent=o,r.ref=0,r.global=!1,r.id=++lo;var i=sV.env;r.env=sT?{Promise:sY,PromiseProp:{value:sY,configurable:!0,writable:!0},all:sY.all,race:sY.race,allSettled:sY.allSettled,any:sY.any,resolve:sY.resolve,reject:sY.reject,nthen:lh(i.nthen,r),gthen:lh(i.gthen,r)}:{},n&&iB(r,n),++o.ref,r.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=lf(r,e,t,a);return 0===r.ref&&r.finalize(),s}function li(){return s9.id||(s9.id=++le),++s9.awaits,s9.echoes+=100,s9.id}function ls(){return!!s9.awaits&&(0==--s9.awaits&&(s9.id=0),s9.echoes=100*s9.awaits,!0)}function ll(e){return s9.echoes&&e&&e.constructor===sP?(li(),e.then(e=>(ls(),e),e=>(ls(),lb(e)))):e}function lc(e){++la,s9.echoes&&0!=--s9.echoes||(s9.echoes=s9.id=0),ln.push(sU),lu(e,!0)}function lp(){var e=ln[ln.length-1];ln.pop(),lu(e,!1)}function lu(e,n){var t,a=sU;if((n?!s9.echoes||lt++&&e===sU:!lt||--lt&&e===sU)||(t=n?lc.bind(null,e):lp,sO.call(sD,t)),e!==sU&&(sU=e,a===sV&&(sV.env=ld()),sT)){var o=sV.env.Promise,r=e.env;sM.then=r.nthen,o.prototype.then=r.gthen,(a.global||e.global)&&(Object.defineProperty(iO,"Promise",r.PromiseProp),o.all=r.all,o.race=r.race,o.resolve=r.resolve,o.reject=r.reject,r.allSettled&&(o.allSettled=r.allSettled),r.any&&(o.any=r.any))}}function ld(){var e=iO.Promise;return sT?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(iO,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:sM.then,gthen:e.prototype.then}:{}}function lf(e,n,t,a,o){var r=sU;try{return lu(e,!0),n(t,a,o)}finally{lu(r,!1)}}function lm(e,n,t,a){return"function"!=typeof e?e:function(){var o,r=sU;t&&li(),lu(n,!0);try{return e.apply(this,arguments)}finally{lu(r,!1),a&&(o=ls,sO.call(sD,o))}}}function lh(e,n){return function(t,a){return e.call(this,lm(t,n),lm(a,n))}}-1===(""+sO).indexOf("[native code]")&&(li=ls=s_);let lg="unhandledrejection";function ly(e,n){var t;try{t=n.onuncatched(e)}catch(e){}if(!1!==t)try{var a,o={promise:n,reason:e};if(iO.document&&document.createEvent?((a=document.createEvent("Event")).initEvent(lg,!0,!0),iB(a,o)):iO.CustomEvent&&iB(a=new CustomEvent(lg,{detail:o}),o),a&&iO.dispatchEvent&&(dispatchEvent(a),!iO.PromiseRejectionEvent&&iO.onunhandledrejection))try{iO.onunhandledrejection(a)}catch(e){}sa&&a&&!a.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var lb=sY.reject;let l_="3.2.4",lv=String.fromCharCode(65535),l$=-1/0,lA="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",lk="String expected.",lw=[],lx="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lC=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),lE="__dbnames",lS="readonly",lD="readwrite";function lM(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}let lz={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function lO(e){return"string"!=typeof e||/\./.test(e)?e=>e:n=>(void 0===n[e]&&e in n&&delete(n=i4(n))[e],n)}class lP{_trans(e,n,t){let a=this._tx||sU.trans,o=this.name;function r(e,t,a){if(!a.schema[o])throw new sg.NotFound("Table "+o+" not part of transaction");return n(a.idbtrans,a)}let i=s5();try{return a&&a.db===this.db?a===sU.trans?a._promise(e,r,t):lr(()=>a._promise(e,r,t),{trans:a,transless:sU.transless||sU}):function e(n,t,a,o){if(n.idbdb&&(n._state.openComplete||sU.letThrough||n._vip)){var r=n._createTransaction(t,a,n._dbSchema);try{r.create(),n._state.PR1398_maxLoop=3}catch(r){return r.name===sh.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,a,o))):lb(r)}return r._promise(t,(e,n)=>lr(()=>(sU.trans=r,o(e,n,r)))).then(e=>r._completion.then(()=>e))}if(n._state.openComplete)return lb(new sg.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._options.autoOpen)return lb(new sg.DatabaseClosed);n.open().catch(s_)}return n._state.dbReadyPromise.then(()=>e(n,t,a,o))}(this.db,e,[this.name],r)}finally{i&&s4()}}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(iT(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let n=iP(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!==lv)return this.where(t.name).equals(t.keyPath.map(n=>e[n]));!t&&sa&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);let{idxByName:a}=this.schema,o=this.db._deps.indexedDB;function r(e,n){try{return 0===o.cmp(e,n)}catch(e){return!1}}let[i,s]=n.reduce(([n,t],o)=>{let i=a[o],s=e[o];return[n||i,n||!i?lM(t,i&&i.multi?e=>{let n=iZ(e,o);return iT(n)&&n.some(e=>r(s,e))}:e=>r(s,iZ(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,iT(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 a in n)if(ij(n,a))try{t[a]=n[a]}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){iB(this,e)})}add(e,n){let{auto:t,keyPath:a}=this.schema.primKey,o=e;return a&&t&&(o=lO(a)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=n?[n]:null,values:[o]})).then(e=>e.numFailures?sY.reject(e.failures[0]):e.lastResult).then(n=>{if(a)try{iX(e,a,n)}catch(e){}return n})}update(e,n){if("object"!=typeof e||iT(e))return this.where(":id").equals(e).modify(n);{let t=iZ(e,this.schema.primKey.keyPath);if(void 0===t)return lb(new sg.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof n?iP(n).forEach(t=>{iX(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:a}=this.schema.primKey,o=e;return a&&t&&(o=lO(a)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=n?[n]:null})).then(e=>e.numFailures?sY.reject(e.failures[0]):e.lastResult).then(n=>{if(a)try{iX(e,a,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?sY.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:lz})).then(e=>e.numFailures?sY.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 a=Array.isArray(n)?n:void 0,o=(t=t||(a?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:r}=this.schema.primKey;if(r&&a)throw new sg.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(a&&a.length!==e.length)throw new sg.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=r&&t?e.map(lO(r)):e;return this.core.mutate({trans:n,type:"add",keys:a,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:a})=>{if(0===e)return o?n:t;throw new sm(`${this.name}.bulkAdd(): ${e} of ${i} operations failed`,a)})})}bulkPut(e,n,t){let a=Array.isArray(n)?n:void 0,o=(t=t||(a?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:r}=this.schema.primKey;if(r&&a)throw new sg.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(a&&a.length!==e.length)throw new sg.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=r&&t?e.map(lO(r)):e;return this.core.mutate({trans:n,type:"put",keys:a,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:a})=>{if(0===e)return o?n:t;throw new sm(`${this.name}.bulkPut(): ${e} of ${i} operations failed`,a)})})}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:a})=>{if(0===e)return t;throw new sm(`${this.name}.bulkDelete(): ${e} of ${n} operations failed`,a)})}}function lT(e){var n={},t=function(t,a){if(a){for(var o=arguments.length,r=Array(o-1);--o;)r[o-1]=arguments[o];return n[t].subscribe.apply(null,r),e}if("string"==typeof t)return n[t]};t.addEventType=r;for(var a=1,o=arguments.length;a<o;++a)r(arguments[a]);return t;function r(e,a,o){if("object"!=typeof e){a||(a=sC),o||(o=s_);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=a(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter(function(n){return n!==e}),i.fire=i.subscribers.reduce(a,o)}};return n[e]=t[e]=i,i}iP(e).forEach(function(n){var t=e[n];if(iT(t))r(n,e[n][0],e[n][1]);else{if("asap"!==t)throw new sg.InvalidArgument("Invalid event config");var a=r(n,sv,function(){for(var e=arguments.length,n=Array(e);e--;)n[e]=arguments[e];a.subscribers.forEach(function(e){iY(function(){e.apply(null,n)})})})}})}}function lB(e,n){return iW(n).from({prototype:e}),n}function lI(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function lN(e,n){e.filter=lM(e.filter,n)}function lj(e,n,t){var a=e.replayFilter;e.replayFilter=a?()=>lM(a(),n()):n,e.justLimit=t&&!a}function lR(e,n){if(e.isPrimKey)return n.primaryKey;let t=n.getIndexByKeyPath(e.index);if(!t)throw new sg.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function lF(e,n,t){let a=lR(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:a,range:e.range}})}function lL(e,n,t,a){let o=e.replayFilter?lM(e.filter,e.replayFilter()):e.filter;if(e.or){let r={},i=(e,t,a)=>{if(!o||o(t,a,e=>t.stop(e),e=>t.fail(e))){var i=t.primaryKey,s=""+i;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(i)),ij(r,s)||(r[s]=!0,n(e,t,a))}};return Promise.all([e.or._iterate(i,t),lW(lF(e,a,t),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return lW(lF(e,a,t),lM(e.algorithm,o),n,!e.keysOnly&&e.valueMapper)}function lW(e,n,t,a){var o=s7(a?(e,n,o)=>t(a(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=s_},n=>{e.fail(n),t=s_})||o(e.value,e,e=>t=e),t()})})}function lG(e,n){try{let t=lV(e),a=lV(n);if(t!==a)return"Array"===t?1:"Array"===a?-1:"binary"===t?1:"binary"===a?-1:"string"===t?1:"string"===a?-1:"Date"===t?1:"Date"!==a?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,a=n.length,o=t<a?t:a;for(let t=0;t<o;++t)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return t===a?0:t<a?-1:1}(lU(e),lU(n));case"Array":return function(e,n){let t=e.length,a=n.length,o=t<a?t:a;for(let t=0;t<o;++t){let a=lG(e[t],n[t]);if(0!==a)return a}return t===a?0:t<a?-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=i8(e);return"ArrayBuffer"===t?"binary":t}function lU(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lq{_read(e,n){var t=this._ctx;return t.error?t.table._trans(null,lb.bind(null,t.error)):t.table._trans("readonly",e).then(n)}_write(e){var n=this._ctx;return n.error?n.table._trans(null,lb.bind(null,n.error)):n.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var n=this._ctx;n.algorithm=lM(n.algorithm,e)}_iterate(e,n){return lL(this._ctx,e,n,this._ctx.table.core)}clone(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&iB(t,e),n._ctx=t,n}raw(){return this._ctx.valueMapper=null,this}each(e){var n=this._ctx;return this._read(t=>lL(n,e,t,n.table.core))}count(e){return this._read(e=>{let n=this._ctx,t=n.table.core;if(lI(n,!0))return t.count({trans:e,query:{index:lR(n,t.schema),range:n.range}}).then(e=>Math.min(e,n.limit));var a=0;return lL(n,()=>(++a,!1),e,t).then(()=>a)}).then(e)}sortBy(e,n){let t=e.split(".").reverse(),a=t[0],o=t.length-1;function r(e,n){return n?r(e[t[n]],n-1):e[a]}var i="next"===this._ctx.dir?1:-1;function s(e,n){var t=r(e,o),a=r(n,o);return t<a?-i:t>a?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&&lI(n,!0)&&n.limit>0){let{valueMapper:t}=n,a=lR(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:a,range:n.range}}).then(({result:e})=>t?e.map(t):e)}{let t=[];return lL(n,e=>t.push(e),e,n.table.core).then(()=>t)}},e)}offset(e){var n=this._ctx;return e<=0||(n.offset+=e,lI(n)?lj(n,()=>{var n=e;return(e,t)=>0===n||(1===n?--n:t(()=>{e.advance(n),n=0}),!1)}):lj(n,()=>{var n=e;return()=>--n<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lj(this._ctx,()=>{var n=e;return function(e,t,a){return--n<=0&&t(a),n>=0}},!0),this}until(e,n){return lN(this._ctx,function(t,a,o){return!e(t.value)||(a(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 lN(this._ctx,function(n){return e(n.value)}),(n=this._ctx).isMatch=lM(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&&lI(n,!0)&&n.limit>0)return this._read(e=>{var t=lR(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 lN(this._ctx,function(e){var n=e.primaryKey.toString(),a=ij(t,n);return t[n]=!0,!a}),this}modify(e){var n=this._ctx;return this._write(t=>{var a;if("function"==typeof e)a=e;else{var o=iP(e),r=o.length;a=function(n){for(var t=!1,a=0;a<r;++a){var i=o[a],s=e[i];iZ(n,i)!==s&&(iX(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:a}=n;for(let n of(u+=e-a,iP(t)))p.push(t[n])};return this.clone().primaryKeys().then(o=>{let r=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 m=[],h=[],g=s?[]:null,y=[];for(let e=0;e<u;++e){let n=d[e],t={value:i4(n),primKey:o[p+e]};!1!==a.call(t,t.value,t)&&(null==t.value?y.push(o[p+e]):s||0===lG(l(n),l(t.value))?(h.push(t.value),s&&g.push(o[p+e])):(y.push(o[p+e]),m.push(t.value)))}let b=lI(n)&&n.limit===1/0&&("function"!=typeof e||e===lH)&&{index:n.index,range:n.range};return Promise.resolve(m.length>0&&i.mutate({trans:t,type:"add",values:m}).then(e=>{for(let n in e.failures)y.splice(parseInt(n),1);f(m.length,e)})).then(()=>(h.length>0||b&&"object"==typeof e)&&i.mutate({trans:t,type:"put",keys:g,values:h,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(h.length,e))).then(()=>(y.length>0||b&&e===lH)&&i.mutate({trans:t,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>o.length>p+u&&r(p+c))})};return r(0).then(()=>{if(p.length>0)throw new sf("Error modifying one or more objects",p,u,d);return o.length})})})}delete(){var e=this._ctx,n=e.range;return lI(e)&&(e.isPrimKey&&!lx||3===n.type)?this._write(t=>{let{primaryKey:a}=e.table.core.schema;return e.table.core.count({trans:t,query:{index:a,range:n}}).then(a=>e.table.core.mutate({trans:t,type:"deleteRange",range:n}).then(({failures:e,lastResult:n,results:t,numFailures:o})=>{if(o)throw new sf("Could not delete some values",Object.keys(e).map(n=>e[n]),a-o);return a-o}))}):this.modify(lH)}}let lH=(e,n)=>n.value=null;function lK(e,n){return e<n?-1:+(e!==n)}function lY(e,n){return e>n?-1:+(e!==n)}function lJ(e,n,t){var a=e instanceof l1?new e.Collection(e):e;return a._ctx.error=t?new t(n):TypeError(n),a}function lZ(e){return new e.Collection(e,()=>l0("")).limit(0)}function lX(e,n,t,a){var o,r,i,s,l,c,p,u=t.length;if(!t.every(e=>"string"==typeof e))return lJ(e,lk);function d(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),r="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),i="next"===e?lK:lY;var n=t.map(function(e){return{lower:r(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?"":a}d("next");var f=new e.Collection(e,()=>lQ(s[0],l[u-1]+a));f._ondirectionchange=function(e){d(e)};var m=0;return f._addAlgorithm(function(e,t,a){var o=e.key;if("string"!=typeof o)return!1;var d=r(o);if(n(d,l,m))return!0;for(var f=null,h=m;h<u;++h){var g=function(e,n,t,a,o,r){for(var i=Math.min(e.length,a.length),s=-1,l=0;l<i;++l){var c=n[l];if(c!==a[l])return 0>o(e[l],t[l])?e.substr(0,l)+t[l]+t.substr(l+1):0>o(e[l],a[l])?e.substr(0,l)+a[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<a.length&&"next"===r?e+t.substr(e.length):i<e.length&&"prev"===r?e.substr(0,t.length):s<0?null:e.substr(0,s)+a[s]+t.substr(s+1)}(o,d,s[h],l[h],i,c);null===g&&null===f?m=h+1:(null===f||i(f,g)>0)&&(f=g)}return t(null!==f?function(){e.continue(f+p)}:a),!1}),f}function lQ(e,n,t,a){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:a}}function l0(e){return{type:1,lower:e,upper:e}}class l1{get Collection(){return this._ctx.table.db.Collection}between(e,n,t,a){t=!1!==t,a=!0===a;try{return this._cmp(e,n)>0||0===this._cmp(e,n)&&(t||a)&&(!t||!a)?lZ(this):new this.Collection(this,()=>lQ(e,n,!t,!a))}catch(e){return lJ(this,lA)}}equals(e){return null==e?lJ(this,lA):new this.Collection(this,()=>l0(e))}above(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(e,void 0,!0))}aboveOrEqual(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(e,void 0,!1))}below(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lJ(this,lA):new this.Collection(this,()=>lQ(void 0,e))}startsWith(e){return"string"!=typeof e?lJ(this,lk):this.between(e,e+lv,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lX(this,(e,n)=>0===e.indexOf(n[0]),[e],lv)}equalsIgnoreCase(e){return lX(this,(e,n)=>e===n[0],[e],"")}anyOfIgnoreCase(){var e=sn.apply(se,arguments);return 0===e.length?lZ(this):lX(this,(e,n)=>-1!==n.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=sn.apply(se,arguments);return 0===e.length?lZ(this):lX(this,(e,n)=>n.some(n=>0===e.indexOf(n)),e,lv)}anyOf(){let e=sn.apply(se,arguments),n=this._cmp;try{e.sort(n)}catch(e){return lJ(this,lA)}if(0===e.length)return lZ(this);let t=new this.Collection(this,()=>lQ(e[0],e[e.length-1]));t._ondirectionchange=t=>{n="next"===t?this._ascending:this._descending,e.sort(n)};let a=0;return t._addAlgorithm((t,o,r)=>{let i=t.key;for(;n(i,e[a])>0;)if(++a===e.length)return o(r),!1;return 0===n(i,e[a])||(o(()=>{t.continue(e[a])}),!1)}),t}notEqual(e){return this.inAnyRange([[l$,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=sn.apply(se,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lJ(this,lA)}let n=e.reduce((e,n)=>e?e.concat([[e[e.length-1][1],n]]):[[l$,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,a=this._ascending,o=this._descending,r=this._min,i=this._max;if(0===e.length)return lZ(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=a(e[0],e[1])))return lJ(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",sg.InvalidArgument);let s=!n||!1!==n.includeLowers,l=n&&!0===n.includeUppers,c,p=a;function u(e,n){return p(e[0],n[0])}try{(c=e.reduce(function(e,n){let a=0,o=e.length;for(;a<o;++a){let o=e[a];if(0>t(n[0],o[1])&&t(n[1],o[0])>0){o[0]=r(o[0],n[0]),o[1]=i(o[1],n[1]);break}}return a===o&&e.push(n),e},[])).sort(u)}catch(e){return lJ(this,lA)}let d=0,f=l?e=>a(e,c[d][1])>0:e=>a(e,c[d][1])>=0,m=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0,h=f,g=new this.Collection(this,()=>lQ(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(h=f,p=a):(h=m,p=o),c.sort(u)},g._addAlgorithm((e,n,t)=>{for(var o=e.key;h(o);)if(++d===c.length)return n(t),!1;return!!(!f(o)&&!m(o))||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||n(()=>{p===a?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=sn.apply(se,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lZ(this):this.inAnyRange(e.map(e=>[e,e+lv])):lJ(this,"startsWithAnyOf() only works with strings")}}function l2(e){return s7(function(n){return l3(n),e(n.target.error),!1})}function l3(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let l5="storagemutated",l4="x-storagemutated-1",l6=lT(null,l5);class l8{_lock(){return iK(!sU.global),++this._reculock,1!==this._reculock||sU.global||(sU.lockOwnerFor=this),this}_unlock(){if(iK(!sU.global),0==--this._reculock)for(sU.global||(sU.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{lf(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&sU.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 sg.DatabaseClosed(t);case"MissingAPIError":throw new sg.MissingAPI(t.message,t);default:throw new sg.OpenFailed(t)}if(!this.active)throw new sg.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=s7(n=>{l3(n),this._reject(e.error)}),e.onabort=s7(n=>{l3(n),this.active&&this._reject(new sg.Abort(e.error)),this.active=!1,this.on("abort").fire(n)}),e.oncomplete=s7(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&l6.storagemutated.fire(e.mutatedParts)}),this}_promise(e,n,t){if("readwrite"===e&&"readwrite"!==this.mode)return lb(new sg.ReadOnly("Transaction is readonly"));if(!this.active)return lb(new sg.TransactionInactive);if(this._locked())return new sY((a,o)=>{this._blockedFuncs.push([()=>{this._promise(e,n,t).then(a,o)},sU])});if(t)return lr(()=>{var e=new sY((e,t)=>{this._lock();let a=n(e,t,this);a&&a.then&&a.then(e,t)});return e.finally(()=>this._unlock()),e._lib=!0,e});var a=new sY((e,t)=>{var a=n(e,t,this);a&&a.then&&a.then(e,t)});return a._lib=!0,a}_root(){return this.parent?this.parent._root():this}waitFor(e){var n=this._root();let t=sY.resolve(e);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>t);else{n._waitingFor=t,n._waitingQueue=[];var a=n.idbtrans.objectStore(n.storeNames[0]);!function e(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(a.get(-1/0).onsuccess=e)}()}var o=n._waitingFor;return new sY((e,a)=>{t.then(t=>n._waitingQueue.push(s7(e.bind(null,t))),e=>n._waitingQueue.push(s7(a.bind(null,e)))).finally(()=>{n._waitingFor===o&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new sg.Abort))}table(e){let n=this._memoizedTables||(this._memoizedTables={});if(ij(n,e))return n[e];let t=this.schema[e];if(!t)throw new sg.NotFound("Table "+e+" not part of transaction");let a=new this.db.Table(e,t,this);return a.core=this.db.core.table(e),n[e]=a,a}}function l7(e,n,t,a,o,r,i){return{name:e,keyPath:n,unique:t,multi:a,auto:o,compound:r,src:(t&&!i?"&":"")+(a?"*":"")+(o?"++":"")+l9(n)}}function l9(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function ce(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:iJ(t,e=>[e.name,e])}}let cn=e=>{try{return e.only([[]]),cn=()=>[[]],[[]]}catch(e){return cn=()=>lv,lv}};function ct(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?n=>n[e]:n=>iZ(n,e):n=>iZ(n,e)}function ca(e){return[].slice.call(e)}let co=0;function cr(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ci({_novip:e},n){let t=n.db,a=function(e,n,{IDBKeyRange:t,indexedDB:a},o){var r;return{dbcore:(r=function(e,n,t){let a;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:a,lowerOpen:o,upperOpen:r}=e;return void 0===t?void 0===a?null:n.upperBound(a,!!r):void 0===a?n.lowerBound(t,!!o):n.bound(t,a,!!o,!!r)}let{schema:r,hasGetAll:i}=(a=ca(e.objectStoreNames),{schema:{name:e.name,tables:a.map(e=>t.objectStore(e)).map(e=>{let{keyPath:n,autoIncrement:t}=e,a=iT(n),o=null==n,r={},i={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:a,keyPath:n,autoIncrement:t,unique:!0,extractKey:ct(n)},indexes:ca(e.indexNames).map(n=>e.index(n)).map(e=>{let{name:n,unique:t,multiEntry:a,keyPath:o}=e,i={name:n,compound:iT(o),keyPath:o,unique:t,multiEntry:a,extractKey:ct(o)};return r[cr(o)]=i,i}),getIndexByKeyPath:e=>r[cr(e)]};return r[":id"]=i.primaryKey,null!=n&&(r[cr(n)]=i.primaryKey),i})},hasGetAll:a.length>0&&"getAll"in t.objectStore(a[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=r.tables.map(e=>{let n;return{name:n=e.name,schema:e,mutate:function({trans:e,type:t,keys:a,values:r,range:i}){return new Promise((s,l)=>{let c;s=s7(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}=a||r||{length:1};if(a&&r&&a.length!==r.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 m=[],h=[],g=0,y=e=>{++g,l3(e)};if("deleteRange"===t){if(4===i.type)return s({numFailures:g,failures:h,results:[],lastResult:void 0});3===i.type?m.push(c=p.clear()):m.push(c=p.delete(o(i)))}else{let[e,n]=d?u?[r,a]:[r,null]:[a,null];if(d)for(let a=0;a<f;++a)m.push(c=n&&void 0!==n[a]?p[t](e[a],n[a]):p[t](e[a])),c.onerror=y;else for(let n=0;n<f;++n)m.push(c=p[t](e[n])),c.onerror=y}let b=e=>{let n=e.target.result;m.forEach((e,n)=>null!=e.error&&(h[n]=e.error)),s({numFailures:g,failures:h,results:"delete"===t?a:m.map(e=>e.result),lastResult:n})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:t})=>new Promise((a,o)=>{a=s7(a);let r=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&&a(s)},d=l2(o);for(let e=0;e<i;++e)null!=t[e]&&((l=r.get(t[e]))._pos=e,l.onsuccess=u,l.onerror=d,++c);0===c&&a(s)}),get:({trans:e,key:t})=>new Promise((a,o)=>{a=s7(a);let r=e.objectStore(n).get(t);r.onsuccess=e=>a(e.target.result),r.onerror=l2(o)}),query:e=>new Promise((t,a)=>{t=s7(t);let{trans:r,values:s,limit:l,query:c}=e,p=l===1/0?void 0:l,{index:u,range:d}=c,f=r.objectStore(n),m=u.isPrimaryKey?f:f.index(u.name),h=o(d);if(0===l)return t({result:[]});if(i){let e=s?m.getAll(h,p):m.getAllKeys(h,p);e.onsuccess=e=>t({result:e.target.result}),e.onerror=l2(a)}else{let e=0,n=!s&&"openKeyCursor"in m?m.openKeyCursor(h):m.openCursor(h),o=[];n.onsuccess=a=>{let r=n.result;return r?(o.push(s?r.value:r.primaryKey),++e===l?t({result:o}):void r.continue()):t({result:o})},n.onerror=l2(a)}}),openCursor:function({trans:e,values:t,query:a,reverse:r,unique:i}){return new Promise((s,l)=>{s=s7(s);let{index:c,range:p}=a,u=e.objectStore(n),d=c.isPrimaryKey?u:u.index(c.name),f=r?i?"prevunique":"prev":i?"nextunique":"next",m=!t&&"openKeyCursor"in d?d.openKeyCursor(o(p),f):d.openCursor(o(p),f);m.onerror=l2(l),m.onsuccess=s7(n=>{let t=m.result;if(!t)return void s(null);t.___id=++co,t.done=!1;let a=t.continue.bind(t),o=t.continuePrimaryKey;o&&(o=o.bind(t));let r=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=s7(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=s7(e),m.onerror=l2(n),t.fail=n,t.stop=n=>{t.stop=t.continue=t.continuePrimaryKey=t.advance=i,e(n)}}),s=()=>{if(m.result)try{e()}catch(e){t.fail(e)}else t.done=!0,t.start=()=>{throw Error("Cursor behind last entry")},t.stop()};return m.onsuccess=s7(e=>{m.onsuccess=s,s()}),t.continue=a,t.continuePrimaryKey=o,t.advance=r,s(),n},s(t)},l)})},count({query:e,trans:t}){let{index:a,range:r}=e;return new Promise((e,i)=>{let s=t.objectStore(n),l=a.isPrimaryKey?s:s.index(a.name),c=o(r),p=c?l.count(c):l.count();p.onsuccess=s7(n=>e(n.target.result)),p.onerror=l2(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:cn(n),schema:r}}(n,t,o),e.dbcore.reduce((e,{create:n})=>({...e,...n(e)}),r))}}(e._middlewares,t,e._deps,n);e.core=a.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 cs({_novip:e},n,t,a){t.forEach(t=>{let o=a[t];n.forEach(n=>{let a=iV(n,t);(!a||"value"in a&&void 0===a.value)&&(n===e.Transaction.prototype||n instanceof e.Transaction?iL(n,t,{get(){return this.table(t)},set(e){iF(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):n[t]=new e.Table(t,o))})})}function cl({_novip:e},n){n.forEach(n=>{for(let t in n)n[t]instanceof e.Table&&delete n[t]})}function cc(e,n){return e._cfg.version-n._cfg.version}function cp(e,n){let t,a={del:[],add:[],change:[]};for(t in e)n[t]||a.del.push(t);for(t in n){let o=e[t],r=n[t];if(o){let e={name:t,def:r,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(r.primKey.keyPath||"")&&(o.primKey.auto===r.primKey.auto||lx)){let n,t=o.idxByName,i=r.idxByName;for(n in t)i[n]||e.del.push(n);for(n in i){let a=t[n],o=i[n];a?a.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&a.change.push(e)}else e.recreate=!0,a.change.push(e)}else a.add.push([t,r])}return a}function cu(e,n,t,a){let o=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return a.forEach(e=>cd(o,e)),o}function cd(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function cf(e,n,t){let a={};return iq(n.objectStoreNames,0).forEach(e=>{let n=t.objectStore(e),o=n.keyPath,r=l7(l9(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=l7(t.name,o,!!t.unique,!!t.multiEntry,!1,o&&"string"!=typeof o,!1);i.push(s)}a[e]=ce(e,r,i)}),a}function cm({_novip:e},n,t){let a=t.db.objectStoreNames;for(let o=0;o<a.length;++o){let r=a[o],i=t.objectStore(r);e._hasGetAll="getAll"in i;for(let e=0;e<i.indexNames.length;++e){let t=i.indexNames[e],a=i.index(t).keyPath,o="string"==typeof a?a:"["+iq(a).join("+")+"]";if(n[r]){let e=n[r].idxByName[o];e&&(e.name=t,delete n[r].idxByName[o],n[r].idxByName[t]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&iO.WorkerGlobalScope&&iO instanceof iO.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ch{_parseStoresSpec(e,n){iP(e).forEach(t=>{if(null!==e[t]){var a=e[t].split(",").map((e,n)=>{let t=(e=e.trim()).replace(/([&*]|\+\+)/g,""),a=/^\[/.test(t)?t.match(/^\[(.*)\]$/)[1].split("+"):t;return l7(t,a||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),iT(a),0===n)}),o=a.shift();if(o.multi)throw new sg.Schema("Primary key cannot be multi-valued");a.forEach(e=>{if(e.auto)throw new sg.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new sg.Schema("Index must have a name and cannot be an empty string")}),n[t]=ce(t,o,a)}})}stores(e){let n=this.db;this._cfg.storesSource=this._cfg.storesSource?iB(this._cfg.storesSource,e):e;let t=n._versions,a={},o={};return t.forEach(e=>{iB(a,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(a,o)}),n._dbSchema=o,cl(n,[n._allTables,n,n.Transaction.prototype]),cs(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],iP(o),o),n._storeNames=iP(o),this}upgrade(e){return this._cfg.contentUpgrade=sE(this._cfg.contentUpgrade||s_,e),this}}function cg(e,n){let t=e._dbNamesDB;return t||(t=e._dbNamesDB=new cB(lE,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function cy(e){return e&&"function"==typeof e.databases}function cb(e){return lr(function(){return sU.letThrough=!0,e()})}function c_(e){var n=n=>e.next(n),t=o(n),a=o(n=>e.throw(n));function o(e){return n=>{var o=e(n),r=o.value;return o.done?r:r&&"function"==typeof r.then?r.then(t,a):iT(r)?Promise.all(r).then(t,a):t(r)}}return o(n)()}function cv(e,n,t){var a=arguments.length;if(a<2)throw new sg.InvalidArgument("Too few arguments");for(var o=Array(a-1);--a;)o[a-1]=arguments[a];return t=o.pop(),[e,i1(o),t]}function c$(e,n,t){let a=iT(e)?e.slice():[e];for(let e=0;e<t;++e)a.push(n);return a}let cA={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(n){let t=e.table(n),{schema:a}=t,o={},r=[];function i(e,n,t){let a=cr(e),s=o[a]=o[a]||[],l=null==e?0:"string"==typeof e?1:e.length,c=n>0,p={...t,isVirtual:c,keyTail:n,keyLength:l,extractKey:ct(e),unique:!c&&t.unique};return s.push(p),p.isPrimaryKey||r.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(a.primaryKey.keyPath,0,a.primaryKey);for(let e of(o[":id"]=[s],a.indexes))i(e.keyPath,0,e);function l(n){var t,a;let o=n.query.index;return o.isVirtual?{...n,query:{index:o,range:(t=n.query.range,a=o.keyTail,{type:1===t.type?2:t.type,lower:c$(t.lower,t.lowerOpen?e.MAX_KEY:e.MIN_KEY,a),lowerOpen:!0,upper:c$(t.upper,t.upperOpen?e.MIN_KEY:e.MAX_KEY,a),upperOpen:!0})}}:n}return{...t,schema:{...a,primaryKey:s,indexes:r,getIndexByKeyPath:function(e){let n=o[cr(e)];return n&&n[0]}},count:e=>t.count(l(e)),query:e=>t.query(l(e)),openCursor(n){let{keyTail:a,isVirtual:o,keyLength:r}=n.query.index;return o?t.openCursor(l(n)).then(t=>t&&Object.create(t,{continue:{value:function(o){null!=o?t.continue(c$(o,n.reverse?e.MAX_KEY:e.MIN_KEY,a)):n.unique?t.continue(t.key.slice(0,r).concat(n.reverse?e.MIN_KEY:e.MAX_KEY,a)):t.continue()}},continuePrimaryKey:{value(n,o){t.continuePrimaryKey(c$(n,e.MAX_KEY,a),o)}},primaryKey:{get:()=>t.primaryKey},key:{get(){let e=t.key;return 1===r?e[0]:e.slice(0,r)}},value:{get:()=>t.value}})):t.openCursor(n)}}}}}};function ck(e,n,t,a){return t=t||{},a=a||"",iP(e).forEach(o=>{if(ij(n,o)){var r=e[o],i=n[o];if("object"==typeof r&&"object"==typeof i&&r&&i){let e=i8(r);e!==i8(i)?t[a+o]=n[o]:"Object"===e?ck(r,i,t,a+o+"."):r!==i&&(t[a+o]=n[o])}else r!==i&&(t[a+o]=n[o])}else t[a+o]=void 0}),iP(n).forEach(o=>{ij(e,o)||(t[a+o]=n[o])}),t}let cw={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(n){let t=e.table(n),{primaryKey:a}=t.schema;return{...t,mutate(e){let o=sU.trans,{deleting:r,creating:i,updating:s}=o.table(n).hook;switch(e.type){case"add":if(i.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(i.fire===s_&&s.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(r.fire===s_)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(r.fire===s_)break;return o._promise("readwrite",()=>(function e(n,o,r){return t.query({trans:n,values:!1,query:{index:a,range:o},limit:r}).then(({result:t})=>l({type:"delete",keys:t,trans:n}).then(a=>a.numFailures>0?Promise.reject(a.failures[0]):t.length<r?{failures:[],numFailures:0,lastResult:void 0}:e(n,{...o,lower:t[t.length-1],lowerOpen:!0},r)))})(e.trans,e.range,1e4),!0)}return t.mutate(e);function l(e){var n,o;let l=sU.trans,c=e.keys||("delete"===(n=e).type?n.keys:n.keys||n.values.map(a.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)r.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,a.outbound||iX(e.values[o],a.keyPath,t))}else{let n=ck(c,e.values[o]),a=s.fire.call(p,n,t,c,l);if(a){let n=e.values[o];Object.keys(a).forEach(e=>{ij(n,e)?n[e]=a[e]:iX(n,e,a[e])})}}return p});return t.mutate(e).then(({failures:t,results:a,numFailures:r,lastResult:i})=>{for(let r=0;r<c.length;++r){let i=a?a[r]:c[r],s=o[r];null==i?s.onerror&&s.onerror(t[r]):s.onsuccess&&s.onsuccess("put"===e.type&&n[r]?e.values[r]:i)}return{failures:t,results:a,numFailures:r,lastResult:i}}).catch(e=>(o.forEach(n=>n.onerror&&n.onerror(e)),Promise.reject(e)))})}}}}})};function cx(e,n,t){try{if(!n||n.keys.length<e.length)return null;let a=[];for(let o=0,r=0;o<n.keys.length&&r<e.length;++o)0===lG(n.keys[o],e[r])&&(a.push(t?i4(n.values[o]):n.values[o]),++r);return a.length===e.length?a:null}catch(e){return null}}let cC={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=cx(e.keys,e.trans._cache,"clone"===e.cache);return n?sY.resolve(n):t.getMany(e).then(n=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?i4(n):n},n))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),t.mutate(e))}}})};function cE(e){return!("from"in e)}let cS=function(e,n){if(!this){let n=new cS;return e&&"d"in e&&iB(n,e),n}iB(this,arguments.length?{d:1,from:e,to:arguments.length>1?n:e}:{d:0})};function cD(e,n,t){let a=lG(n,t);if(isNaN(a))return;if(a>0)throw RangeError();if(cE(e))return iB(e,{from:n,to:t,d:1});let o=e.l,r=e.r;if(0>lG(t,e.from))return o?cD(o,n,t):e.l={from:n,to:t,d:1,l:null,r:null},cO(e);if(lG(n,e.to)>0)return r?cD(r,n,t):e.r={from:n,to:t,d:1,l:null,r:null},cO(e);0>lG(n,e.from)&&(e.from=n,e.l=null,e.d=r?r.d+1:1),lG(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&&cM(e,o),r&&i&&cM(e,r)}function cM(e,n){cE(n)||function e(n,{from:t,to:a,l:o,r:r}){cD(n,t,a),o&&e(n,o),r&&e(n,r)}(e,n)}function cz(e){let n=cE(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>lG(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>=lG(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 cO(e){var n,t;let a=((null==(n=e.r)?void 0:n.d)||0)-((null==(t=e.l)?void 0:t.d)||0),o=a>1?"r":a<-1?"l":"";if(o){let n="r"===o?"l":"r",t={...e},a=e[o];e.from=a.from,e.to=a.to,e[o]=a[o],t[o]=a[n],e[n]=t,t.d=cP(t)}e.d=cP(e)}function cP({r:e,l:n}){return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1}iR(cS.prototype,{add(e){return cM(this,e),this},addKey(e){return cD(this,e,e),this},addKeys(e){return e.forEach(e=>cD(this,e,e)),this},[i7](){return cz(this)}});let cT={stack:"dbcore",level:0,create:e=>{let n=e.schema.name,t=new cS(e.MIN_KEY,e.MAX_KEY);return{...e,table:a=>{let o=e.table(a),{schema:r}=o,{primaryKey:i}=r,{extractKey:s,outbound:l}=i,c={...o,mutate:e=>{let i=e.trans,s=i.mutatedParts||(i.mutatedParts={}),l=e=>{let t=`idb://${n}/${a}/${e}`;return s[t]||(s[t]=new cS)},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]:[],m=e.trans._cache;return o.mutate(e).then(e=>{if(iT(d)){"delete"!==u&&(d=e.results),c.addKeys(d);let n=cx(d,m);n||"add"===u||p.addKeys(d),(n||f)&&r.indexes.forEach(function(e){let t=l(e.name||"");function a(n){return null!=n?e.extractKey(n):null}let o=n=>e.multiEntry&&iT(n)?n.forEach(e=>t.addKey(e)):t.addKey(n);(n||f).forEach((e,t)=>{let r=n&&a(n[t]),i=f&&a(f[t]);0!==lG(r,i)&&(null!=r&&o(r),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),r.indexes.forEach(e=>l(e.name).add(t));return e})}},p=({query:{index:n,range:t}})=>{var a,o;return[n,new cS(null!=(a=t.lower)?a:e.MIN_KEY,null!=(o=t.upper)?o:e.MAX_KEY)]},u={get:e=>[i,new cS(e.key)],getMany:e=>[i,(new cS).addKeys(e.keys)],count:p,query:p,openCursor:p};return iP(u).forEach(e=>{c[e]=function(r){let{subscr:i}=sU;if(i){let c=e=>{let t=`idb://${n}/${a}/${e}`;return i[t]||(i[t]=new cS)},p=c(""),d=c(":dels"),[f,m]=u[e](r);if(c(f.name||"").add(m),!f.isPrimaryKey){if("count"!==e){let n="query"===e&&l&&r.values&&o.query({...r,values:!1});return o[e].apply(this,arguments).then(t=>{if("query"===e){if(l&&r.values)return n.then(({result:e})=>(p.addKeys(e),t));let e=r.values?t.result.map(s):t.result;r.values?p.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=r.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 cB{constructor(e,n){var t;this._middlewares={},this.verno=0;const a=cB.dependencies;this._options=n={addons:cB.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.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 r={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:s_,dbReadyPromise:null,cancelOpen:s_,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};r.dbReadyPromise=new sY(e=>{r.dbReadyResolve=e}),r.openCanceller=new sY((e,n)=>{r.cancelOpen=n}),this._state=r,this.name=e,this.on=lT(this,"populate","blocked","versionchange","close",{ready:[sE,s_]}),this.on.ready.subscribe=iH(this.on.ready.subscribe,e=>(n,t)=>{cB.vip(()=>{let a=this._state;if(a.openComplete)a.dbOpenError||sY.resolve().then(n),t&&e(n);else if(a.onReadyBeingFired)a.onReadyBeingFired.push(n),t&&e(n);else{e(n);let a=this;t||e(function e(){a.on.ready.unsubscribe(n),a.on.ready.unsubscribe(e)})}})}),this.Collection=(t=this,lB(lq.prototype,function(e,n){this.db=t;let a=lz,o=null;if(n)try{a=n()}catch(e){o=e}let r=e._ctx,i=r.table,s=i.hook.reading.fire;this._ctx={table:i,index:r.index,isPrimKey:!r.index||i.schema.primKey.keyPath&&r.index===i.schema.primKey.name,range:a,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:r.or,valueMapper:s!==sv?s:null}})),this.Table=function(e){return lB(lP.prototype,function(n,t,a){this.db=e,this._tx=a,this.name=n,this.schema=t,this.hook=e._allTables[n]?e._allTables[n].hook:lT(null,{creating:[sk,s_],reading:[s$,sv],updating:[sx,s_],deleting:[sw,s_]})})}(this),this.Transaction=function(e){return lB(l8.prototype,function(n,t,a,o,r){this.db=e,this.mode=n,this.storeNames=t,this.schema=a,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lT(this,"complete","error","abort"),this.parent=r||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 sY((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(),lb(e)})})}(this),this.Version=function(e){return lB(ch.prototype,function(n){this.db=e,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lB(l1.prototype,function(n,t,a){this.db=e,this._ctx={table:n,index:":id"===t?null:t,or:a};let o=e._deps.indexedDB;if(!o)throw new sg.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=cn(n.IDBKeyRange),this._createTransaction=(e,n,t,a)=>new this.Transaction(e,n,t,this._options.chromeTransactionDurability,a),this._fireOnBlocked=e=>{this.on("blocked").fire(e),lw.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(n=>n.on("versionchange").fire(e))},this.use(cA),this.use(cw),this.use(cT),this.use(cC),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new sg.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new sg.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(cc),t.stores({}),this._state.autoSchema=!1,t)}_whenReady(e){return this.idbdb&&(this._state.openComplete||sU.letThrough||this._vip)?e():new sY((e,n)=>{if(this._state.openComplete)return n(new sg.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void n(new sg.DatabaseClosed);this.open().catch(s_)}this._state.dbReadyPromise.then(e,n)}).then(e)}use({stack:e,create:n,level:t,name:a}){a&&this.unuse({stack:e,name:a});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:n,level:null==t?10:t,name:a}),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:a}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?lb(t.dbOpenError):e);sa&&(t.openCanceller._stackHolder=si()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;let o=t.openCanceller;function r(){if(t.openCanceller!==o)throw new sg.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,l=!1;return sY.race([o,("u"<typeof navigator?sY.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 sY((n,o)=>{if(r(),!a)throw new sg.MissingAPI;let i=e.name,c=t.autoSchema?a.open(i):a.open(i,Math.round(10*e.verno));if(!c)throw new sg.MissingAPI;c.onerror=l2(o),c.onblocked=s7(e._fireOnBlocked),c.onupgradeneeded=s7(n=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=l3,s.abort(),c.result.close();let e=a.deleteDatabase(i);e.onsuccess=e.onerror=s7(()=>{o(new sg.NoSuchDatabase(`Database ${i} doesnt exist`))})}else{let t,a,i,d;s.onerror=l2(o);var r,p,u=n.oldVersion>0x4000000000000000?0:n.oldVersion;l=u<1,e._novip.idbdb=c.result,r=u/10,p=s,t=e._dbSchema,(a=e._createTransaction("readwrite",e._storeNames,t)).create(p),a._completion.catch(o),i=a._reject.bind(a),d=sU.transless||sU,lr(()=>{sU.trans=a,sU.transless=d,0===r?(iP(t).forEach(e=>{cu(p,e,t[e].primKey,t[e].indexes)}),ci(e,p),sY.follow(()=>e.on.populate.fire(a)).catch(i)):(function({_novip:e},n,t,a){let o=[],r=e._versions,i=e._dbSchema=cf(e,e.idbdb,a),s=!1;return r.filter(e=>e._cfg.version>=n).forEach(r=>{o.push(()=>{let o=i,l=r._cfg.dbschema;cm(e,o,a),cm(e,l,a),i=e._dbSchema=l;let c=cp(o,l);c.add.forEach(e=>{cu(a,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new sg.Upgrade("Not yet support for changing primary key");{let n=a.objectStore(e.name);e.add.forEach(e=>cd(n,e)),e.change.forEach(e=>{n.deleteIndex(e.name),cd(n,e)}),e.del.forEach(e=>n.deleteIndex(e))}});let p=r._cfg.contentUpgrade;if(p&&r._cfg.version>n){let n;ci(e,a),t._memoizedTables={},s=!0;let r=iQ(l);c.del.forEach(e=>{r[e]=o[e]}),cl(e,[e.Transaction.prototype]),cs(e,[e.Transaction.prototype],iP(r),r),t.schema=r;let i=st(p);i&&li();let u=sY.follow(()=>{if((n=p(t))&&i){var e=ls.bind(null,null);n.then(e,e)}});return n&&"function"==typeof n.then?sY.resolve(n):u.then(()=>n)}}),o.push(n=>{var a;s&&lx||(a=r._cfg.dbschema,[].slice.call(n.db.objectStoreNames).forEach(e=>null==a[e]&&n.db.deleteObjectStore(e))),cl(e,[e.Transaction.prototype]),cs(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),t.schema=e._dbSchema})}),(function e(){return o.length?sY.resolve(o.shift()(t.idbtrans)).then(e):sY.resolve()})().then(()=>{var e;iP(e=i).forEach(n=>{a.db.objectStoreNames.contains(n)||cu(a,n,e[n].primKey,e[n].indexes)})})})(e,r,a,p).catch(i)})}},o),c.onsuccess=s7(()=>{s=null;let a=e._novip.idbdb=c.result,o=iq(a.objectStoreNames);if(o.length>0)try{let n,r=a.transaction(1===o.length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},n,t){e.verno=n.version/10;let a=e._dbSchema=cf(0,n,t);e._storeNames=iq(n.objectStoreNames,0),cs(e,[e._allTables],iP(a),a)}(e,a,r):(cm(e,e._dbSchema,r),((n=cp(cf(0,e.idbdb,r),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.")),ci(e,r)}catch(e){}lw.push(e),a.onversionchange=s7(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),a.onclose=s7(n=>{e.on("close").fire(n)}),l&&function({indexedDB:e,IDBKeyRange:n},t){cy(e)||t===lE||cg(e,n).put({name:t}).catch(s_)}(e._deps,i),n()},o)}))]).then(()=>(r(),t.onReadyBeingFired=[],sY.resolve(cb(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let a=t.onReadyBeingFired.reduce(sE,s_);return t.onReadyBeingFired=[],sY.resolve(cb(()=>a(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(),lb(n)}).finally(()=>{t.openComplete=!0,i()})}(this)}_close(){let e=this._state,n=lw.indexOf(this);if(n>=0&&lw.splice(n,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sY(n=>{e.dbReadyResolve=n}),e.openCanceller=new sY((n,t)=>{e.cancelOpen=t})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new sg.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,n=this._state;return new sY((t,a)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=s7(()=>{!function({indexedDB:e,IDBKeyRange:n},t){cy(e)||t===lE||cg(e,n).delete(t).catch(s_)}(this._deps,this.name),t()}),e.onerror=l2(a),e.onblocked=this._fireOnBlocked};if(e)throw new sg.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 iP(this._allTables).map(e=>this._allTables[e])}transaction(){let e=cv.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,n,t){let a,o,r=sU.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=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===lS)a=lS;else{if("rw"!=e&&e!=lD)throw new sg.InvalidArgument("Invalid transaction mode: "+e);a=lD}if(r){if(r.mode===lS&&a===lD){if(!i)throw new sg.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&o.forEach(e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!i)throw new sg.SubTransaction("Table "+e+" not included in parent transaction.");r=null}}),i&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,(n,t)=>{t(e)}):lb(e)}let s=(function e(n,t,a,o,r){return sY.resolve().then(()=>{let i,s=sU.transless||sU,l=n._createTransaction(t,a,n._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),n._state.PR1398_maxLoop=3}catch(o){return o.name===sh.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,a,null,r))):lb(o)}let c=st(r);c&&li();let p=sY.follow(()=>{if(i=r.call(l,l))if(c){var e=ls.bind(null,null);i.then(e,e)}else"function"==typeof i.next&&"function"==typeof i.throw&&(i=c_(i))},{trans:l,transless:s});return(i&&"function"==typeof i.then?sY.resolve(i).then(e=>l.active?e:lb(new sg.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),lb(e)))})}).bind(null,this,a,o,r,t);return r?r._promise(a,s,"lock"):sU.trans?lf(sU.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!ij(this._allTables,e))throw new sg.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let cI="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class cN{constructor(e){this._subscribe=e}subscribe(e,n,t){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:n,complete:t})}[cI](){return this}}function cj(e,n){return iP(n).forEach(t=>{cM(e[t]||(e[t]=new cS),n[t])}),e}try{o={indexedDB:iO.indexedDB||iO.mozIndexedDB||iO.webkitIndexedDB||iO.msIndexedDB,IDBKeyRange:iO.IDBKeyRange||iO.webkitIDBKeyRange}}catch(e){o={indexedDB:null,IDBKeyRange:null}}function cR(e){let n=cF;try{cF=!0,l6.storagemutated.fire(e)}finally{cF=n}}iR(cB,{...sb,delete:e=>new cB(e,{addons:[]}).delete(),exists:e=>new cB(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:n}){return cy(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==lE)):cg(e,n).toCollection().primaryKeys()})(cB.dependencies).then(e)}catch(e){return lb(new sg.MissingAPI)}},defineClass:()=>function(e){iB(this,e)},ignoreTransaction:e=>sU.trans?lf(sU.transless,e):e(),vip:cb,async:function(e){return function(){try{var n=c_(e.apply(this,arguments));return n&&"function"==typeof n.then?n:sY.resolve(n)}catch(e){return lb(e)}}},spawn:function(e,n,t){try{var a=c_(e.apply(t,n||[]));return a&&"function"==typeof a.then?a:sY.resolve(a)}catch(e){return lb(e)}},currentTransaction:{get:()=>sU.trans||null},waitFor:function(e,n){let t=sY.resolve("function"==typeof e?cB.ignoreTransaction(e):e).timeout(n||6e4);return sU.trans?sU.trans.waitFor(t):t},Promise:sY,debug:{get:()=>sa,set:e=>{sa=e,so="dexie"===e?()=>!0:lC}},derive:iW,extend:iB,props:iR,override:iH,Events:lT,on:l6,liveQuery:function(e){let n,t=!1,a=new cN(a=>{let o=st(e),r=!1,i={},s={},l={get closed(){return r},unsubscribe:()=>{r=!0,l6.storagemutated.unsubscribe(d)}};a.start&&a.start(l);let c=!1,p=!1;function u(){return iP(s).some(e=>i[e]&&function(e,n){let t=cz(n),a=t.next();if(a.done)return!1;let o=a.value,r=cz(e),i=r.next(o.from),s=i.value;for(;!a.done&&!i.done;){if(0>=lG(s.from,o.to)&&lG(s.to,o.from)>=0)return!0;0>lG(o.from,s.from)?o=(a=t.next(s.from)).value:s=(i=r.next(o.from)).value}return!1}(i[e],s[e]))}let d=e=>{cj(i,e),u()&&f()},f=()=>{let m,h;if(c||r)return;i={};let g={},y=(o&&li(),m=()=>lr(e,{subscr:g,trans:null}),h=sU.trans?lf(sU.transless,m):m(),o&&h.then(ls,ls),h);p||(l6(l5,d),p=!0),c=!0,Promise.resolve(y).then(e=>{t=!0,n=e,c=!1,r||(u()?f():(i={},s=g,a.next&&a.next(e)))},e=>{c=!1,t=!1,a.error&&a.error(e),l.unsubscribe()})};return f(),l});return a.hasValue=()=>t,a.getValue=()=>n,a},extendObservabilitySet:cj,getByKeyPath:iZ,setByKeyPath:iX,delByKeyPath:function(e,n){"string"==typeof n?iX(e,n,void 0):"length"in n&&[].map.call(n,function(n){iX(e,n,void 0)})},shallowClone:iQ,deepClone:i4,getObjectDiff:ck,cmp:lG,asap:iY,minKey:l$,addons:[],connections:lw,errnames:sh,dependencies:o,semVer:l_,version:l_.split(".").map(e=>parseInt(e)).reduce((e,n,t)=>e+n/Math.pow(10,2*t))}),cB.maxKey=cn(cB.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(l6(l5,e=>{if(!cF){let n;lx?(n=document.createEvent("CustomEvent")).initCustomEvent(l4,!0,!0,e):n=new CustomEvent(l4,{detail:e}),cF=!0,dispatchEvent(n),cF=!1}}),addEventListener(l4,({detail:e})=>{cF||cR(e)}));let cF=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(l4);"function"==typeof e.unref&&e.unref(),l6(l5,n=>{cF||e.postMessage(n)}),e.onmessage=e=>{e.data&&cR(e.data)}}else if("u">typeof self&&"u">typeof navigator){l6(l5,e=>{try{cF||("u">typeof localStorage&&localStorage.setItem(l4,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:l4,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===l4){let n=JSON.parse(e.newValue);n&&cR(n.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===l4&&cR(e.changedParts)})}function cL(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}sY.rejectionMapper=function(e,n){if(!e||e instanceof su||e instanceof TypeError||e instanceof SyntaxError||!e.name||!sy[e.name])return e;var t=new sy[e.name](n||e.message,e);return"stack"in e&&iL(t,"stack",{get:function(){return this.inner.stack}}),t},so=lC;class cW extends cB{constructor(){super("EsmOffline"),cL(this,"syncQueue",void 0),cL(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 cG(){return new cW}let cV=new cW,cU={},cq=V("offline-synchronization",{});function cH(){return cq}async function cK(){if(cq.getState().synchronization)return;let e=await cV.syncQueue.count(),n={},t=Object.entries(cU),a=t.length,o={},r=new AbortController,i=()=>{let e=cq.getState().synchronization;cq.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{cq.setState({synchronization:{totalCount:e,pendingCount:e,abortController:r}});for(let e=0;e<a&&t.length>0;e++)for(let e=t.length;e--;){let[a,s]=t[e],l=s.dependsOn.map(e=>n[e]);l.every(Boolean)&&(o[a]={},await Promise.all(l),n[a]=cY(s,o,r,i),t.splice(e,1))}await Promise.allSettled(Object.values(n))}finally{cq.setState({synchronization:void 0})}}async function cY({type:e,dependsOn:n,process:t},a,o,r){let i=[],s=[],l=await cJ();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 r=await t(u,{abort:o,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:t})=>n.includes(t)?a[t][e]:void 0)});void 0!==d&&(a[e][d]=r),await cV.syncQueue.delete(p)}catch(e){await cV.syncQueue.update(p,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{r()}}}async function cJ(){let e=await oM();return e?.uuid||"*"}async function cZ(e,n,t,a){let o=a&&a.id;return void 0!==o&&await cV.syncQueue.where({type:n,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(cB.errnames.DatabaseClosed),await cV.syncQueue.add({type:n,content:t,userId:e,descriptor:a||{},createdOn:new Date}).catch(cB.errnames.DatabaseClosed,()=>-1)}async function cX(e,n,t){let a=await cJ();return await cZ(a,e,n,t)}async function cQ(e,n){return(await c0(e,n)).map(e=>e.content)}async function c0(e,n){return await cV.syncQueue.where(n?{type:n,userId:e}:{userId:e}).toArray().catch(cB.errnames.DatabaseClosed,()=>[])}async function c1(e){let n=await cJ();return await cQ(n,e)}async function c2(e){let n=await cJ();return await c0(n,e)}async function c3(e){return await cV.syncQueue.get(e).catch(cB.errnames.DatabaseClosed,()=>void 0)}function c5(e){return!!cU[e]?.options.onBeginEditSyncItem}async function c4(e){let n=await c3(e);if(!n)throw Error(`No sync item with the ID ${e} exists.`);let t=cU[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 c6(e){await cV.syncQueue.delete(e).catch(cB.errnames.DatabaseClosed)}function c8(e,n,t,a={}){cU[e]={type:e,dependsOn:n,process:t,options:a}}let c7="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),c9=new Uint8Array(16),pe=[];for(let e=0;e<256;++e)pe.push((e+256).toString(16).slice(1));let pn=function(e,n,t){if(c7&&!n&&!e)return c7();let a=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="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 r(c9)})();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n){t=t||0;for(let e=0;e<16;++e)n[t+e]=a[e];return n}return function(e,n=0){return pe[e[n+0]]+pe[e[n+1]]+pe[e[n+2]]+pe[e[n+3]]+"-"+pe[e[n+4]]+pe[e[n+5]]+"-"+pe[e[n+6]]+pe[e[n+7]]+"-"+pe[e[n+8]]+pe[e[n+9]]+"-"+pe[e[n+10]]+pe[e[n+11]]+pe[e[n+12]]+pe[e[n+13]]+pe[e[n+14]]+pe[e[n+15]]}(a)},pt="OFFLINE+";function pa(){return pt+pn()}function po(e){return e.startsWith(pt)}let pr={};function pi(){return Object.values(pr)}function ps(e){pr[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.`),pr[e.id]=e}async function pl(e){let n=await pg();return await pc(n,e)}async function pc(e,n){let t=new cW;return await t.dynamicOfflineData.where(n?{type:n,users:e}:{users:e}).toArray().catch(cB.errnames.DatabaseClosed,()=>[])}async function pp(e,n){let t=await pg();return await pu(t,e,n)}async function pu(e,n,t){let a=new cW,o=await a.dynamicOfflineData.get({type:n,identifier:t}).catch(cB.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await a.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(cB.errnames.DatabaseClosed):await a.dynamicOfflineData.add({users:[e],type:n,identifier:t}).catch(cB.errnames.DatabaseClosed)}async function pd(e,n){let t=await pg();return await pf(t,e,n)}async function pf(e,n,t){let a=new cW,o=await a.dynamicOfflineData.get({type:n,identifier:t,users:e}).catch(cB.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await a.dynamicOfflineData.update(o.id,{users:o.users.filter(n=>n!==e)}).catch(cB.errnames.DatabaseClosed):await a.dynamicOfflineData.delete(o.id).catch(cB.errnames.DatabaseClosed))}async function pm(e,n){let t=await pl(e);await Promise.all(t.map(async e=>ph(e.type,e.identifier,n)))}async function ph(e,n,t){await pp(e,n);let a=new cW,o=await pg(),r=await a.dynamicOfflineData.get({type:e,identifier:n}).catch(cB.errnames.DatabaseClosed,()=>void 0),i=pi().filter(n=>n.type===e);if(!r)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};r.id&&await a.dynamicOfflineData.update(r.id,{syncState:u}).catch(cB.errnames.DatabaseClosed)}async function pg(){let e=(await oM()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let py=V("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function pb(){return p$(),py}function p_(e,n){p$(),ps({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 pv(e){p$(),await ph("patient",e)}function p$(){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 pA(e,n,t=!0){if(e){let a=null,[o,r]=await Promise.all([o_(`${og}/Patient/${e}`,n).catch(e=>a=e),t?pk(e):Promise.resolve(null)]);if(o.ok)return o.data;if(r)return r;if(a)throw a}return null}async function pk(e){let n=(await c1("patient-registration")).find(n=>n.fhirPatient.id===e);return n?.fhirPatient??null}function pw(e,n){let t=new CustomEvent(`openmrs:${e}`,{detail:n??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(t)}function px(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 pC=t(56170);function pE(e){return{uuid:e.uuid,display:e.display}}function pS(e=null,n=null){let t=new URLSearchParams;e&&t.set("tag",e),n&&t.set("q",n);let a=t.toString();return ov(`${oh}/location${a?"?"+a:""}`).pipe((0,pC.map)(e=>e.data.results.map(pE))).pipe((0,pC.take)(1))}function pD(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pM(){return ov(`${oh}/visittype`).pipe((0,pC.map)(e=>e.data.results.map(pD))).pipe((0,pC.take)(1))}var pz=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),pO=((en={}).NOTSTARTED="notStarted",en.ONGOING="ongoing",en);let pP="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))",pT=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function pB(){return q("visit",pT)}function pI(e,n){pB().setState({patientUuid:e,manuallySetVisitUuid:n})}function pN(e,n){return o_(`${oh}/visit`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function pj(e,n,t){return o_(`${oh}/visit/${e}`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:n})}function pR(e,n,t){return o_(`${oh}/visit?patient=${e}&v=${t??pP}`,{signal:n.signal,method:"GET",headers:{"Content-type":"application/json"}})}pB().subscribe(e=>{var n;n=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(n))});let pF=new eo.BehaviorSubject(null);class pL{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+pL.version}static addUnaryOp(e){return pL.max_unop_len=Math.max(e.length,pL.max_unop_len),pL.unary_ops[e]=1,pL}static addBinaryOp(e,n,t){return pL.max_binop_len=Math.max(e.length,pL.max_binop_len),pL.binary_ops[e]=n,t?pL.right_associative.add(e):pL.right_associative.delete(e),pL}static addIdentifierChar(e){return pL.additional_identifier_chars.add(e),pL}static addLiteral(e,n){return pL.literals[e]=n,pL}static removeUnaryOp(e){return delete pL.unary_ops[e],e.length===pL.max_unop_len&&(pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops)),pL}static removeAllUnaryOps(){return pL.unary_ops={},pL.max_unop_len=0,pL}static removeIdentifierChar(e){return pL.additional_identifier_chars.delete(e),pL}static removeBinaryOp(e){return delete pL.binary_ops[e],e.length===pL.max_binop_len&&(pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops)),pL.right_associative.delete(e),pL}static removeAllBinaryOps(){return pL.binary_ops={},pL.max_binop_len=0,pL}static removeLiteral(e){return delete pL.literals[e],pL}static removeAllLiterals(){return pL.literals={},pL}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 pL(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 pL.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!pL.binary_ops[String.fromCharCode(e)]||pL.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return pL.isIdentifierStart(e)||pL.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(pL.hooks[e]){let t={context:this,node:n};return pL.hooks.run(e,t),t.node}return n}searchHook(e){if(pL.hooks[e]){let n={context:this};return pL.hooks[e].find(function(e){return e.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let e=this.code;for(;e===pL.SPACE_CODE||e===pL.TAB_CODE||e===pL.LF_CODE||e===pL.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:pL.COMPOUND,body:e};return this.runHook("after-all",n)}gobbleExpressions(e){let n=[],t,a;for(;this.index<this.expr.length;)if((t=this.code)===pL.SEMCOL_CODE||t===pL.COMMA_CODE)this.index++;else if(a=this.gobbleExpression())n.push(a);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,pL.max_binop_len),n=e.length;for(;n>0;){if(pL.binary_ops.hasOwnProperty(e)&&(!pL.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!pL.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,a,o,r,i,s,l;if(!(r=this.gobbleToken())||!(n=this.gobbleBinaryOp()))return r;for(o={value:n,prec:pL.binaryPrecedence(n),right_a:pL.right_associative.has(n)},(i=this.gobbleToken())||this.throwError("Expected expression after "+n),a=[r,o,i];n=this.gobbleBinaryOp();){if(0===(t=pL.binaryPrecedence(n))){this.index-=n.length;break}o={value:n,prec:t,right_a:pL.right_associative.has(n)},l=n;let s=e=>o.right_a&&e.right_a?t>e.prec:t<=e.prec;for(;a.length>2&&s(a[a.length-2]);)i=a.pop(),n=a.pop().value,r=a.pop(),e={type:pL.BINARY_EXP,operator:n,left:r,right:i},a.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),a.push(o,e)}for(s=a.length-1,e=a[s];s>1;)e={type:pL.BINARY_EXP,operator:a[s-1].value,left:a[s-2],right:e},s-=2;return e}gobbleToken(){let e,n,t,a;if(this.gobbleSpaces(),a=this.searchHook("gobble-token"))return this.runHook("after-token",a);if(e=this.code,pL.isDecimalDigit(e)||e===pL.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===pL.SQUOTE_CODE||e===pL.DQUOTE_CODE)a=this.gobbleStringLiteral();else if(e===pL.OBRACK_CODE)a=this.gobbleArray();else{for(t=(n=this.expr.substr(this.index,pL.max_unop_len)).length;t>0;){if(pL.unary_ops.hasOwnProperty(n)&&(!pL.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!pL.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:pL.UNARY_EXP,operator:n,argument:e,prefix:!0})}n=n.substr(0,--t)}pL.isIdentifierStart(e)?(a=this.gobbleIdentifier(),pL.literals.hasOwnProperty(a.name)?a={type:pL.LITERAL,value:pL.literals[a.name],raw:a.name}:a.name===pL.this_str&&(a={type:pL.THIS_EXP})):e===pL.OPAREN_CODE&&(a=this.gobbleGroup())}return a?(a=this.gobbleTokenProperty(a),this.runHook("after-token",a)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let n=this.code;for(;n===pL.PERIOD_CODE||n===pL.OBRACK_CODE||n===pL.OPAREN_CODE||n===pL.QUMARK_CODE;){let t;if(n===pL.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==pL.PERIOD_CODE)break;t=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===pL.OBRACK_CODE?((e={type:pL.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==pL.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===pL.OPAREN_CODE?e={type:pL.CALL_EXP,arguments:this.gobbleArguments(pL.CPAREN_CODE),callee:e}:(n===pL.PERIOD_CODE||t)&&(t&&this.index--,this.gobbleSpaces(),e={type:pL.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(;pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===pL.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);pL.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++));pL.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);pL.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return t=this.code,pL.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(t===pL.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===pL.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:pL.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",n=this.index,t=this.expr.charAt(this.index++),a=!1;for(;this.index<this.expr.length;){let n=this.expr.charAt(this.index++);if(n===t){a=!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 a||this.throwError('Unclosed quote after "'+e+'"'),{type:pL.LITERAL,value:e,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let e=this.code,n=this.index;for(pL.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,pL.isIdentifierPart(e))this.index++;else break;return{type:pL.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(e){let n=[],t=!1,a=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){t=!0,this.index++,e===pL.CPAREN_CODE&&a&&a>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===pL.COMMA_CODE){if(this.index++,++a!==n.length){if(e===pL.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===pL.CBRACK_CODE)for(let e=n.length;e<a;e++)n.push(null)}}else if(n.length!==a&&0!==a)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==pL.COMPOUND||this.throwError("Expected comma"),n.push(e)}}return t||this.throwError("Expected "+String.fromCharCode(e)),n}gobbleGroup(){this.index++;let e=this.gobbleExpressions(pL.CPAREN_CODE);if(this.code===pL.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:pL.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:pL.ARRAY_EXP,elements:this.gobbleArguments(pL.CBRACK_CODE)}}}Object.assign(pL,{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)})}}(pL),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"}),pL.max_unop_len=pL.getMaxKeyLen(pL.unary_ops),pL.max_binop_len=pL.getMaxKeyLen(pL.binary_ops);let pW=e=>new pL(e).parse(),pG=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(pL).filter(e=>!pG.includes(e)&&void 0===pW[e]).forEach(e=>{pW[e]=pL[e]}),pW.Jsep=pL,pW.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,a=this.gobbleExpression();if(a||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:a,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let a=t;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;n.node.test=a.right,a.right=n.node,n.node=t}}else this.throwError("Expected :")}})}});let pV="ArrowFunctionExpression",pU={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)}},pq={...pU,Promise};function pH(e,n={}){return pQ(e,n,p2)}async function pK(e,n={}){return p0(e,n,p2)}function pY(e,n={}){return pQ(e,n,p3)}function pJ(e,n={}){return p0(e,n,p3)}function pZ(e,n={}){return pQ(e,n,p5)}function pX(e,n={}){return p0(e,n,p5)}function pQ(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 a=p8(n,pU),o=p4("string"==typeof e?pW(e):e,a);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 p0(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 a=p8(n,pq);return Promise.resolve(p4("string"==typeof e?pW(e):e,a)).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 p1(e){return pW(e)}function p2(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function p3(e){return"boolean"==typeof e}function p5(e){return"number"==typeof e}function p4(e,n){switch(e.type){case"UnaryExpression":var t,a,o,r,i,s,l,c,p,u,d,f,m=e,h=n;let g=p4(m.argument,h);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var y=e,b=n;let v=p4(y.left,b),$=p4(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,a=n,p4(t.test,a)?p4(t.consequent,a):p4(t.alternate,a);case"CallExpression":var A=e,k=n;let w=A.arguments?.map(p7(k)),x=p4(A.callee,k);if(x){if("function"!=typeof x)throw`${ue(A.callee)} is not a function`}else throw`No function named ${ue(A.callee)} is defined in this context`;return x(...w);case"ArrowFunctionExpression":let C;return o=e,r=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,a)=>{let o=e[a];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 p4(o.body,r.addVariables(n))}).bind(r.thisObj??null);case"MemberExpression":return function(e,n){let t,a=p4(e.object,n);if(void 0===a)switch(e.object.type){case"Identifier":{let t=p6(e.object,n);throw ReferenceError(`ReferenceError: ${t} is not defined`)}case"MemberExpression":{let t=p6(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=a;if("string"==typeof a)o=String.prototype;else if("number"==typeof a)o=Number.prototype;else if("function"==typeof a);else if("object"!=typeof a)throw`VisitMemberExpression does not support member access on type ${typeof a}`;switch(n.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":t=p4(e.property,n);break;default:{let o=p4(e.property,n);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};p9(o),t=a[o]}}return"function"==typeof t?t.bind(a):t}(e,n);case"ArrayExpression":return i=e,s=n,i.elements?.map(p7(s));case"SequenceExpression":let E;return l=e,c=n,(E=l.expressions.map(p7(c)))[E.length-1];case"NewExpression":var S=e,D=n;if(S.callee&&"Identifier"===S.callee.type){let e=S.arguments?.map(p7(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 p9((p=e).value),p.value;case"Identifier":var M=e,z=n;p9(M.name);let O=z.thisObj;if(O&&("object"==typeof O||"function"==typeof O)&&M.name in O){let e=O[M.name];return p9(e),e}if(z.variables&&M.name in z.variables){let e=z.variables[M.name];return p9(e),e}return M.name in z.globals?z.globals[M.name]:void 0;case"TemplateLiteral":let P,T;return u=e,d=n,P=u.expressions?.map(p7(d))??[],(T=u.quasis?.map(p7(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+T.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 p6(e,n){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return p6(e.property,n);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function p8(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 p7(e){return function(n){return null===n?null:p4(n,e)}}function p9(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function ue(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function un(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:{...pq},isLocalExpression:!1,variables:new Set};return ut("string"==typeof e?pW(e):e,n),[...n.variables]}function ut(e,n){switch(e.type){case"UnaryExpression":return a=e,o=n,ut(a.argument,o);case"BinaryExpression":return r=e,i=n,[ut(r.left,i),ut(r.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=n,[ut(s.consequent,l),ut(s.test,l),ut(s.alternate,l)].filter(Boolean);case"CallExpression":let t;return c=e,p=n,t=ut(c.callee,p),c.arguments?.map(ua(p)),t;case"ArrowFunctionExpression":var a,o,r,i,s,l,c,p,u,d,f,m,h,g,y,b,v,$,A=e,k=n;let w={...k};w.isLocalExpression=!0;let x=A.params?.map(ua(w))??[],C=ut(A.body,w)??[];if(C&&Array.isArray(C))for(let e of C)x.includes(e)||k.variables.add(e);return;case"MemberExpression":let E;return u=e,d=n,ut(u.object,d),void((E={...d}).isLocalExpression=!0,ut(u.property,E));case"ArrayExpression":return f=e,m=n,void f.elements?.map(ua(m));case"SequenceExpression":return h=e,g=n,void h.expressions?.map(ua(g));case"NewExpression":return y=e,b=n,void y.arguments?.map(ua(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(ua($)),v.quasis?.map(ua($)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ua(e){return function(n){return null===n?null:ut(n,e)}}pW.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)})}}),pW.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 a=n.node;for(;a.type===e.MEMBER_EXP||a.type===e.CALL_EXP&&a.callee.type===e.MEMBER_EXP;)a=a.type===e.MEMBER_EXP?a.object:a.callee.object;a.type="NewExpression"}})}}),pW.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,a="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:a+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(a+=this.expr.charAt(this.index++),o());let r=this.char;("e"===r||"E"===r)&&(a+=this.expr.charAt(this.index++),("+"===(r=this.char)||"-"===r)&&(a+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+a+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+a+this.char+")");else if(i===e.PERIOD_CODE){a.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:a},null,2)}`),this.index=t;return}n.node={type:e.LITERAL,value:parseFloat(a),raw:this.expr.substring(t,this.index)}}e.hooks.add("gobble-token",function(a){if(48===this.code){var o,r,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,r=c,95===o||r.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,a);return}this.throwError("unexpected char within number")}a.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,a)})}}),pW.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(n){if(47===this.code){let t=++this.index,a=!1;for(;this.index<this.expr.length;){if(47===this.code&&!a){let a,o=this.expr.slice(t,this.index),r="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)r+=this.char;else break}try{a=new RegExp(o,r)}catch(e){this.throwError(e.message)}return n.node={type:e.LITERAL,value:a,raw:this.expr.slice(t-1,this.index)},n.node=this.gobbleTokenProperty(n.node),n.node}this.code===e.OBRACK_CODE?a=!0:a&&this.code===e.CBRACK_CODE&&(a=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),pW.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,a=this.gobbleExpression();if(a||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:a,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let a=t;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;n.node.test=a.right,a.right=n.node,n.node=t}}else this.throwError("Expected :")}})}}),pW.plugins.register({name:"jsepTemplateLiteral",init(e){function n(e,t=!0){if(96===this.code){let n={type:"TemplateLiteral",quasis:[],expressions:[]},a="",o="",r=!1,i=this.expr.length,s=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:a},tail:r});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,r=!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="",a="",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":a+="\n";break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;default:a+=i}else a+=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})}}),pW.addBinaryOp("in",7),pW.addBinaryOp("??",1);let uo=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:",""),a=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${t}`)||"{}");e[t]={enabled:"true"===localStorage.getItem(n),...a}}return e}()});function ur(e,n,t){uo.setState(a=>({flags:{...a.flags,[e]:{enabled:a.flags[e]?.enabled??!1,label:n,description:t}}}))}function ui(){let e=uo.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 us(e){return uo.getState().flags[e].enabled}function ul(e,n){uo.subscribe(t=>{n(t.flags[e].enabled)})}function uc(e,n){uo.setState(t=>({flags:{...t.flags,[e]:{...t.flags[e],enabled:n}}}))}function up(e){return!window.offlineEnabled||(e??navigator.onLine)}uo.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 uu=e8(function(e,n,t){eZ(e,n,t)});function ud(e=!0,n=!1){return uf(up(),e,n)}function uf(e,n=!0,t=!1){return!!(e?n:t)}let um=V("extensionsInternal",{slots:{},extensions:{}}),uh=()=>q("extensionsInternal",{slots:{},extensions:{}});function ug(e){let n=um.getState(),t=e(n);t!==n&&um.setState(t)}let uy=()=>q("extensions",{slots:{}});function ub(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});ne(nQ.getState().mountedExtensions,n)||nQ.setState({mountedExtensions:n})}ub(um.getState()),um.subscribe(ub);let u_=uh(),uv=uy(),u$=n1(),uA=n5();function uk(e,n,t,a,o){let r={},i=up(),s=Object.entries(a.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[a,l]of Object.entries(e.slots)){let{config:c}=n3(n,l.name),p=uT(a,e,c,t,s,i,o.session);r[a]={moduleName:l.moduleName,assignedExtensions:p}}ne(uv.getState().slots,r)||uv.setState({slots:r})}function uw(){uk(u_.getState(),u$.getState(),uA.getState(),uo.getState(),oA.getState())}function ux(e,n,t){return{moduleName:n,name:e,attachedIds:[],config:null,state:t}}function uC(e){let[n]=e.split("#");return n}function uE(e,n){let t=uC(n);return e.extensions[t]}function uS(e){return uE(u_.getState(),e)}u_.subscribe(e=>{uk(e,u$.getState(),uA.getState(),uo.getState(),oA.getState())}),u$.subscribe(e=>{uk(u_.getState(),e,uA.getState(),uo.getState(),oA.getState())}),uA.subscribe(e=>{uk(u_.getState(),u$.getState(),e,uo.getState(),oA.getState())}),uo.subscribe(e=>{uk(u_.getState(),u$.getState(),uA.getState(),e,oA.getState())}),oA.subscribe(e=>{uk(u_.getState(),u$.getState(),uA.getState(),uo.getState(),e)}),uw(),g(uw);let uD=e=>u_.setState(n=>(n.extensions[e.name]={...e,instances:[]},n));function uM(e,n){ug(t=>{let a=t.slots[e];return a?{...t,slots:{...t.slots,[e]:{...a,attachedIds:[...a.attachedIds,n]}}}:{...t,slots:{...t.slots,[e]:{...ux(e),attachedIds:[n]}}}})}function uz(e,n){ug(t=>{let a=t.slots[e];return a&&a.attachedIds.includes(n)?{...t,slots:{...t.slots,[e]:{...a,attachedIds:a.attachedIds.filter(e=>e!==n)}}}:t})}function uO(e){ug(n=>{let t=n.slots[e];return t?{...n,slots:{...n.slots,[e]:{...t,attachedIds:[]}}}:n})}function uP(e,n,t,a){let o=n.indexOf(e);if(-1!==o)return o;{if(void 0!==t)return 1e3+t;let n=a.indexOf(e);return -1!==n?2e3+n:-1}}function uT(e,n,t,a,o,r,i){let s=function(e,n){let t=e.add||[],a=e.remove||[],o=e.order||[],{extensions:r}=u_.getState();return[...n,...t].filter(e=>!a.includes(e)).sort((e,t)=>{let a=uP(e,o,r[uC(e)]?.order,n),i=uP(t,o,r[uC(t)]?.order,n);return -1===i?-1:-1===a?1:a-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}=n6(a,e,c),u=uu(s,n8(t,e,c)),d=uC(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||!oD(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(!pY(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&&!uf(r,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 uB(e){let n=u_.getState(),{config:t}=n2(e),a=uA.getState(),o=uo.getState(),r=oA.getState(),i=up();return uT(e,n,t,a,Object.entries(o.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),i,r.session)}let uI=(e,n,t)=>u_.setState(a=>{let o=a.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}.`),a;if(o&&o==e)return a;if(a.slots[n])return{...a,slots:{...a.slots,[n]:{...a.slots[n],moduleName:e,state:t}}};let r=ux(n,e,t);return{...a,slots:{...a.slots,[n]:{...r}}}});function uN(e,n,t=!1){u_.setState(a=>{let o=t?uu(a.slots[e].state,n):n;return{...a,slots:{...a.slots,[e]:{...a.slots[e],state:o}}}})}let uj=()=>uv.setState(()=>({slots:{},extensions:{}})),uR=V("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uF({name:e,basePath:n,mode:t,componentContext:a,state:o}){uR.setState({slotName:e,basePath:n,mode:t??"normal",componentContext:a,state:o})}function uL(e){uR.getState().slotName===e&&uR.setState(uR.getInitialState(),!0)}let uW=V("modalRegistry",{modals:{}});function uG(e){uW.setState(n=>(n.modals[e.name]=e,n))}function uV(e){let n=uW.getState().modals[e];if(!n){let t=uS(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.`),uG(n))}return n}let uU=V("workspaceRegistrations",{workspaces:{}}),uq=V("workspaceGroups",{workspaceGroups:{}});function uH(e){uU.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){uq.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 uY=new Set;function uJ(e){let n=uU.getState().workspaces;if(n[e])return n[e];{let n=uS(e);if(n){var t;let a;return uY.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.`),uY.add(e)),{name:n.name,title:(t=n,"string"==typeof(a=t?.meta?.title)?a:a&&"object"==typeof a?rb(t.moduleName,a.key,a.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 uZ(e){let n=uq.getState().workspaceGroups;if(n[e])return n[e];throw Error(`No workspace group named '${e}' has been registered.`)}let uX=V("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function uQ(e){let{registeredWorkspacesByName:n,registeredWindowsByName:t}=uX.getState(),a=n[e];if(a){let n=t[a.window];if(n)return n;throw Error(`No workspace window found with name: ${a.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u0(e){let{registeredGroupsByName:n,registeredWindowsByName:t}=uX.getState(),a=t[e];if(a){let t=n[a.group];if(t)return t;throw Error(`No workspace group found with name: ${a.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u1(e){let{openedWindows:n}=uX.getState();return n.findIndex(n=>n.openedWorkspaces.find(n=>n.workspaceName===e))}function u2(e,n){if(0==n.length)return;let{registeredGroupsByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace group ${t.name} more than once`);a[t.name]={...t,moduleName:e}}uX.setState({registeredGroupsByName:a})}function u3(e,n){if(0==n.length)return;let{registeredWindowsByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace window ${t.name} more than once`);let n={...t,moduleName:e};a[t.name]=n}uX.setState({registeredWindowsByName:a})}function u5(e,n){if(0==n.length)return;let{registeredWorkspacesByName:t}=uX.getState(),a={...t};for(let t of n){if(a[t.name])throw Error(`Cannot register workspace ${t.name} more than once`);let n={...t,moduleName:e};a[t.name]=n}uX.setState({registeredWorkspacesByName:a})}let u4=0;async function u6(e,n,t,a,o=e=>e,r={}){let i=uC(a),s=uS(a),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(ud(u,d)){ug(o=>({...o,extensions:{...o.extensions,[i]:{...o.extensions[i],instances:[...o.extensions[i].instances,{domElement:e,id:a,slotName:n,slotModuleName:t}]}}}));let s=await f(),u=u4++;l=ay(o({...s,name:`${n}/${i}-${u}`}),{...r,_meta:c,_extensionContext:{extensionId:a,extensionSlotName:n,extensionSlotModuleName:t,extensionModuleName:p},domElement:e})}}else console.warn(`Tried to render ${a} into ${n} but no DOM element was available.`);return l}var u8=t(60695),u7=t.n(u8);let u9=(0,u8.createContext)({moduleName:"",featureName:""});function de({to:e,templateParams:n,onBeforeNavigate:t,children:a,...o}){return(0,u8.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}`)},[]),u7().createElement("a",{onClick:a=>{0===a.button&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey&&(a.preventDefault(),t?.(a),or({to:e,templateParams:n})),0===a.button&&(a.ctrlKey||a.metaKey)&&t?.(a),0===a.button&&a.shiftKey&&t?.(a),1===a.button&&t?.(a)},href:oa(e,n),...o},a)}let dn=({state:e,children:n,...t})=>{let{extension:a}=(0,u8.useContext)(u9),o=(0,u8.useRef)(null),r=(0,u8.useRef)(Promise.resolve()),i=(0,u8.useCallback)(n=>{a?.extensionSlotName&&a.extensionSlotModuleName&&a.extensionSlotModuleName&&!o.current&&u6(n,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,u8.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":r.current&&r.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,u8.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,r.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(r.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),a?u7().createElement("div",{ref:i,"data-extension-id":a?.extensionId,style:{position:"relative"},...t}):null};function dt(e,n){"function"==typeof n&&(n=n(e));let t={};for(let[a,o]of Object.entries(n)){let n=function(...n){e.setState(e=>o(e,...n))};t[a]=n}return t}let da=()=>e=>e;function dr(e,n=da(),t){let a=(0,u8.useCallback)(n=>e.subscribe(n),[e]),o=(0,u8.useCallback)(()=>n(e.getState()),[e,n]),r=(0,u8.useSyncExternalStore)(a,o,o),i=(0,u8.useMemo)(()=>t?dt(e,t):{},[e,t]);return{...r,...i}}function di(e,n){return dr(e,da(),n)}function ds(e){return function(n){let t=(0,u8.useCallback)(n=>e.subscribe(n),[]),a=(0,u8.useCallback)(()=>e.getState(),[]),o=(0,u8.useSyncExternalStore)(t,a,a),r=(0,u8.useMemo)(()=>n?dt(e,n):{},[n]);return{...o,...r}}}let dl=e=>dr(uy(),n=>n.slots?.[e]);function dc(e){let n=dl(e);return n?.assignedExtensions??[]}function dp(e,n){let{moduleName:t}=(0,u8.useContext)(u9),a=(0,u8.useRef)(!0);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,u8.useEffect)(()=>{uI(t,e,n),a.current=!1},[]),(0,u8.useEffect)(()=>{a.current||uN(e,n)},[e,n]),{extensions:dc(e),extensionSlotName:e,extensionSlotModuleName:t}}function du(e){return e}function dd({name:e,extensionSlotName:n,select:t=du,children:a,state:o,style:r,...i}){if(a&&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,u8.useRef)(null),{extensions:c,extensionSlotModuleName:p}=dp(s,o),u=(0,u8.useMemo)(()=>t(c),[t,c]),d=(0,u8.useMemo)(()=>{if("function"==typeof a&&!u7().isValidElement(a))return u.map(e=>a(e,o))},[a,u]);return u7().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":p,style:{...r,position:"relative"},...i},s&&u?.map((e,n)=>u7().createElement(u9.Provider,{key:e.id,value:{moduleName:p,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:p}}},d?.[n]??("function"!=typeof a?a:null)??u7().createElement(dn,{state:o}))))}var df=t(5338);function dm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dh(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dm(Object(t),!0).forEach(function(n){var a,o,r;a=e,o=n,r=t[n],o in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dg(e){return(dg="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 dy(e){return(dy="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 db(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(dy(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(dy(e)));return e}}var d_=null;try{d_=require("react").createContext()}catch(e){}var dv={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 d$(e,n){return e.rootComponent?Promise.resolve():e.loadRootComponent(n).then(function(n){e.rootComponent=n})}function dA(e,n){return new Promise(function(t,a){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,r=dC(e,n,function(){t(this)}),i=db(e,n)(),s=function(e){var n=e.reactDom,t=e.renderType,a=e.elementToRender,o=e.domElement,r=n[t];if("function"!=typeof r)throw Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=r(o);return i.render(a),i;case"hydrateRoot":return r(o,a);default:return r(a,o),null}}({elementToRender:r,domElement:i,reactDom:dx(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[n.name]=i,e.renderResults[n.name]=s})}function dk(e,n){return new Promise(function(t){e.unmountResolves[n.name]=t;var a=e.renderResults[n.name];a&&a.unmount?a.unmount():dx(e).unmountComponentAtNode(e.domElements[n.name]),delete e.domElements[n.name],delete e.renderResults[n.name]})}function dw(e,n){return new Promise(function(t){e.updateResolves[n.name]||(e.updateResolves[n.name]=[]),e.updateResolves[n.name].push(t);var a=dC(e,n,null),o=e.renderResults[n.name];if(o&&o.render)o.render(a);else{var r=db(e,n)();dx(e).render(a,r)}})}function dx(e){return e.ReactDOMClient||e.ReactDOM}function dC(e,n,t){var a=e.React.createElement(e.rootComponent,n),o=d_?e.React.createElement(d_.Provider,{value:n},a):a;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,dh(dh({},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 dE=t(70287),dS=t(59324),dD=t(32108);let dM={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},dz=new Map;(0,dD.initCache)(dz);let dO={errorRetryCount:3,fetcher:o_,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof o$){let n=e.response.status;return!!(n>=500)||401===n||403===n||429===n}return!0},provider:()=>dz};function dP(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let n=Object.assign({},dM,e),t={...dO,...n.swrConfig};return function(e){var a,o,r,i,s;return r=o=class extends(a=u7().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 u7().createElement("div",null,"An error has occurred. Please try reloading the page.");{let a=u7().createElement(u8.Suspense,{fallback:null},u7().createElement(dS.BE,{value:t},u7().createElement(u9.Provider,{value:this.state.config},n.disableTranslations?u7().createElement(e,this.props):u7().createElement(dE.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},u7().createElement(e,this.props)))));return n.strictMode&&u7().StrictMode?u7().createElement(u7().StrictMode,null,a):a}}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 r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,o}}function dT(e,n){return function(e){if("object"!==dg(e))throw Error("single-spa-react requires a configuration object");var n,t=dh(dh({},dv),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");!d_&&t.React.createContext&&(d_=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 a={bootstrap:d$.bind(null,t),mount:dA.bind(null,t),unmount:dk.bind(null,t)};return t.parcelCanUpdate&&(a.update=dw.bind(null,t)),a}({React:u7(),ReactDOMClient:df,rootComponent:dP(n)(e)})}function dB(e,n){return()=>e().then(({default:e})=>dT(e,n))}function dI(e,n){return()=>Promise.resolve(dT(e,n))}let dN=dB,dj=L()(()=>({}));U("openmrs-app-context",dj);let dR={};function dF(e,n=e=>e){let t=dj.getState();return e in t?Object.freeze(Object.assign({},n?n(t[e]):t[e])):null}function dL(e,n){dj.setState(t=>(e in t||(t[e]={}),t[e]=n(t[e]),Object.assign({},t)))}function dW(e){return null===e?null:Object.freeze(Object.assign({},e))}let dG=new Map;function dV(e,n){let t=(0,u8.useRef)(n??{}),a=(0,u8.useRef)(n=>dL(e,n)),o=(0,u8.useRef)(Symbol());return(0,u8.useEffect)(()=>{let t=n??{},a=o.current;return null===dF(e)?!function(e,n=dR){dj.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===dR?{}: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.`),dL(e,()=>t)),dG.set(e,a),()=>{dG.get(e)===a&&(dj.setState(n=>(e in n&&delete n[e],n)),dG.delete(e))}},[e]),(0,u8.useEffect)(()=>{let a=n??{};N(t.current,a)||(dL(e,()=>a),t.current=a)},[n]),a.current}function dU({namespace:e,value:n}){return dV(e,n),null}let dq=({children:e,value:n,fallback:t})=>n?u7().createElement(u7().Fragment,null,e):t?u7().createElement(u7().Fragment,null,t):null;function dH(){let e=(0,u8.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,u8.useEffect)(()=>{let n=e.current;return()=>n?.abort()},[]),e.current}function dK(e,n=e=>e??{}){let[t,a]=(0,u8.useState)(()=>{if(dY(e))return;let t=dF(e);if(null!==t)return n?n(t):t});return(0,u8.useEffect)(()=>{if(dY(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,u8.useEffect)(()=>{var t;let o;return(t=e=>{if(null==e)return void a(void 0);let t=n?n(e):e;a(e=>N(e,t)?e:t)})(dW(o=dF(e))),dj.subscribe(n=>{let a=e in n?n[e]:null;a!==o&&(o=a,t(dW(a)))})},[e,n]),t}function dY(e){return"string"!=typeof e||0===e.trim().length}function dJ(e){let[n,t]=(0,u8.useState)([]);return(0,u8.useEffect)(()=>uy().subscribe(a=>{let o=a.slots[e]?.assignedExtensions.map(e=>e.id)??[];ne(o,n)||t(o)}),[]),n}function dZ(e,n){let{data:t,error:a,mutate:o,isLoading:r,isValidating:i}=(0,dS.Ay)(`${r9}?patient=${e}&includeEncounterless=${n}`,o_);return(0,u8.useMemo)(()=>({isLoading:r,data:t?.data.results??[],error:a,mutate:o,isValidating:i}),[t,a,r,i,o])}function dX(e){(0,u8.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dQ={},d0=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
16
|
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function d1(e){let{moduleName:n,extension:t}=(0,u8.useContext)(u9),a=e?.externalModuleName??n;if(!a&&!t)throw Error(d0);let o=function(e){let n=(0,u8.useMemo)(()=>n0(e),[e]),t=function(e){let[n,t]=(0,u8.useState)(()=>{let n=e.getState();return n.loaded&&n.config?n.config:null});return(0,u8.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&t(e.config)}),[e]),n}(n);if(!t)throw dQ[e]||(dQ[e]=new Promise(e=>{let t=n.subscribe(n=>{n.loaded&&n.config&&(e(n.config),t())})})),dQ[e];return t}(a),r=function(e){let n=(0,u8.useMemo)(n5,[]),t=function(e,n){let[t,a]=(0,u8.useState)(n?()=>{let t=n6(e.getState(),n.extensionSlotName,n.extensionId);if(t.loaded&&t.config)return t.config}:null);return(0,u8.useEffect)(()=>{if(n)return e.subscribe(e=>{let o=n6(e,n.extensionSlotName,n.extensionId);o.loaded&&o.config&&!ne(o.config,t)&&a(o.config)})},[e,n,t]),t}(n,e);if(!t&&e){let t=`${e.extensionSlotName}-${e.extensionId}`;throw!dQ[t]&&n&&(dQ[t]=new Promise(t=>{let a=n.subscribe(n=>{let o=n6(n,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(t(o.config),a())})})),dQ[t]}return t||{}}(t);return(0,u8.useMemo)(()=>e?.externalModuleName&&a===e.externalModuleName?{...o}:{...o,...r},[a,e?.externalModuleName,o,r])}let d2=dc;function d3(){let[e,n]=(0,u8.useState)(up());return(0,u8.useEffect)(()=>g(({online:e})=>n(e)),[]),e}function d5(e,n=300){let[t,a]=(0,u8.useState)(e);return(0,u8.useEffect)(()=>{let t=setTimeout(()=>{a(e)},n);return()=>{clearTimeout(t)}},[e,n]),t}var d4=t(31760),d6=t.n(d4);let d8=`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 d7(){let e=`${oh}/emrapi/configuration?v=${d8}`,n=d6()(e,o_);return(0,u8.useMemo)(()=>({emrConfiguration:n.data?.data,isLoadingEmrConfiguration:n.isLoading,mutateEmrConfiguration:n.mutate,errorFetchingEmrConfiguration:n.error}),[n])}let d9=ds(uh());function fe(e){let n=dc(e);return(0,u8.useMemo)(()=>Object.fromEntries(n.map(e=>[e.name,e.meta])),[n])}let fn=ds(uy());function ft(e){let{flags:n}=dr(uo);return n[e]?.enabled??!1}function fa(){let[,e]=(0,u8.useState)(0);return(0,u8.useCallback)(()=>{e(e=>e+1)},[])}function fo(e,n,t={}){return fi(e,n,fr,t)}let fr={getPaginatedUrl:(e,n,t)=>{if(!e)return null;{let a=new URL(ob(e.toString()),window.location.toString());return a.searchParams.set("limit",""+n),a.searchParams.set("startIndex",""+t),a.searchParams.set("totalCount","true"),a.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 fi(e,n,t,a={}){let{getPaginatedUrl:o,getTotalCount:r,getCurrentPageSize:i,getData:s}=t,{immutable:l,swrConfig:c}=a,p=a.fetcher??o_,[u,d]=(0,u8.useState)(1),f=(0,u8.useRef)(NaN),m=(0,u8.useRef)(NaN),h=(u-1)*n,g=(0,u8.useMemo)(()=>o(e,n,h),[e,n,h]),{data:y,...b}=(l?d6():dS.Ay)(g,p,c);y?.data&&(f.current=r(y?.data),m.current=i(y?.data));let v=Math.ceil(f.current/n),$=(0,u8.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,u8.useCallback)(()=>{$(u+1)},[e,u,v]),k=(0,u8.useCallback)(()=>{$(u-1)},[e,u,v]);return{data:s(y?.data),totalPages:v,totalCount:f.current,currentPage:u,currentPageSize:m,paginated:v>1,showNextButton:u<v,showPreviousButton:u>1,goTo:$,goToNext:A,goToPrevious:k,...b}}function fs(e,n,t={}){return fi(e,n,fl(),t)}function fl(){return{getPaginatedUrl:(e,n,t)=>{if(!e)return null;{let a=new URL(ob(e.toString()),window.location.toString());return a.searchParams.set("_count",""+n),a.searchParams.set("_getpagesoffset",""+t),a.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 fc=t(89366),fp=t.n(fc);function fu(e,n={}){return fd(e,fr,n)}function fd(e,n,t={}){let{swrInfiniteConfig:a,immutable:o}=t,{getNextUrl:r,getTotalCount:i,getData:s}=n,l=t.fetcher??o_,c=(0,u8.useCallback)((t,a)=>0==t?e?.toString()??null:n.getNextUrl(a.data),[e]),{data:p,size:u,setSize:d,...f}=fp()(c,l,{...a,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),m=r(p?.[p.length-1].data),h=i(p?.[0]?.data);return{data:p?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=m,loadMore:()=>{d((p?.length??0)+1)},nextUri:m,...f}}function ff(e,n={}){return fm(e,fr,n)}function fm(e,n,t={}){let a=fd(e,n,t),{hasMore:o,error:r,data:i,loadMore:s,isLoading:l,nextUri:c}=a;return((0,u8.useEffect)(()=>{o&&!r&&s()},[o,c]),t.partialData)?a:{...a,data:o||r?void 0:i,isLoading:l||o}}function fh(e,n={}){return fm(e,fl(),n)}function fg(e,n={}){return fd(e,fl(),n)}function fy(){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 fb(){let[e,n]=(0,u8.useState)(fy);return(0,u8.useEffect)(()=>{let e=()=>{n(fy())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let f_=e=>"small-desktop"===e||"large-desktop"===e;function fv(e){let n=(0,u8.useContext)(u9);(0,u8.useEffect)(()=>(n&&n.moduleName&&(e.componentContext=n),uF(e),()=>{uL(e.name)}),[n,e])}function f$(){return dr(uR)}function fA(e=null,n=null){let[t,a]=(0,u8.useState)([]);return(0,u8.useEffect)(()=>{let t=pS(e,n).subscribe(e=>{a(e)},e=>{console.error(e)});return()=>t.unsubscribe()},[e,n]),t}function fk(e,n=!0){let t=(0,u8.useRef)(null);return(0,u8.useEffect)(()=>{let a=a=>{n&&t.current&&a.target&&a.target instanceof Node&&(t.current.contains(a.target)||e(a))};return window.addEventListener("mousedown",a),window.addEventListener("touchstart",a),()=>{window.removeEventListener("mousedown",a),window.removeEventListener("touchstart",a)}},[e,n]),t}function fw(e){let n=(0,u8.useRef)();return(0,u8.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 fx(e,n={}){let{abortController:t,fetchInit:a,url:o,swrConfig:r}=n,i=dH(),s=(0,u8.useMemo)(()=>a?.signal??t?.signal??i.signal,[t?.signal,a?.signal,i.signal]),l=(0,u8.useCallback)(e=>o_(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),{...a,signal:s}),[s,a,o]);return(0,dS.Ay)(e,l,r)}function fC(e=[],n=10){let[t,a]=(0,u8.useState)(1),o=(0,u8.useMemo)(()=>"number"==typeof n&&n>0?Math.max(1,Math.ceil(e.length/n)):1,[e.length,n]),r=(0,u8.useMemo)(()=>{let a=(t-1)*n,o=(t+0)*n;return e.slice(a,o)},[e,t,n]),i=(0,u8.useCallback)(e=>{a(Math.max(1,Math.min(o,e)))},[a,o]),s=(0,u8.useCallback)(()=>{t<o&&a(t+1)},[t,o,a]),l=(0,u8.useCallback)(()=>{t>1&&a(t-1)},[t,a]);return(0,u8.useMemo)(()=>({results:r,totalPages:o,currentPage:t,paginated:e.length>n,showNextButton:t<o,showPreviousButton:t>1,goTo:i,goToNext:s,goToPrevious:l}),[r,o,e.length,n,t,i,s,l])}function fE(e,n,t,a){return{pageSizes:(0,u8.useMemo)(()=>{let t=Math.ceil(n/e);return isNaN(t)&&(t=0),[...Array(t).keys()].map(n=>(n+1)*e)},[e,n]),pageItemsCount:(0,u8.useMemo)(()=>e>n?n:e*t>n?e*(t-1)+a:e*t,[e,n,t,a])}}function fS(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function fD(e){let[n,t]=(0,u8.useState)(e??fS()),{data:a,error:o,isValidating:r}=(0,dS.Ay)(n?["patient",n]:null,()=>pA(n,{}));return(0,u8.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,u8.useMemo)(()=>({isLoading:r&&!o&&!a,patient:a,patientUuid:n,error:o}),[r,o,a,n])}function fM(){let e=`${oh}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:n,error:t,isLoading:a}=(0,dS.Ay)(e,o_);return(0,u8.useMemo)(()=>({primaryIdentifierCode:n?.data?.results[0]?.metadataUuid,isLoading:a,error:t}),[n,t,a])}function fz(e){let{extensions:n,extensionSlotModuleName:t}=dp(e);return e?n.map(n=>({state:a})=>u7().createElement(u9.Provider,{value:{moduleName:t,featureName:"",extension:{extensionId:n.id,extensionSlotName:e,extensionSlotModuleName:t}}},u7().createElement(dn,{state:a}))):[]}function fO(){let e=(0,u8.useRef)(),[n,t]=(0,u8.useState)(null),a=null;if(!n){if(i){let e=ox().getState();e.loaded&&(a=e.session)}else i=new Promise(n=>{let t=({loaded:t,session:o})=>{t&&(n(o),a=o,e.current&&(e.current(),e.current=void 0))};t(ox().getState()),a||(e.current=ox().subscribe(t))});if(a)t(a);else throw i}(0,u8.useEffect)(()=>(e.current||(e.current=ox().subscribe(({loaded:e,session:n})=>{e&&(a=n,t(n))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=n||a;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 fP=({privilege:e,fallback:n,children:t})=>{let[a,o]=(0,u8.useState)(null);return((0,u8.useEffect)(()=>{let e=ow({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),a&&oD(e,a))?u7().createElement(u7().Fragment,null,t):n?u7().createElement(u7().Fragment,null,n):null};var fT=t(92542),fB=t.n(fT),fI=t(47581);let fN={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 fj(e){let n=(0,u8.useId)();return(0,u8.useEffect)(()=>{let t=pB();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]),di(pB(),fN)}function fR(e,n=pP){let{patientUuid:t,manuallySetVisitUuid:a,setVisitContext:o}=fj(),r=e&&t==e?a:null,i=`?patient=${e}&v=${n}&includeInactive=false`,s=`/${r}?v=${n}`,{data:l,error:c,mutate:p,isValidating:u}=(0,dS.Ay)(e?`${oh}/visit${i}`:null,o_),{data:d,error:f,mutate:m,isValidating:h}=(0,dS.Ay)(e&&r?`${oh}/visit${s}`:null,o_),g=(0,u8.useMemo)(()=>l?.data.results.find(e=>null===e.stopDatetime)??null,[l]),y=(0,u8.useMemo)(()=>r&&d?d.data:null,[d,r]),b=(0,u8.useRef)(null);(0,u8.useEffect)(()=>{!u&&g&&t===e&&null===a&&o(g),h||(b.current&&y&&b.current.uuid===y.uuid&&!b.current.stopDatetime&&y.stopDatetime&&o(null),b.current=y)},[y,a,g,u,h,t]);let v=(0,u8.useCallback)(()=>{p(),m()},[p,m]);fj(v);let $=!!(!l||r&&!d),A=!!(r?f:c);return{error:c||f,mutate:v,isValidating:u||h,activeVisit:g,currentVisit:y,currentVisitIsRetrospective:!!r,isLoading:$&&!A}}function fF(){let[e,n]=(0,u8.useState)([]);return(0,u8.useEffect)(()=>{let e=pM().subscribe(e=>{n(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}fB().extend(fI);let fL=new Map;async function fW(e,n){let t=n.indexOf("#"),a=t>=0,o=a?n.substring(0,t):e,r=a?n.substring(t+1):n,i=await rL(o);return i&&Object.hasOwn(i,r)&&"function"==typeof i[r]?fV(o,i).then(()=>i[r]()):(i?i&&Object.hasOwn(i,r)?console.warn(`The export ${n}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${r}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${n} defined in ${e}'s routes.json`),fG)}let fG={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function fV(e,n){if(e in fL)await fL[e];else{let t=n??await rL(e);await (fL[e]=new Promise((n,a)=>{if(Object.hasOwn(t,"startupApp")){let o=t.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{tr(e),n(null)}).catch(a)}tr(e),n(null)}))}}function fU(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 fK(){fq.sort((e,n)=>e.appName.localeCompare(n.appName,"en"));let e=new Map;for(let n of fq){e.has(n.appName)?e.set(n.appName,e.get(n.appName)+1):e.set(n.appName,0);let t=e.get(n.appName),a=`${n.appName}-page-${t}`,o=n.containerDomId??"omrs-apps-container",r=document.getElementById(o),i=`single-spa-application:${a}`;if(r){let e=document.createElement("div");e.id=i,r?.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?aX(e,()=>fW(n.appName,n.component),function(e,{online:n,offline:t,featureFlag:a}){return window.offlineEnabled?o=>!!(navigator.onLine&&(n??!0)||!navigator.onLine&&t)&&(!a||!!us(a))&&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?a5(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)}(a,n)}}let fY={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 fJ(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fY.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fY.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fY.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fY.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fY.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fY.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fY.SMALL_DESKTOP_MAX)}let fZ=!1;function fX(){fZ||(window.addEventListener("resize",fJ),fJ(),fZ=!0)}var fQ=t(74848),f0=t(46942),f1=t.n(f0),f2=t(85072),f3=t.n(f2),f5=t(97825),f4=t.n(f5),f6=t(77659),f8=t.n(f6),f7=t(55056),f9=t.n(f7),me=t(10540),mn=t.n(me),mt=t(41113),ma=t.n(mt),mo=t(76097),mr={};mr.styleTagTransform=ma(),mr.setAttributes=f9(),mr.insert=f8().bind(null,"head"),mr.domAPI=f4(),mr.insertStyleElement=mn(),f3()(mo.A,mr);let mi=mo.A&&mo.A.locals?mo.A.locals:void 0;function ms({title:e,children:n}){let t="tablet"===fb();return(0,fQ.jsxs)("div",{className:f1()({[mi.tabletHeader]:t,[mi.desktopHeader]:!t}),children:[(0,fQ.jsx)("h4",{children:e}),n]})}let ml=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],mc={primaryColor:{_type:nG.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tP.oneOf(ml)]},secondaryColor:{_type:nG.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tP.oneOf(ml)]}},mp={"Brand color #1":{_default:"#005d5d",_type:nG.String},"Brand color #2":{_default:"#004144",_type:nG.String},"Brand color #3":{_default:"#007d79",_type:nG.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nG.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nG.UUID}}},implementationName:{_type:nG.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nG.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:nG.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:[tP.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:nG.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:nG.String}},diagnosisTags:mc};var mu=t(78068);let md={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},mf=e=>(0,fQ.jsx)(mu.GGC,{translateWithId:(e,n)=>{let t=md[e];return t?r_(t,e,n):e},...e});var mm=t(99158),mh={};mh.styleTagTransform=ma(),mh.setAttributes=f9(),mh.insert=f8().bind(null,"head"),mh.domAPI=f4(),mh.insertStyleElement=mn(),f3()(mm.A,mh);let mg=mm.A&&mm.A.locals?mm.A.locals:void 0,my=(0,u8.createContext)(null);function mb(){let e=(0,u8.useContext)(my);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function m_({menuTitle:e,children:n}){let[t,a]=u7().useState(!1),o=fk(()=>a(!1),t),r="tablet"===fb(),i=(0,u8.useCallback)(()=>a(e=>!e),[]),s=(0,u8.useRef)(null),l=(0,u8.useRef)(null),c=(0,u8.useId)(),p=`custom-overflow-menu-trigger-${c}`,u=`custom-overflow-menu-${c}`,d=(0,u8.useCallback)(()=>{a(!1),s.current?.focus()},[]),f=(0,u8.useMemo)(()=>({closeMenu:d}),[d]),m=(0,u8.useCallback)(e=>{"Escape"===e.key&&t&&(e.stopPropagation(),d())},[d,t]),h=u8.Children.toArray(n);(0,u8.useEffect)(()=>{if(t&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[t]);let g=(0,u8.useCallback)(({currentIndex:e,direction:n})=>{let t=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let a=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(t).indexOf(a);if(-1===o)return void t[n>0?0:t.length-1]?.focus();let r=o+n,i=r<0?t.length-1:r>=t.length?0:r;t[i]?.focus()},[]),y=h.map((e,n)=>(0,u8.isValidElement)(e)?(0,u8.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:n}):e);return(0,fQ.jsxs)("div",{"data-overflow-menu":!0,className:f1()("cds--overflow-menu",mg.container),ref:o,children:[(0,fQ.jsx)("button",{className:f1()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":t},mg.overflowMenuButton),"aria-controls":u,"aria-expanded":t,"aria-haspopup":"true",id:p,onClick:i,onKeyDown:m,ref:s,children:e}),(0,fQ.jsxs)("div",{className:f1()("cds--overflow-menu-options","cds--overflow-menu--flip",mg.menu,{[mg.show]:t}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:u,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,fQ.jsx)("ul",{className:f1()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":r}),children:(0,fQ.jsx)(my.Provider,{value:f,children:y})}),(0,fQ.jsx)("span",{})]})]})}function mv(e){let n=(0,u8.useContext)(my);return(0,fQ.jsx)(mu.XSD,{...e,closeMenu:n?.closeMenu})}var m$=t(57283),mA=t(30424),mk={};mk.styleTagTransform=ma(),mk.setAttributes=f9(),mk.insert=f8().bind(null,"head"),mk.domAPI=f4(),mk.insertStyleElement=mn(),f3()(mA.A,mk);let mw=mA.A&&mA.A.locals?mA.A.locals:void 0,mx=["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"],mC=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-activity",iconProps:e})})),mE=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-add",iconProps:e})})),mS=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-down",iconProps:e})})),mD=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-left",iconProps:e})})),mM=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-right",iconProps:e})})),mz=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-up",iconProps:e})})),mO=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-baby",iconProps:e})})),mP=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),mT=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-calendar",iconProps:e})})),mB=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-down",iconProps:e})})),mI=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-left",iconProps:e})})),mN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-right",iconProps:e})})),mj=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-up",iconProps:e})})),mR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chart-average",iconProps:e})})),mF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chart-line",iconProps:e})})),mL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-checkmark-filled",iconProps:e})})),mW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-checkmark-outline",iconProps:e})})),mG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chemistry",iconProps:e})})),mV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-down",iconProps:e})})),mU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-left",iconProps:e})})),mq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-right",iconProps:e})})),mH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-up",iconProps:e})})),mK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close",iconProps:e})})),mY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close-filled",iconProps:e})})),mJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close-outline",iconProps:e})})),mZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-document",iconProps:e})})),mX=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-document-attachment",iconProps:e})})),mQ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-download",iconProps:e})})),m0=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-drug-order",iconProps:e})})),m1=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-edit",iconProps:e})})),m2=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-event-schedule",iconProps:e})})),m3=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-events",iconProps:e})})),m5=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-female",iconProps:e})})),m4=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-male",iconProps:e})})),m6=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-other",iconProps:e})})),m8=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-unknown",iconProps:e})})),m7=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-generic-order-type",iconProps:e})})),m9=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-group",iconProps:e})})),he=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-group-access",iconProps:e})})),hn=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-hospital-bed",iconProps:e})})),ht=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-image-medical",iconProps:e})})),ha=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information",iconProps:e})})),ho=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information-filled",iconProps:e})})),hr=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information-square",iconProps:e})})),hi=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-inventory-management",iconProps:e})})),hs=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-lab-order",iconProps:e})})),hl=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-list-checked",iconProps:e})})),hc=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-location",iconProps:e})})),hp=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-material-order",iconProps:e})})),hu=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-maximize",iconProps:e})})),hd=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-medication",iconProps:e})})),hf=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-message-queue",iconProps:e})})),hm=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-microscope",iconProps:e})})),hh=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-money",iconProps:e})})),hg=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-mother",iconProps:e})})),hy=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-movement",iconProps:e})})),hb=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h_=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),hv=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-password",iconProps:e})})),h$=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-pedestrian-family",iconProps:e})})),hA=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-pen",iconProps:e})})),hk=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-printer",iconProps:e})})),hw=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-procedure-order",iconProps:e})})),hx=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-programs",iconProps:e})})),hC=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-referral-order",iconProps:e})})),hE=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-renew",iconProps:e})})),hS=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-report",iconProps:e})})),hD=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-reset",iconProps:e})})),hM=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-save",iconProps:e})})),hz=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-search",iconProps:e})})),hO=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-settings",iconProps:e})})),hP=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-switcher",iconProps:e})})),hT=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-shopping-cart",iconProps:e})})),hB=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),hI=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-sticky-note-add",iconProps:e})})),hN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-syringe",iconProps:e})})),hj=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-table-of-contents",iconProps:e})})),hR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-table",iconProps:e})})),hF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-time",iconProps:e})})),hL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-tools",iconProps:e})})),hW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-translate",iconProps:e})})),hG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-trash-can",iconProps:e})})),hV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-tree-view--alt",iconProps:e})})),hU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-avatar",iconProps:e})})),hq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-follow",iconProps:e})})),hH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-xray",iconProps:e})})),hK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user",iconProps:e})})),hY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-view-off",iconProps:e})})),hJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-view",iconProps:e})})),hZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-warning",iconProps:e})})),hX=hZ,hQ=mX,h0=hl,h1=ht,h2=hB,h3=(0,u8.memo)((0,u8.forwardRef)(function({icon:e,fallback:n,...t},a){let o=(0,u8.useRef)(e?document.getElementById(e):void 0);return(0,u8.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,fQ.jsx)(dq,{value:o.current,fallback:n,children:(0,fQ.jsx)(h5,{ref:a,icon:e,iconProps:t})})})),h5=(0,u8.memo)((0,u8.forwardRef)(function({icon:e,iconProps:n},t){let{className:a,fill:o,size:r}=Object.assign({},{fill:"currentColor",size:20},n);(r<=0||r>72)&&(console.error(`Invalid size '${r}' specified for ${e}. Defaulting to 20.`),r=20);let i=(0,u8.useRef)(null);return(0,u8.useImperativeHandle)(t,()=>i.current),(0,u8.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fQ.jsx)("svg",{ref:i,className:f1()("omrs-icon",mw.icon,a),height:r,width:r,viewBox:"0 0 16 16",children:(0,fQ.jsx)("use",{href:`#${e}`})})}));var h4=t(28852),h6={};h6.styleTagTransform=ma(),h6.setAttributes=f9(),h6.insert=f8().bind(null,"head"),h6.domAPI=f4(),h6.insertStyleElement=mn(),f3()(h4.A,h6);let h8=h4.A&&h4.A.locals?h4.A.locals:void 0,h7=({path:e,title:n,basePath:t,icon:a})=>{let{t:o}=(0,dE.useTranslation)(),r=(0,m$.useLocation)(),i=(0,u8.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)),a=(r.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return a.some((e,n)=>t.every((e,t)=>a[n+t]===e))},[r.pathname,e]);return(0,fQ.jsx)("div",{children:(0,fQ.jsx)(de,{className:f1()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${t}/${encodeURIComponent(e)}`,children:(0,fQ.jsxs)("span",{className:h8.menu,children:[(0,fQ.jsx)(h3,{icon:a,className:h8.icon,size:16}),(0,fQ.jsx)("span",{children:o(n)})]})})},e)};function h9(e){return function({basePath:n}){return(0,fQ.jsx)(m$.BrowserRouter,{children:(0,fQ.jsx)(h7,{basePath:n,...e})})}}function ge(e){let n=(0,u8.useRef)(null);return(0,u8.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function gn(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let gt="u">typeof document?u7().useLayoutEffect:()=>{};function ga(e){let n=(0,u8.useRef)(null);return gt(()=>{n.current=e},[e]),(0,u8.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let go={prefix:String(Math.round(1e10*Math.random())),current:0},gr=u7().createContext(go),gi=u7().createContext(!1),gs=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),gl="function"==typeof u7().useId?function(e){let n=u7().useId(),[t]=(0,u8.useState)(gd()),a=t?"react-aria":`react-aria${go.prefix}`;return e||`${a}-${n}`}:function(e){let n=(0,u8.useContext)(gr),t=function(e=!1){let n=(0,u8.useContext)(gr),t=(0,u8.useRef)(null);if(null===t.current&&!e){var a,o;let e=null==(o=u7().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(a=o.ReactCurrentOwner)?void 0:a.current;if(e){let t=gs.get(e);null==t?gs.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,gs.delete(e))}t.current=++n.current}return t.current}(!!e),a=`react-aria${n.prefix}`;return e||`${a}-${t}`};function gc(){return!1}function gp(){return!0}function gu(e){return()=>{}}function gd(){return"function"==typeof u7().useSyncExternalStore?u7().useSyncExternalStore(gu,gc,gp):(0,u8.useContext)(gi)}let gf=!!("u">typeof window&&window.document&&window.document.createElement),gm=new Map;function gh(e){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(null),o=gl(n),r=(0,u8.useRef)(null);if(s&&s.register(r,o),gf){let e=gm.get(o);e&&!e.includes(a)?e.push(a):gm.set(o,[a])}return gt(()=>()=>{s&&s.unregister(r),gm.delete(o)},[o]),(0,u8.useEffect)(()=>{let e=a.current;return e&&t(e),()=>{e&&(a.current=null)}}),o}function gg(e=[]){let n=gh(),[t,a]=function(e){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(null),o=ga(()=>{if(!a.current)return;let e=a.current.next();if(e.done){a.current=null;return}n===e.value?o():t(e.value)});gt(()=>{a.current&&o()});let r=ga(e=>{a.current=e(n),o()});return[n,r]}(n),o=(0,u8.useCallback)(()=>{a(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,a]);return gt(o,[n,o,...e]),t}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{gm.delete(e)}));let gy=function(){for(var e,n,t=0,a="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=function e(n){var t,a,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(t=0;t<r;t++)n[t]&&(a=e(n[t]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}(e))&&(a&&(a+=" "),a+=n);return a};function gb(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let a=e[t];for(let e in a){let t=n[e],o=a[e];"function"==typeof t&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=gn(t,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof o?n[e]=gy(t,o):"id"===e&&t&&o?n.id=function(e,n){if(e===n)return e;let t=gm.get(e);if(t)return t.forEach(e=>e.current=n),n;let a=gm.get(n);return a?(a.forEach(n=>n.current=e),e):n}(t,o):n[e]=void 0!==o?o:t}}return n}let g_=Symbol("default");function gv({values:e,children:n}){for(let[t,a]of e)n=u7().createElement(t.Provider,{value:a},n);return n}function g$(e){let{className:n,style:t,children:a,defaultClassName:o,defaultChildren:r,defaultStyle:i,values:s}=e;return(0,u8.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 a?a({...s,defaultChildren:r}):null==a?r:a,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=c?c:r,"data-rac":""}},[n,t,a,o,r,i,s])}function gA(e,n){let t=(0,u8.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||g_;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),a=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${a} Valid slot names are ${e}.`)}return t.slots[e]}return t}function gk(e,n,t){let{ref:a,...o}=gA(t,e.slot)||{},r=ge((0,u8.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,a),[n,a])),i=gb(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,a={...n.defaultStyle,...t},r="function"==typeof e.style?e.style({...n,defaultStyle:a}):e.style;return{...a,...r}}:i.style={...o.style,...e.style}),[i,r]}function gw(e=!0){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(!1),o=(0,u8.useCallback)(e=>{a.current=!0,t(!!e)},[]);return gt(()=>{a.current||t(!1)},[]),[o,n]}function gx(e){let n=/^(data-.*)$/,t={};for(let a in e)n.test(a)||(t[a]=e[a]);return t}let gC=(0,u8.createContext)(null),gE=null;function gS(e,n="assertive",t=7e3){gE?gE.announce(e,n,t):(gE=new gD,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?gE.announce(e,n,t):setTimeout(()=>{(null==gE?void 0:gE.isAttached())&&(null==gE||gE.announce(e,n,t))},100))}class gD{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 a,o;if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===n?null==(a=this.assertiveLog)||a.appendChild(r):null==(o=this.politeLog)||o.appendChild(r),""!==e&&setTimeout(()=>{r.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 gM=new Set(["id"]),gz=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gO=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gP=/^(data-.*)$/;function gT(e,n={}){let{labelable:t,isLink:a,propNames:o}=n,r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(gM.has(n)||t&&gz.has(n)||a&&gO.has(n)||(null==o?void 0:o.has(n))||gP.test(n))&&(r[n]=e[n]);return r}let gB=["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"])'],gI=gB.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";gB.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let gN=gB.join(':not([hidden]):not([tabindex="-1"]),');function gj(e){return e.matches(gI)}function gR(e){return e.matches(gN)}let gF=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},gL=e=>e&&"window"in e&&e.window===e?e:gF(e).defaultView||window;function gW(e){if(function(){if(null==gG){gG=!1;try{document.createElement("div").focus({get preventScroll(){return gG=!0,!0}})}catch{}}return gG}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],a=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==a;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return a instanceof HTMLElement&&t.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:a}of e)n.scrollTop=t,n.scrollLeft=a}(n)}}let gG=null;function gV(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gU(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function gq(e){let n=(0,u8.useRef)({isFocused:!1,observer:null});gt(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=ga(n=>{null==e||e(n)});return(0,u8.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let a=e.target;a.addEventListener("focusout",e=>{n.current.isFocused=!1,a.disabled&&t(gV(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&a.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let gH=!1;function gK(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 gY(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 gJ(e){let n=null;return()=>(null==n&&(n=e()),n)}let gZ=gJ(function(){return gY(/^Mac/i)}),gX=gJ(function(){return gY(/^iPhone/i)}),gQ=gJ(function(){return gY(/^iPad/i)||gZ()&&navigator.maxTouchPoints>1}),g0=gJ(function(){return gX()||gQ()});gJ(function(){return gZ()||g0()});let g1=gJ(function(){return gK(/AppleWebKit/i)&&!g2()}),g2=gJ(function(){return gK(/Chrome/i)}),g3=gJ(function(){return gK(/Android/i)}),g5=gJ(function(){return gK(/Firefox/i)}),g4=new Map,g6=new Set;function g8(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let a=g4.get(t.target);if(a&&(a.delete(t.propertyName),0===a.size&&(t.target.removeEventListener("transitioncancel",n),g4.delete(t.target)),0===g4.size)){for(let e of g6)e();g6.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let a=g4.get(t.target);a||(a=new Set,g4.set(t.target,a),t.target.addEventListener("transitioncancel",n,{once:!0})),a.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function g7(e){requestAnimationFrame(()=>{0===g4.size?e():g6.add(e)})}"u">typeof document&&("loading"!==document.readyState?g8():document.addEventListener("DOMContentLoaded",g8));let g9="default",ye="",yn=new WeakMap;function yt(e){if(g0())"disabled"===g9&&(g9="restoring",setTimeout(()=>{g7(()=>{if("restoring"===g9){let n=gF(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=ye||""),ye="",g9="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&yn.has(e)){let n=yn.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),yn.delete(e)}}let ya=u7().createContext({register:()=>{}});function yo(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function yr(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function yi(e,n,t){var a=yo(e,n,"set");if(a.set)a.set.call(e,t);else{if(!a.writable)throw TypeError("attempted to set read only private field");a.value=t}return t}function ys(e,n){gt(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function yl(){let e=(0,u8.useRef)(new Map),n=(0,u8.useCallback)((n,t,a,o)=>{let r=(null==o?void 0:o.once)?(...n)=>{e.current.delete(a),a(...n)}:a;e.current.set(a,{type:t,eventTarget:n,fn:r,options:o}),n.addEventListener(t,r,o)},[]),t=(0,u8.useCallback)((n,t,a,o)=>{var r;let i=(null==(r=e.current.get(a))?void 0:r.fn)||a;n.removeEventListener(t,i,o),e.current.delete(a)},[]),a=(0,u8.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,u8.useEffect)(()=>a,[a]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:a}}ya.displayName="PressResponderContext";function yc(e,n){return!!n&&!!e&&e.contains(n)}function yp(e){return e.target}function yu(e,n,t=!0){var a,o;let{metaKey:r,ctrlKey:i,altKey:s,shiftKey:l}=n;g5()&&(null==(o=window.event)||null==(a=o.type)?void 0:a.startsWith("key"))&&"_blank"===e.target&&(gZ()?r=!0:i=!0);let c=g1()&&gZ()&&!gQ()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});yu.isOpening=t,gW(e),e.dispatchEvent(c),yu.isOpening=!1}function yd(e){return 0===e.mozInputSource&&!!e.isTrusted||(g3()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}yu.isOpening=!1;var yf=t(40961),ym=new WeakMap;class yh{continuePropagation(){yi(this,ym,!1)}get shouldStopPropagation(){var e;return e=yo(this,ym,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,a){var o;yr(this,ym,{writable:!0,value:void 0}),yi(this,ym,!0);let r=null!=(o=null==a?void 0:a.target)?o:t.currentTarget;const i=null==r?void 0:r.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 yg=Symbol("linkClicked");function yy(e){let{onPress:n,onPressChange:t,onPressStart:a,onPressEnd:o,onPressUp:r,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:d,...f}=function(e){let n=(0,u8.useContext)(ya);if(n){let{register:t,...a}=n;e=gb(a,e),t()}return ys(n,e.ref),e}(e),[m,h]=(0,u8.useState)(!1),g=(0,u8.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=yl(),v=ga((e,n)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let r=!0;if(o.isTriggeringEvent=!0,a){let t=new yh("pressstart",n,e);a(t),r=t.shouldStopPropagation}return t&&t(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),r}),$=ga((e,a,r=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let n=new yh("pressend",a,e);o(n),l=n.shouldStopPropagation}if(t&&t(!1),h(!1),n&&r&&!s){let t=new yh("press",a,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),A=ga((e,n)=>{let t=g.current;if(s)return!1;if(r){t.isTriggeringEvent=!0;let a=new yh("pressup",n,e);return r(a),t.isTriggeringEvent=!1,a.shouldStopPropagation}return!0}),k=ga(e=>{let n=g.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&$(yv(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,b(),u||yt(n.target),n.disposables))t();n.disposables=[]}}),w=ga(e=>{p&&k(e)}),x=ga(e=>{null==i||i(e)}),C=ga((e,n)=>{if(i){let t=new MouseEvent("click",e);gU(t,n),i(gV(t))}}),E=(0,u8.useMemo)(()=>{let e=g.current,n={onKeyDown(n){if(y_(n.nativeEvent,n.currentTarget)&&yc(n.currentTarget,yp(n.nativeEvent))){var a;y$(yp(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 a=n.currentTarget;y(gF(n.currentTarget),"keyup",gn(n=>{y_(n,a)&&!n.repeat&&yc(a,yp(n))&&e.target&&A(yv(e.target,n),"keyboard")},t),!0)}o&&n.stopPropagation(),n.metaKey&&gZ()&&(null==(a=e.metaKeyEvents)||a.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||yc(n.currentTarget,yp(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!yu.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||yd(n.nativeEvent))){let e=v(n,"virtual"),a=A(n,"virtual"),o=$(n,"virtual");x(n),t=e&&a&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let a=e.pointerType||n.nativeEvent.pointerType||"virtual";t=$(yv(n.currentTarget,n),a,!0),e.isOverTarget=!1,x(n),k(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,a,o;if(e.isPressed&&e.target&&y_(n,e.target)){y$(yp(n),n.key)&&n.preventDefault();let t=yp(n),o=yc(e.target,yp(n));$(yv(e.target,n),"keyboard",o),o&&C(n,e.target),b(),"Enter"!==n.key&&yb(e.target)&&yc(e.target,t)&&!n[yg]&&(n[yg]=!0,yu(e.target,n,!1)),e.isPressed=!1,null==(a=e.metaKeyEvents)||a.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||!yc(n.currentTarget,yp(n.nativeEvent)))return;if(o=n.nativeEvent,!g3()&&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 r=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,u||function(e){if(g0()){if("default"===g9){let n=gF(e);ye=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}g9="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";yn.set(e,e.style[n]),e.style[n]="none"}}(e.target),r=v(n,e.pointerType);let o=yp(n.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(n.pointerId),y(gF(n.currentTarget),"pointerup",t,!1),y(gF(n.currentTarget),"pointercancel",a,!1)}r&&n.stopPropagation()},n.onMouseDown=n=>{if(yc(n.currentTarget,yp(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!gj(e);)e=e.parentElement;let n=gL(e),t=n.document.activeElement;if(!t||t===e)return;gH=!0;let a=!1,o=e=>{(e.target===t||a)&&e.stopImmediatePropagation()},r=n=>{(n.target===t||a)&&(n.stopImmediatePropagation(),e||a||(a=!0,gW(t),l()))},i=n=>{(n.target===e||a)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||a)&&(n.stopImmediatePropagation(),a||(a=!0,gW(t),l()))};n.addEventListener("blur",o,!0),n.addEventListener("focusout",r,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",o,!0),n.removeEventListener("focusout",r,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),gH=!1,a=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{yc(n.currentTarget,yp(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(yv(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,$(yv(e.target,n),e.pointerType,!1),w(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(yc(e.target,yp(n))&&null!=e.pointerType){let t=!1,a=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?k(n):(gW(e.target),e.target.click()))},80);y(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(a))}else k(n);e.isOverTarget=!1}},a=e=>{k(e)};n.onDragStart=e=>{yc(e.currentTarget,yp(e.nativeEvent))&&k(e)}}return n},[y,s,c,b,u,k,w,$,v,A,x,C]);return(0,u8.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof gL(e).Element&&"auto"===gL(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,u8.useEffect)(()=>{let e=g.current;return()=>{var n;for(let t of(u||yt(null!=(n=e.target)?n:void 0),e.disposables))t();e.disposables=[]}},[u]),{isPressed:l||m,pressProps:gb(f,E)}}function yb(e){return"A"===e.tagName&&e.hasAttribute("href")}function y_(e,n){let{key:t,code:a}=e,o=n.getAttribute("role");return("Enter"===t||" "===t||"Spacebar"===t||"Space"===a)&&!(n instanceof gL(n).HTMLInputElement&&!yk(n,t)||n instanceof gL(n).HTMLTextAreaElement||n.isContentEditable)&&!(("link"===o||!o&&yb(n))&&"Enter"!==t)}function yv(e,n){let t=n.clientX,a=n.clientY;return{currentTarget:e,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,clientX:t,clientY:a}}function y$(e,n){return e instanceof HTMLInputElement?!yk(e,n):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!yb(e))}let yA=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yk(e,n){return"checkbox"===e.type||"radio"===e.type?" "===n:yA.has(e.type)}let yw=null,yx=new Set,yC=new Map,yE=!1,yS=!1,yD={Tab:!0,Escape:!0};function yM(e,n){for(let t of yx)t(e,n)}function yz(e){yE=!0,e.metaKey||!gZ()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yw="keyboard",yM("keyboard",e))}function yO(e){yw="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(yE=!0,yM("pointer",e))}function yP(e){yd(e)&&(yE=!0,yw="virtual")}function yT(e){e.target!==window&&e.target!==document&&!gH&&e.isTrusted&&(yE||yS||(yw="virtual",yM("virtual",e)),yE=!1,yS=!1)}function yB(){gH||(yE=!1,yS=!0)}function yI(e){if("u"<typeof window||yC.get(gL(e)))return;let n=gL(e),t=gF(e),a=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){yE=!0,a.apply(this,arguments)},t.addEventListener("keydown",yz,!0),t.addEventListener("keyup",yz,!0),t.addEventListener("click",yP,!0),n.addEventListener("focus",yT,!0),n.addEventListener("blur",yB,!1),"u">typeof PointerEvent&&(t.addEventListener("pointerdown",yO,!0),t.addEventListener("pointermove",yO,!0),t.addEventListener("pointerup",yO,!0)),n.addEventListener("beforeunload",()=>{yN(e)},{once:!0}),yC.set(n,{focus:a})}let yN=(e,n)=>{let t=gL(e),a=gF(e);n&&a.removeEventListener("DOMContentLoaded",n),yC.has(t)&&(t.HTMLElement.prototype.focus=yC.get(t).focus,a.removeEventListener("keydown",yz,!0),a.removeEventListener("keyup",yz,!0),a.removeEventListener("click",yP,!0),t.removeEventListener("focus",yT,!0),t.removeEventListener("blur",yB,!1),"u">typeof PointerEvent&&(a.removeEventListener("pointerdown",yO,!0),a.removeEventListener("pointermove",yO,!0),a.removeEventListener("pointerup",yO,!0)),yC.delete(t))};function yj(){return"pointer"!==yw}"u">typeof document&&("loading"!==(d=gF(void 0)).readyState?yI(void 0):d.addEventListener("DOMContentLoaded",()=>{yI(void 0)}));let yR=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yF(e){let n=gF(e),t=((e=document)=>e.activeElement)(n);"virtual"===yw?g7(()=>{((e=document)=>e.activeElement)(n)===t&&e.isConnected&&gW(e)}):gW(e)}function yL(e){let{isDisabled:n,onFocus:t,onBlur:a,onFocusChange:o}=e,r=(0,u8.useCallback)(e=>{if(e.target===e.currentTarget)return a&&a(e),o&&o(!1),!0},[a,o]),i=gq(r),s=(0,u8.useCallback)(e=>{let n=gF(e.target),a=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();e.target===e.currentTarget&&a===yp(e.nativeEvent)&&(t&&t(e),o&&o(!0),i(e))},[o,t,i]);return{focusProps:{onFocus:!n&&(t||o||a)?s:void 0,onBlur:!n&&(a||o)?r:void 0}}}function yW(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 yG=u7().createContext(null);function yV(e,n){let{focusProps:t}=yL(e),{keyboardProps:a}={keyboardProps:e.isDisabled?{}:{onKeyDown:yW(e.onKeyDown),onKeyUp:yW(e.onKeyUp)}},o=gb(t,a),r=function(e){let n=(0,u8.useContext)(yG)||{};ys(n,e);let{ref:t,...a}=n;return a}(n),i=e.isDisabled?{}:r,s=(0,u8.useRef)(e.autoFocus);(0,u8.useEffect)(()=>{s.current&&n.current&&yF(n.current),s.current=!1},[n]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:gb({...o,tabIndex:l},i)}}function yU(e){let{isDisabled:n,onBlurWithin:t,onFocusWithin:a,onFocusWithinChange:o}=e,r=(0,u8.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=yl(),l=(0,u8.useCallback)(e=>{e.currentTarget.contains(e.target)&&r.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(r.current.isFocusWithin=!1,s(),t&&t(e),o&&o(!1))},[t,o,r,s]),c=gq(l),p=(0,u8.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let n=gF(e.target),t=((e=document)=>e.activeElement)(n);if(!r.current.isFocusWithin&&t===yp(e.nativeEvent)){a&&a(e),o&&o(!0),r.current.isFocusWithin=!0,c(e);let t=e.currentTarget;i(n,"focus",e=>{if(r.current.isFocusWithin&&!yc(t,e.target)){let a=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});gU(a,t),l(gV(a))}},{capture:!0})}},[a,o,c,i,l]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:l}}}function yq(e={}){var n;let{autoFocus:t=!1,isTextInput:a,within:o}=e,r=(0,u8.useRef)({isFocused:!1,isFocusVisible:t||yj()}),[i,s]=(0,u8.useState)(!1),[l,c]=(0,u8.useState)(()=>r.current.isFocused&&r.current.isFocusVisible),p=(0,u8.useCallback)(()=>c(r.current.isFocused&&r.current.isFocusVisible),[]),u=(0,u8.useCallback)(e=>{r.current.isFocused=e,s(e),p()},[p]);n={isTextInput:a},yI(),(0,u8.useEffect)(()=>{let e=(e,t)=>{var a;let o,i,s,l,c;a=!!(null==n?void 0:n.isTextInput),o=gF(null==t?void 0:t.target),i="u">typeof window?gL(null==t?void 0:t.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?gL(null==t?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?gL(null==t?void 0:t.target).HTMLElement:HTMLElement,c="u">typeof window?gL(null==t?void 0:t.target).KeyboardEvent:KeyboardEvent,(a=a||o.activeElement instanceof i&&!yR.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&t instanceof c&&!yD[t.key]||(e=>{r.current.isFocusVisible=e,p()})(yj())};return yx.add(e),()=>{yx.delete(e)}},[]);let{focusProps:d}=yL({isDisabled:o,onFocusChange:u}),{focusWithinProps:f}=yU({isDisabled:!o,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:o?f:d}}u7().forwardRef(function(e,n){let{children:t,...a}=e,o=ge(n),r={...a,ref:o};return u7().createElement(yG.Provider,{value:r},t)});let yH=!1,yK=0;function yY(e){"touch"===e.pointerType&&(yH=!0,setTimeout(()=>{yH=!1},50))}function yJ(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",yY),yK++,()=>{!(--yK>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",yY)}}function yZ(e){let{onHoverStart:n,onHoverChange:t,onHoverEnd:a,isDisabled:o}=e,[r,i]=(0,u8.useState)(!1),s=(0,u8.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,u8.useEffect)(yJ,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=yl(),{hoverProps:p,triggerHoverEnd:u}=(0,u8.useMemo)(()=>{let e=(e,n)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==n&&s.isHovered&&o&&(s.isHovered=!1,c(),a&&a({type:"hoverend",target:o,pointerType:n}),t&&t(!1),i(!1))},r={};return"u">typeof PointerEvent&&(r.onPointerEnter=a=>{yH&&"mouse"===a.pointerType||((a,r)=>{if(s.pointerType=r,o||"touch"===r||s.isHovered||!a.currentTarget.contains(a.target))return;s.isHovered=!0;let c=a.currentTarget;s.target=c,l(gF(a.target),"pointerover",n=>{s.isHovered&&s.target&&!yc(s.target,n.target)&&e(n,n.pointerType)},{capture:!0}),n&&n({type:"hoverstart",target:c,pointerType:r}),t&&t(!0),i(!0)})(a,a.pointerType)},r.onPointerLeave=n=>{!o&&n.currentTarget.contains(n.target)&&e(n,n.pointerType)}),{hoverProps:r,triggerHoverEnd:e}},[n,t,a,o,s,l,c]);return(0,u8.useEffect)(()=>{o&&u({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:p,isHovered:r}}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 yX=(0,u8.createContext)(!1);function yQ(e){let n=(n,t)=>(0,u8.useContext)(yX)?null:e(n,t);return n.displayName=e.displayName||e.name,(0,u8.forwardRef)(n)}let y0=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),y1=(0,u8.createContext)({}),y2=yQ(function(e,n){var t;[e,n]=gk(e,n,y1);let a=((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}=a,{buttonProps:r,isPressed:i}=function(e,n){let t,{elementType:a="button",isDisabled:o,onPress:r,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:p,allowFocusWhenDisabled:u,onClick:d,href:f,target:m,rel:h,type:g="button"}=e;t="button"===a?{type:g,disabled:o}:{role:"button",href:"a"!==a||o?void 0:f,target:"a"===a?m:void 0,type:"input"===a?g:void 0,disabled:"input"===a?o:void 0,"aria-disabled":o&&"input"!==a?o:void 0,rel:"a"===a?h:void 0};let{pressProps:y,isPressed:b}=yy({onPressStart:i,onPressEnd:s,onPressChange:c,onPress:r,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:p,ref:n}),{focusableProps:v}=yV(e,n);u&&(v.tabIndex=o?-1:v.tabIndex);let $=gb(v,y,gT(e,{labelable:!0}));return{isPressed:b,buttonProps:gb(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}=yq(e),{hoverProps:p,isHovered:u}=yZ({...e,isDisabled:e.isDisabled||o}),d={isHovered:u,isPressed:(a.isPressed||i)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=g$({...e,values:d,defaultClassName:"react-aria-Button"}),m=gh(r.id),h=gh(),g=r["aria-labelledby"];o&&(g?g=`${g} ${h}`:r["aria-label"]&&(g=`${m} ${h}`));let y=(0,u8.useRef)(o);return(0,u8.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?gS(e,"assertive"):y.current&&l&&!o&&gS(e,"assertive"),y.current=o},[o,l,g,m]),u7().createElement("button",{...gT(e,{propNames:y0}),...gb(r,s,p),...f,type:"submit"===r.type&&o?"button":r.type,id:m,ref:n,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":r["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},u7().createElement(gC.Provider,{value:{id:h}},f.children))});(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null);let y3=(0,u8.createContext)({}),y5=(0,u8.createContext)({}),y4=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,y5);let{elementType:t="span",...a}=e;return u7().createElement(t,{className:"react-aria-Text",...a,ref:n})}),y6=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),y8=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function y7(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 y6.has(n.script)}let n=e.split("-")[0];return y8.has(n)}let y9=Symbol.for("react-aria.i18n.locale");function be(){let e="u">typeof window&&window[y9]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:y7(e)?"rtl":"ltr"}}let bn=be(),bt=new Set;function ba(){for(let e of(bn=be(),bt))e(bn)}function bo(){let e=gd(),[n,t]=(0,u8.useState)(bn);return((0,u8.useEffect)(()=>(0===bt.size&&window.addEventListener("languagechange",ba),bt.add(t),()=>{bt.delete(t),0===bt.size&&window.removeEventListener("languagechange",ba)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let br=u7().createContext(null);function bi(e){let{locale:n,children:t}=e,a=bo(),o=u7().useMemo(()=>n?{locale:n,direction:y7(n)?"rtl":"ltr"}:a,[a,n]);return u7().createElement(br.Provider,{value:o},t)}function bs(){let e=bo();return(0,u8.useContext)(br)||e}var bl={};function bc(e,n){return e-n*Math.floor(e/n)}function bp(e,n,t,a){let o=(n=bd(e,n))-1,r=-2;return t<=2?r=0:bu(n)&&(r=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*t-362)/12+r+a)}function bu(e){return e%4==0&&(e%100!=0||e%400==0)}function bd(e,n){return"BC"===e?1-n:n}function bf(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}bl={"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 bm={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 bh{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),a=bc(n,146097),o=Math.floor(a/36524),r=bc(a,36524),i=Math.floor(r/1461),s=Math.floor(bc(r,1461)/365),[l,c]=bf(400*t+100*o+4*i+s+ +(4!==o&&4!==s)),p=e-bp(l,c,1,1),u=2;e<bp(l,c,3,1)?u=0:bu(c)&&(u=1);let d=Math.floor(((p+u)*12+373)/367),f=e-bp(l,c,d,1)+1;return new bN(l,c,d,f)}toJulianDay(e){return bp(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return bm[bu(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return bu(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 bg(e,n){let t=e.copy(),a="hour"in t?bC(t,n):0;by(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,bb(t),b_(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=a,function(e){for(;e.day<1;)e.month--,bb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,bb(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 r,i;let e=null==(r=(i=t.calendar).isInverseEra)?void 0:r.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 by(e,n){var t,a;(null==(t=(a=e.calendar).isInverseEra)?void 0:t.call(a,e))&&(n=-n),e.year+=n}function bb(e){for(;e.month<1;)by(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,by(e,1)}function b_(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 bv(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),b_(e)}function b$(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function bA(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),bv(t),t}function bk(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),bw(t),t}function bw(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 bx(e,n){let t=e%n;return t<0&&(t+=n),t}function bC(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=bx(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bx(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bx(e.minute,60),t=Math.floor(e.hour/24),e.hour=bx(e.hour,24),t}function bE(e,n){let t=e.copy();return bC(t,n),t}function bS(e,n,t,a){let o=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),r=n.indexOf(e.era);if(r<0)throw Error("Invalid era: "+e.era);r=bM(r,t,0,n.length-1,null==a?void 0:a.round),o.era=n[r],bv(o);break}case"year":var r,i;(null==(r=(i=o.calendar).isInverseEra)?void 0:r.call(i,o))&&(t=-t),o.year=bM(e.year,t,-1/0,9999,null==a?void 0:a.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bM(e.month,t,1,e.calendar.getMonthsInYear(e),null==a?void 0:a.round);break;case"day":o.day=bM(e.day,t,1,e.calendar.getDaysInMonth(e),null==a?void 0:a.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),bv(o),o}function bD(e,n,t,a){let o=e.copy();switch(n){case"hour":{let n=e.hour,r=0,i=23;if((null==a?void 0:a.hourCycle)===12){let e=n>=12;r=12*!!e,i=e?23:11}o.hour=bM(n,t,r,i,null==a?void 0:a.round);break}case"minute":o.minute=bM(e.minute,t,0,59,null==a?void 0:a.round);break;case"second":o.second=bM(e.second,t,0,59,null==a?void 0:a.round);break;case"millisecond":o.millisecond=bM(e.millisecond,t,0,999,null==a?void 0:a.round);break;default:throw Error("Unsupported field "+n)}return o}function bM(e,n,t,a,o=!1){if(o){(e+=Math.sign(n))<t&&(e=a);let o=Math.abs(n);(e=n>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>a&&(e=t)}else(e+=n)<t?e=a-(t-e-1):e>a&&(e=t+(e-a-1));return e}function bz(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?bY(bg(bQ(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):bV(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),b0(bZ(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function bO(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 bP(e){let n,t=b0(e,new bh);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 bT(e){return`${bP(e)}T${bO(e)}`}function bB(e){let n,t="object"==typeof e[0]?e.shift():new bh;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 bI=new WeakMap;class bN{copy(){return this.era?new bN(this.calendar,this.era,this.year,this.month,this.day):new bN(this.calendar,this.year,this.month,this.day)}add(e){return bg(this,e)}subtract(e){return bg(this,b$(e))}set(e){return bA(this,e)}cycle(e,n,t){return bS(this,e,n,t)}toDate(e){return bJ(this,e)}toString(){return bP(this)}compare(e){return b9(this,e)}constructor(...e){yr(this,bI,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e);this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,bv(this)}}var bj=new WeakMap;class bR{copy(){return new bR(this.hour,this.minute,this.second,this.millisecond)}add(e){return bE(this,e)}subtract(e){return bE(this,b$(e))}set(e){return bk(this,e)}cycle(e,n,t){return bD(this,e,n,t)}toString(){return bO(this)}compare(e){var n,t;return n=this,t=e,_e(n)-_e(t)}constructor(e=0,n=0,t=0,a=0){yr(this,bj,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=a,bw(this)}}var bF=new WeakMap;class bL{copy(){return this.era?new bL(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bL(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return bg(this,e)}subtract(e){return bg(this,b$(e))}set(e){return bA(bk(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 bD(this,e,n,t)}}toDate(e,n){return bJ(this,e,n)}toString(){return bT(this)}compare(e){var n,t;let a=b9(this,e);return 0===a?(n=this,t=bQ(e),_e(n)-_e(t)):a}constructor(...e){yr(this,bF,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e);this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bv(this)}}var bW=new WeakMap;class bG{copy(){return this.era?new bG(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bG(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bz(this,e)}subtract(e){return bz(this,b$(e))}set(e,n){let t,a;return 0===(a=bk(bA(t=bQ(this),e),e)).compare(t)?this:b0(bZ(bY(a,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,a){switch(n){case"hour":{let n=0,o=23;if((null==a?void 0:a.hourCycle)===12){let t=e.hour>=12;n=12*!!t,o=t?23:11}let r=bQ(e),i=b0(bk(r,{hour:n}),new bh),s=[bY(i,e.timeZone,"earlier"),bY(i,e.timeZone,"later")].filter(n=>bZ(n,e.timeZone).day===i.day)[0],l=b0(bk(r,{hour:o}),new bh),c=[bY(l,e.timeZone,"earlier"),bY(l,e.timeZone,"later")].filter(n=>bZ(n,e.timeZone).day===l.day).pop(),p=bV(e)-e.offset,u=Math.floor(p/36e5),d=p%36e5;return b0(bZ(p=36e5*bM(u,t,Math.floor(s/36e5),Math.floor(c/36e5),null==a?void 0:a.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bD(e,n,t,a);case"era":case"year":case"month":case"day":return b0(bZ(bY(bS(bQ(e),n,t,a),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){var e;return e=this,new Date(bV(e)-e.offset)}toString(){var e;let n,t,a;return`${bT(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),a=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(a).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n){if(e instanceof bG){var t,a;return e.timeZone===n?e:(t=e,a=n,b0(bZ(bV(t)-t.offset,a),t.calendar))}return bZ(bY(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){yr(this,bW,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,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,bv(this)}}function bV(e){return bU(bd((e=b0(e,new bh)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bU(e,n,t,a,o,r,i){let s=new Date;return s.setUTCHours(a,o,r,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function bq(e,n){if("UTC"===n)return 0;if(e>0&&n===_t())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:a,day:o,hour:r,minute:i,second:s}=bK(e,n);return bU(t,a,o,r,i,s,0)-1e3*Math.floor(e/1e3)}let bH=new Map;function bK(e,n){let t=bH.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"}),bH.set(n,t));let a=t.formatToParts(new Date(e)),o={};for(let e of a)"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 bY(e,n,t="compatible"){var a,o,r;let i=bQ(e);if("UTC"===n)return bV(i);if(n===_t()&&"compatible"===t){i=b0(i,new bh);let e=new Date,n=bd(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=bV(i),l=bq(s-864e5,n),c=bq(s+864e5,n),p=(a=i,((o=s-l)==(r=s-c)?[o]:[o,r]).filter(e=>{var t;let o;return t=a,o=bK(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 bJ(e,n,t="compatible"){return new Date(bY(e,n,t))}function bZ(e,n){let t=bq(e,n),a=new Date(e+t),o=a.getUTCFullYear();return new bG(o<1?"BC":"AD",o<1?-o+1:o,a.getUTCMonth()+1,a.getUTCDate(),n,t,a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())}function bX(e){return new bN(e.calendar,e.era,e.year,e.month,e.day)}function bQ(e,n){let t=0,a=0,o=0,r=0;if("timeZone"in e)({hour:t,minute:a,second:o,millisecond:r}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:a,second:o,millisecond:r}=n),new bL(e.calendar,e.era,e.year,e.month,e.day,t,a,o,r)}function b0(e,n){if(b5(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),a=e.copy();return a.calendar=n,a.era=t.era,a.year=t.year,a.month=t.month,a.day=t.day,bv(a),a}let b1={"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 b2(e,n){return n=b0(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function b3(e,n){return b5(e.calendar,n.calendar)&&b2(e,n)}function b5(e,n){var t,a,o,r;return null!=(r=null!=(o=null==(t=e.isEqual)?void 0:t.call(e,n))?o:null==(a=n.isEqual)?void 0:a.call(n,e))?r:e.identifier===n.identifier}let b4={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function b6(e,n,t){let a,o=Math.ceil(e.calendar.toJulianDay(e)+1-(t?b4[t]:(a=function(e){if(Intl.Locale){let n=_i.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&_i.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&b1[a]||0))%7;return o<0&&(o+=7),o}function b8(e){return bZ(Date.now(),e)}function b7(e){return bX(b8(e))}function b9(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function _e(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let _n=null;function _t(){return null==_n&&(_n=new Intl.DateTimeFormat().resolvedOptions().timeZone),_n}function _a(e){return e.subtract({days:e.day-1})}function _o(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function _r(e,n,t){let a=b6(e,n,t);return e.subtract({days:a})}let _i=new Map;function _s(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function _l(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}let _c=Symbol.for("react-aria.i18n.locale"),_p=Symbol.for("react-aria.i18n.strings");class _u{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 a;if(n[e])return n[e];let o=(a=e,Intl.Locale?new Intl.Locale(a).language:a.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[_c];if(void 0===f){let e=window[_p];if(!e)return null;for(let t in f={},e)f[t]=new _u({[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 _d=new Map,_f=new Map;class _m{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 a=n["="+e];if(a)return"function"==typeof a?a():a;let o=this.locale+":"+t,r=_d.get(o);return r||(r=new Intl.PluralRules(this.locale,{type:t}),_d.set(o,r)),"function"==typeof(a=n[r.select(e)]||n.other)?a():a}number(e){let n=_f.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),_f.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 _h=new WeakMap;function _g(e,n){let t;return n&&_u.getGlobalDictionaryForPackage(n)||((t=_h.get(e))||(t=new _u(e),_h.set(e,t)),t)}function _y(e,n){let{locale:t}=bs(),a=_g(e,n);return(0,u8.useMemo)(()=>new _m(t,a),[t,a])}let _b=new Map;class __{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),a=this.formatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==_k&&(_k="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_k&&(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.includes("-u-")?"":"-u")+"-nu-latn",{...n,timeZone:void 0}),a=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===a&&23===o)return"h23";if(24===a&&23===o)return"h24";if(0===a&&11===o)return"h11";if(12===a&&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,n),this.options=n}}let _v={true:{ja:"h11"},false:{}};function _$(e,n={}){if("boolean"==typeof n.hour12&&(null==_A&&(_A="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_A)){let t=_v[String((n={...n}).hour12)][e.split("-")[0]],a=n.hour12?"h12":"h23";n.hourCycle=null!=t?t:a,delete n.hour12}let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(_b.has(t))return _b.get(t);let a=new Intl.DateTimeFormat(e,n);return _b.set(t,a),a}let _A=null,_k=null;function _w(e,n){let t=(0,u8.useRef)(null);return e&&t.current&&n(e,t.current)&&(e=t.current),t.current=e,e}function _x(e){e=_w(null!=e?e:{},_C);let{locale:n}=bs();return(0,u8.useMemo)(()=>new __(n,e),[n,e])}function _C(e,n){if(e===n)return!0;let t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;for(let a of t)if(n[a]!==e[a])return!1;return!0}function _E(e){return e&&e.__esModule?e.default:e}let _S=new WeakMap;function _D(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _M(e,n,t,a){let o=_y(_E(bl),"@react-aria/calendar"),r=_D(e)||_D(n),i=_x({month:"long",year:"numeric",era:r,calendar:e.calendar.identifier,timeZone:t}),s=_x({month:"long",year:"numeric",day:"numeric",era:r,calendar:e.calendar.identifier,timeZone:t});return(0,u8.useMemo)(()=>{if(b2(e,_a(e))){let r=e,s=n;if(e.calendar.getFormattableMonth&&(r=e.calendar.getFormattableMonth(e)),n.calendar.getFormattableMonth&&(s=n.calendar.getFormattableMonth(n)),b2(n,_o(e)))return i.format(r.toDate(t));if(b2(n,_o(n)))return a?_z(i,o,r,s,t):i.formatRange(r.toDate(t),s.toDate(t))}return a?_z(s,o,e,n,t):s.formatRange(e.toDate(t),n.toDate(t))},[e,n,i,s,o,t,a])}function _z(e,n,t,a,o){let r=e.formatRangeToParts(t.toDate(o),a.toDate(o)),i=-1;for(let e=0;e<r.length;e++){let n=r[e];if("shared"===n.source&&"literal"===n.type)i=e;else if("endRange"===n.source)break}let s="",l="";for(let e=0;e<r.length;e++)e<i?s+=r[e].value:e>i&&(l+=r[e].value);return n.format("dateRange",{startDate:s,endDate:l})}function _O(e,n){let t=(0,u8.useRef)(!0),a=(0,u8.useRef)(null);(0,u8.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),(0,u8.useEffect)(()=>{let o=a.current;t.current?t.current=!1:(!o||n.some((e,n)=>!Object.is(e,o[n])))&&e(),a.current=n},n)}function _P(e,n){let{id:t,"aria-label":a,"aria-labelledby":o}=e;return t=gh(t),o&&a?o=[...new Set([t,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),a||o||!n||(a=n),{id:t,"aria-label":a,"aria-labelledby":o}}function _T(e,n){var t,a;let o,r,i,s,l,c=_y((t=bl)&&t.__esModule?t.default:t,"@react-aria/calendar"),p=gT(e),u=_M(n.visibleRange.start,n.visibleRange.end,n.timeZone,!1),d=_M(n.visibleRange.start,n.visibleRange.end,n.timeZone,!0);_O(()=>{n.isFocused||gS(d)},[d]);let f=(i=_y(_E(bl),"@react-aria/calendar"),"highlightedRange"in n?{start:o,end:r}=n.highlightedRange||{}:o=r=null!=(a=n.value)?a:void 0,s=_x({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_D(o)||_D(r),timeZone:n.timeZone}),l="anchorDate"in n?n.anchorDate:null,(0,u8.useMemo)(()=>{if(!l&&o&&r)if(b2(o,r)){let e=s.format(o.toDate(n.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=_z(s,i,o,r,n.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,r,l,n.timeZone,i,s]));_O(()=>{f&&gS(f,"polite",4e3)},[f]);let m=gg([!!e.errorMessage,e.isInvalid,e.validationState]);_S.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,u8.useState)(!1),y=e.isDisabled||n.isNextVisibleRangeInvalid();y&&h&&(g(!1),n.setFocused(!0));let[b,v]=(0,u8.useState)(!1),$=e.isDisabled||n.isPreviousVisibleRangeInvalid();return $&&b&&(v(!1),n.setFocused(!0)),{calendarProps:gb(p,_P({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:m},title:u}}let _B={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 _I(e){let{children:n,elementType:t="div",isFocusable:a,style:o,...r}=e,{visuallyHiddenProps:i}=function(e={}){let{style:n,isFocusable:t}=e,[a,o]=(0,u8.useState)(!1),{focusWithinProps:r}=yU({isDisabled:!t,onFocusWithinChange:e=>o(e)}),i=(0,u8.useMemo)(()=>a?n:n?{..._B,...n}:_B,[a]);return{visuallyHiddenProps:{...r,style:i}}}(e);return u7().createElement(t,gb(r,i),n)}function _N(e,n,t,a){let o=ga(t),r=null==t;(0,u8.useEffect)(()=>{if(r||!e.current)return;let t=e.current;return t.addEventListener(n,o,a),()=>{t.removeEventListener(n,o,a)}},[e,n,a,r,o])}let _j=0,_R=new Map;function _F(e){let[n,t]=(0,u8.useState)();return gt(()=>{if(!e)return;let n=_R.get(e);if(n)t(n.element.id);else{let a=`react-aria-description-${_j++}`;t(a);let o=document.createElement("div");o.id=a,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},_R.set(e,n)}return n.refCount++,()=>{n&&0==--n.refCount&&(n.element.remove(),_R.delete(e))}},[e]),{"aria-describedby":e?n:void 0}}function _L(e,n){if(!e)return!1;let t=window.getComputedStyle(e),a=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return a&&n&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function _W(e,n,t){let a="left"===t?"offsetLeft":"offsetTop",o=0;for(;n.offsetParent&&(o+=n[a],n.offsetParent!==e);){if(n.offsetParent.contains(e)){o-=e[a];break}n=n.offsetParent}return o}function _G(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;)_L(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,n){let t=_W(e,n,"left"),a=_W(e,n,"top"),o=n.offsetWidth,r=n.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:p,scrollPaddingRight:u,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),m=i+parseInt(c,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+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+$),a<=h+b?s=a-parseInt(l,10)-b:a+r>y-v&&(s+=a+r-y+v),e.scrollLeft=i,e.scrollTop=s}(n,e);else{var t,a,o,r;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==(a=o.scrollIntoView)||a.call(o,{block:"center",inline:"center"}),null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"}))}}}function _V(e,n){let t=e;for(_L(t,n)&&(t=t.parentElement);t&&!_L(t,n);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}class _U extends bh{fromJulianDay(e){let n=super.fromJulianDay(e);return new bN(this,bd(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(_q(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(_q(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function _q(e){let[n,t]=bf(e.year+-543);return new bN(n,t,e.month,e.day)}function _H(e,n,t,a){return e+365*n+Math.floor(n/4)+30*(t-1)+a-1}function _K(e,n){let t=Math.floor(4*(n-e)/1461),a=1+Math.floor((n-_H(e,t,1,1))/30),o=n+1-_H(e,t,a,1);return[t,a,o]}function _Y(e){return Math.floor(e%4/3)}function _J(e,n){return n%13!=0?30:_Y(e)+5}class _Z{fromJulianDay(e){let[n,t,a]=_K(1723856,e),o="AM";return n<=0&&(o="AA",n+=5500),new bN(this,o,n,t,a)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),_H(1723856,n,e.month,e.day)}getDaysInMonth(e){return _J(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+_Y(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class _X extends _Z{fromJulianDay(e){let[n,t,a]=_K(1723856,e);return new bN(this,"AA",n+=5500,t,a)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class _Q extends _Z{fromJulianDay(e){let[n,t,a]=_K(1824665,e),o="CE";return n<=0&&(o="BCE",n=1-n),new bN(this,o,n,t,a)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_H(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_J(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 _0=765433;function _1(e){return 7>bc(7*e+1,19)}function _2(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>bc(3*(t+1),7)&&(t+=1),t}function _3(e){let n,t;return _2(e)+(n=_2(e-1),t=_2(e),_2(e+1)-t==356?2:+(t-n==382))}function _5(e){return _3(e+1)-_3(e)}function _4(e,n){if(n>=6&&!_1(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=_5(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*!!_1(e):30}class _6{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/_0*19+234)/235)+1,a=_3(t),o=Math.floor(n-a);for(;o<1;)o=Math.floor(n-(a=_3(--t)));let r=1,i=0;for(;i<o;)i+=_4(t,r),r++;let s=o-(i-=_4(t,--r));return new bN(this,t,r,s)}toJulianDay(e){let n=_3(e.year);for(let t=1;t<e.month;t++)n+=_4(e.year,t);return n+e.day+347997}getDaysInMonth(e){return _4(e.year,e.month)}getMonthsInYear(e){return _1(e.year)?13:12}getDaysInYear(e){return _5(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(_1(n.year)&&!_1(e.year)&&n.month>6?e.month--:!_1(n.year)&&_1(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class _8 extends bh{fromJulianDay(e){let n,t,a,o=super.fromJulianDay(e),r=o.year-78,i=e-bp(o.era,o.year,1,1);if(i<80?(r--,i+=(n=bu(o.year-1)?31:30)+155+90+10):(n=bu(o.year)?31:30,i-=80),i<n)t=1,a=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,a=e%31+1):(e-=155,t=Math.floor(e/30)+7,a=e%30+1)}return new bN(this,r,t,a)}toJulianDay(e){let n,t,[a,o]=bf(e.year+78);return(bu(o)?(n=31,t=bp(a,o,3,21)):(n=30,t=bp(a,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&&bu(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 _7(e,n,t,a){return a+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function _9(e,n,t){let a=Math.floor((30*(t-n)+10646)/10631),o=Math.min(12,Math.ceil((t-(29+_7(n,a,1,1)))/29.5)+1),r=t-_7(n,a,o,1)+1;return new bN(e,a,o,r)}function ve(e){return(14+11*e)%30<11}class vn{fromJulianDay(e){return _9(this,1948440,e)}toJulianDay(e){return _7(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&ve(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return ve(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vt extends vn{fromJulianDay(e){return _9(this,1948439,e)}toJulianDay(e){return _7(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function va(e){return 460322+c[e-1300]}function vo(e,n){return(l[e-1300]&1<<11-(n-1))==0?29:30}function vr(e,n){let t=va(e);for(let a=1;a<n;a++)t+=vo(e,a);return t}function vi(e){return c[e+1-1300]-c[e-1300]}class vs extends vn{fromJulianDay(e){let n=e-1948440,t=va(1300),a=va(1600);if(n<t||n>a)return super.fromJulianDay(e);{let e=1299,t=1,a=1;for(;a>0;){a=n-va(++e)+1;let o=vi(e);if(a===o){t=12;break}if(a<o){let n=vo(e,t);for(t=1;a>n;)a-=n,n=vo(e,++t);break}}return new bN(this,e,t,n-vr(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vr(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vo(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vi(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+=vo(n,t)}}}}let vl=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vc=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vp=[1867,1911,1925,1988,2018],vu=["meiji","taisho","showa","heisei","reiwa"];function vd(e){let n=vl.findIndex(([n,t,a])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<a));return -1===n?vl.length-1:0===n?0:n-1}function vf(e){let n=vp[vu.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new bN(e.year+n,e.month,e.day)}class vm extends bh{fromJulianDay(e){let n=super.fromJulianDay(e),t=vd(n);return new bN(this,vu[t],n.year-vp[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(vf(e))}balanceDate(e){let n=vf(e),t=vd(n);vu[t]!==e.era&&(e.era=vu[t],e.year=n.year-vp[t]),this.constrainDate(e)}constrainDate(e){let n=vu.indexOf(e.era),t=vc[n];if(null!=t){let[a,o,r]=t,i=a-vp[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(r,e.day)))}if(1===e.year&&n>=0){let[,t,a]=vl[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(a,e.day))}}getEras(){return vu}getYearsInEra(e){let n=vu.indexOf(e.era),t=vl[n],a=vl[n+1];if(null==a)return 9999-t[0]+1;let o=a[0]-t[0];return(e.month<a[1]||e.month===a[1]&&e.day<a[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vf(e))}getMinimumMonthInYear(e){let n=vh(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=vh(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vh(e){if(1===e.year)return vl[vu.indexOf(e.era)]}let vg=[0,31,62,93,124,155,186,216,246,276,306,336];class vy{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),a=n-(365*(t-1)+Math.floor((8*t+21)/33)),o=a<216?Math.floor(a/31):Math.floor((a-6)/30),r=a-vg[o]+1;return new bN(this,t,o+1,r)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=vg[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>bc(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vb(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function v_(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class vv extends bh{fromJulianDay(e){let n=super.fromJulianDay(e),[t,a]=v_(bd(n.era,n.year));return new bN(this,t,a,n.month,n.day)}toJulianDay(e){return super.toJulianDay(v$(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=v_(vb(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(v$(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function v$(e){let[n,t]=bf(vb(e));return new bN(n,t,e.month,e.day)}function vA(e){switch(e){case"buddhist":return new _U;case"ethiopic":return new _Z;case"ethioaa":return new _X;case"coptic":return new _Q;case"hebrew":return new _6;case"indian":return new _8;case"islamic-civil":return new vn;case"islamic-tbla":return new vt;case"islamic-umalqura":return new vs;case"japanese":return new vm;case"persian":return new vy;case"roc":return new vv;default:return new bh}}function vk(e,n,t){return null!=n&&0>e.compare(n)||null!=t&&e.compare(t)>0}function vw(e,n,t,a,o){let r={};for(let e in n)r[e]=Math.floor(n[e]/2),r[e]>0&&n[e]%2==0&&r[e]--;let i=vx(e,n,t).subtract(r);return vE(e,i,n,t,a,o)}function vx(e,n,t,a,o){let r=e;if(n.years)r=_a(e.subtract({months:e.month-1}));else n.months?r=_a(e):n.weeks&&(r=_r(e,t));return vE(e,r,n,t,a,o)}function vC(e,n,t,a,o){let r={...n};r.days?r.days--:r.weeks?r.weeks--:r.months?r.months--:r.years&&r.years--;let i=vx(e,n,t).subtract(r);return vE(e,i,n,t,a,o)}function vE(e,n,t,a,o,r){if(o&&e.compare(o)>=0){let e=_l(n,vx(bX(o),t,a));e&&(n=e)}if(r&&0>=e.compare(r)){let e=_s(n,vC(bX(r),t,a));e&&(n=e)}return n}function vS(e,n,t){if(n){let t=_l(e,bX(n));t&&(e=t)}if(t){let n=_s(e,bX(t));n&&(e=n)}return e}function vD(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 vM(e,n,t){let[a,o]=(0,u8.useState)(e||n),r=(0,u8.useRef)(void 0!==e),i=void 0!==e;(0,u8.useEffect)(()=>{r.current,r.current=i},[i]);let s=i?e:a,l=(0,u8.useCallback)((e,...n)=>{let a=(e,...n)=>{t&&!Object.is(s,e)&&t(e,...n),i||(s=e)};"function"==typeof e?o((t,...o)=>{let r=e(i?s:t,...o);return(a(r,...n),i)?t:r}):(i||o(e),a(e,...n))},[i,s,t]);return[s,l]}function vz(e){var n,t,a;let o=(0,u8.useMemo)(()=>new __(e.locale),[e.locale]),r=(0,u8.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:p,selectionAlignment:u,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,u8.useMemo)(()=>s(r.calendar),[s,r.calendar]),[g,y]=vM(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),b=(0,u8.useMemo)(()=>g?b0(bX(g),h):null,[g,h]),v=(0,u8.useMemo)(()=>g&&"timeZone"in g?g.timeZone:r.timeZone,[g,r.timeZone]),[$,A]=vM((0,u8.useMemo)(()=>e.focusedValue?vS(b0(bX(e.focusedValue),h),c,p):void 0,[e.focusedValue,h,c,p]),(0,u8.useMemo)(()=>vS(e.defaultFocusedValue?b0(bX(e.defaultFocusedValue),h):b||b0(b7(v),h),c,p),[e.defaultFocusedValue,b,v,h,c,p]),e.onFocusChange),[k,w]=(0,u8.useState)(()=>{switch(u){case"start":return vx($,l,i,c,p);case"end":return vC($,l,i,c,p);default:return vw($,l,i,c,p)}}),[x,C]=(0,u8.useState)(e.autoFocus||!1),E=(0,u8.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,k.add(e)},[k,l]),[S,D]=(0,u8.useState)(h);if(!b5(h,S)){let e=b0($,h);w(vw(e,l,i,c,p)),A(e),D(h)}function M(e){A(e=vS(e,c,p))}function z(n){if(!e.isDisabled&&!e.isReadOnly){let e=n;if(null===e)return void y(null);(e=vD(e=vS(e,c,p),k,d))&&(e=b0(e,(null==g?void 0:g.calendar)||new bh),g&&"hour"in g?y(g.set(e)):y(e))}}vk($,c,p)?A(vS($,c,p)):0>$.compare(k)?w(vC($,l,i,c,p)):$.compare(E)>0&&w(vx($,l,i,c,p));let O=(0,u8.useMemo)(()=>!!b&&(!!(d&&d(b))||vk(b,c,p)),[b,d,c,p]),P=e.isInvalid||"invalid"===e.validationState||O,T=(0,u8.useMemo)(()=>"visible"===f?l:vO(l),[f,l]);return{isDisabled:null!=(t=e.isDisabled)&&t,isReadOnly:null!=(a=e.isReadOnly)&&a,value:b,setValue:z,visibleRange:{start:k,end:E},minValue:c,maxValue:p,focusedDate:$,timeZone:v,validationState:P?"invalid":null,isValueInvalid:P,setFocusedDate(e){M(e),C(!0)},focusNextDay(){M($.add({days:1}))},focusPreviousDay(){M($.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&M($.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&M($.subtract({weeks:1}))},focusNextPage(){let e=k.add(T);A(vS($.add(T),c,p)),w(vx(vE($,e,T,i,c,p),T,i))},focusPreviousPage(){let e=k.subtract(T);A(vS($.subtract(T),c,p)),w(vx(vE($,e,T,i,c,p),T,i))},focusSectionStart(){l.days?M(k):l.weeks?M(_r($,i)):(l.months||l.years)&&M(_a($))},focusSectionEnd(){l.days?M(E):l.weeks?M(_r($,i,void 0).add({days:6})):(l.months||l.years)&&M(_o($))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?M($.add({months:1})):(l.months||l.years)&&M($.add({years:1})):M($.add(vO(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?M($.subtract({months:1})):(l.months||l.years)&&M($.subtract({years:1})):M($.subtract(vO(l)))},selectFocusedDate(){d&&d($)||z($)},selectDate(e){z(e)},isFocused:x,setFocused:C,isInvalid:e=>vk(e,c,p),isSelected(e){return null!=b&&b2(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&$&&b2(e,$),isCellDisabled(n){return e.isDisabled||0>n.compare(k)||n.compare(E)>0||this.isInvalid(n)},isCellUnavailable:n=>!!e.isDateUnavailable&&e.isDateUnavailable(n),isPreviousVisibleRangeInvalid(){let e=k.subtract({days:1});return b2(e,k)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return b2(e,E)||this.isInvalid(e)},getDatesInWeek(e,n=k){let t=n.add({weeks:e}),a=[],o=b6(t=_r(t,i,m),i,m);for(let e=0;e<o;e++)a.push(null);for(;a.length<7;){a.push(t);let e=t.add({days:1});if(b2(t,e))break;t=e}for(;a.length<7;)a.push(null);return a}}}function vO(e){let n={...e};for(let t in e)n[t]=1;return n}function vP(e,n){return e&&n?(0>n.compare(e)&&([e,n]=[n,e]),{start:bX(e),end:bX(n)}):null}function vT(e,n){return(e=b0(e,(null==n?void 0:n.calendar)||new bh),n&&"hour"in n)?n.set(e):e}function vB(e,n,t){let a=e.add({days:t});for(;(t<0?a.compare(n.visibleRange.start)>=0:0>=a.compare(n.visibleRange.end))&&!n.isCellUnavailable(a);)a=a.add({days:t});if(n.isCellUnavailable(a))return a.add({days:-t})}let vI=(0,u8.createContext)(null),vN=(0,u8.createContext)(null),vj=(0,u8.createContext)(null),vR=(0,u8.createContext)(null),vF=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,vI);let{locale:t}=bs(),a=vz({...e,locale:t,createCalendar:e.createCalendar||vA}),{calendarProps:o,prevButtonProps:r,nextButtonProps:i,errorMessageProps:s,title:l}=_T(e,a),c=g$({...e,values:{state:a,isDisabled:e.isDisabled||!1,isInvalid:a.isValueInvalid},defaultClassName:"react-aria-Calendar"});return u7().createElement("div",{...c,...o,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":a.isValueInvalid||void 0},u7().createElement(gv,{values:[[y1,{slots:{previous:r,next:i}}],[y3,{"aria-hidden":!0,level:2,children:l}],[vj,a],[vI,e],[y5,{slots:{errorMessage:s}}]]},u7().createElement(_I,null,u7().createElement("h2",null,o["aria-label"])),c.children,u7().createElement(_I,null,u7().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>a.focusNextPage(),tabIndex:-1}))))}),vL=(0,u8.forwardRef)(function(e,n){var t,a;let o,r,i;[e,n]=gk(e,n,vN);let{locale:s}=bs(),l=function(e){let{value:n,defaultValue:t,onChange:a,createCalendar:o,locale:r,visibleDuration:i={months:1},minValue:s,maxValue:l,...c}=e,[p,u]=vM(n,t||null,a),[d,f]=(0,u8.useState)(null),m="center";if(p&&p.start&&p.end){let e=vw(bX(p.start),i,r,s,l).add(i).subtract({days:1});p.end.compare(e)>0&&(m="start")}let h=(0,u8.useRef)(null),[g,y]=(0,u8.useState)(null),b=(0,u8.useMemo)(()=>_l(s,null==g?void 0:g.start),[s,g]),v=(0,u8.useMemo)(()=>_s(l,null==g?void 0:g.end),[l,g]),$=vz({...c,value:p&&p.start,createCalendar:o,locale:r,visibleDuration:i,minValue:b,maxValue:v,selectionAlignment:m}),A=n=>{n&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vB(n,$,-1),end:vB(n,$,1)},y(h.current)):(h.current=null,y(null))},[k,w]=(0,u8.useState)($.visibleRange);b3($.visibleRange.start,k.start)&&b3($.visibleRange.end,k.end)||(A(d),w($.visibleRange));let x=e=>{e?(f(e),A(e)):(f(null),A(null))},C=d?vP(d,$.focusedDate):p&&vP(p.start,p.end),E=n=>{if(e.isReadOnly)return;let t=vD(vS(n,b,v),$.visibleRange.start,e.isDateUnavailable);if(t)if(d){let e=vP(d,t);e&&u({start:vT(e.start,null==p?void 0:p.start),end:vT(e.end,null==p?void 0:p.end)}),x(null)}else x(t)},[S,D]=(0,u8.useState)(!1),{isDateUnavailable:M}=e,z=(0,u8.useMemo)(()=>!!p&&!d&&(!!(M&&(M(p.start)||M(p.end)))||vk(p.start,s,l)||vk(p.end,s,l)),[M,p,d,s,l]),O=e.isInvalid||"invalid"===e.validationState||z;return{...$,value:p,setValue:u,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:O?"invalid":null,isValueInvalid:O,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)||vk(e,null==(n=h.current)?void 0:n.start,null==(t=h.current)?void 0:t.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||vA}),{calendarProps:c,prevButtonProps:p,nextButtonProps:u,errorMessageProps:d,title:f}=(t=e,a=n,o=_T(t,l),r=(0,u8.useRef)(!1),_N(i=(0,u8.useRef)("u">typeof window?window:null),"pointerdown",e=>{r.current=0===e.width&&0===e.height}),_N(i,"pointerup",e=>{if(r.current){r.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let n=e.target;a.current&&a.current.contains(document.activeElement)&&(!a.current.contains(n)||!n.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{a.current&&(e.relatedTarget&&a.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},_N(a,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=g$({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return u7().createElement("div",{...m,...c,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},u7().createElement(gv,{values:[[y1,{slots:{previous:p,next:u}}],[y3,{"aria-hidden":!0,level:2,children:f}],[vR,l],[vN,e],[y5,{slots:{errorMessage:d}}]]},u7().createElement(_I,null,u7().createElement("h2",null,c["aria-label"])),m.children,u7().createElement(_I,null,u7().createElement("button",{"aria-label":u["aria-label"],disabled:u.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),vW=(0,u8.createContext)(null),vG=(0,u8.forwardRef)(function(e,n){var t,a;let o=(0,u8.useContext)(vj),r=(0,u8.useContext)(vR),i=gA(vI),s=gA(vN),l=null!=o?o:r,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:m}=function(e,n){let t,{startDate:a=n.visibleRange.start,endDate:o=n.visibleRange.end,firstDayOfWeek:r}=e,{direction:i}=bs(),s=_M(a,o,n.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=_S.get(n),p=_P({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),u=_x({weekday:e.weekdayStyle||"narrow",timeZone:n.timeZone}),{locale:d}=bs(),f=(0,u8.useMemo)(()=>{let e=_r(b7(n.timeZone),d,r);return[...Array(7).keys()].map(t=>{let a=e.add({days:t}).toDate(n.timeZone);return u.format(a)})},[d,n.timeZone,u,r]),m=(t=a.calendar.getDaysInMonth(a),Math.ceil((b6(_a(a),d,r)+t)/7));return{gridProps:gb(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:m}}({startDate:c,endDate:_o(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:p},l);return u7().createElement(vW.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:m}},u7().createElement("table",{...gT(e),...u,ref:n,style:e.style,className:null!=(a=e.className)?a:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:u7().createElement(u7().Fragment,null,u7().createElement(vV,null,e=>u7().createElement(vU,null,e)),u7().createElement(vq,null,e.children))))}),vV=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e,{headerProps:r,weekDays:i}=(0,u8.useContext)(vW);return u7().createElement("thead",{...gT(e),...r,ref:n,style:a,className:o||"react-aria-CalendarGridHeader"},u7().createElement("tr",null,i.map((e,n)=>u7().cloneElement(t(e),{key:n}))))}),vU=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e;return u7().createElement("th",{...gT(e),ref:n,style:a,className:o||"react-aria-CalendarHeaderCell"},t)}),vq=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e,r=(0,u8.useContext)(vj),i=(0,u8.useContext)(vR),s=null!=r?r:i,{startDate:l,weeksInMonth:c}=(0,u8.useContext)(vW);return u7().createElement("tbody",{...gT(e),ref:n,style:a,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>u7().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,n)=>e?u7().cloneElement(t(e),{key:n}):u7().createElement("td",{key:n})))))}),vH=(0,u8.forwardRef)(function({date:e,...n},t){var a,o,r;let i=(0,u8.useContext)(vj),s=(0,u8.useContext)(vR),l=null!=i?i:s,{startDate:c}=null!=(a=(0,u8.useContext)(vW))?a:{startDate:l.visibleRange.start},p=(0,u8.useRef)(null),{cellProps:u,buttonProps:d,...f}=function(e,n,t){var a;let o,{date:r,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=_S.get(n),c=_y((a=bl)&&a.__esModule?a.default:a,"@react-aria/calendar"),p=_x({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_D(r),timeZone:n.timeZone}),u=n.isSelected(r),d=n.isCellFocused(r);i=i||n.isCellDisabled(r);let f=n.isCellUnavailable(r),m=!i&&!f,h=n.isValueInvalid&&!!("highlightedRange"in n?!n.anchorDate&&n.highlightedRange&&r.compare(n.highlightedRange.start)>=0&&0>=r.compare(n.highlightedRange.end):n.value&&b2(n.value,r));h&&(u=!0),r=_w(r,b3);let g=(0,u8.useMemo)(()=>r.toDate(n.timeZone),[r,n.timeZone]),y=b2(r,b7(n.timeZone)),b=(0,u8.useMemo)(()=>{let e="";return"highlightedRange"in n&&n.value&&!n.anchorDate&&(b2(r,n.value.start)||b2(r,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&&b2(r,n.minValue)?e+=", "+c.format("minimumDate"):n.maxValue&&b2(r,n.maxValue)&&(e+=", "+c.format("maximumDate")),e},[p,g,c,u,y,r,n,l]),v="";"anchorDate"in n&&d&&!n.isReadOnly&&m&&(v=n.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let $=_F(v),A=(0,u8.useRef)(!1),k=(0,u8.useRef)(!1),w=(0,u8.useRef)(void 0),{pressProps:x,isPressed:C}=yy({shouldCancelOnPointerExit:"anchorDate"in n&&!!n.anchorDate,preventFocusOnPress:!0,isDisabled:!m||n.isReadOnly,onPressStart(e){if(n.isReadOnly)return void n.setFocusedDate(r);if("highlightedRange"in n&&!n.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(n.highlightedRange&&!h){if(b2(r,n.highlightedRange.start)){n.setAnchorDate(n.highlightedRange.end),n.setFocusedDate(r),n.setDragging(!0),k.current=!0;return}else if(b2(r,n.highlightedRange.end)){n.setAnchorDate(n.highlightedRange.start),n.setFocusedDate(r),n.setDragging(!0),k.current=!0;return}}let t=()=>{n.setDragging(!0),w.current=void 0,n.selectDate(r),n.setFocusedDate(r),A.current=!0};"touch"===e.pointerType?w.current=setTimeout(t,200):t()}},onPressEnd(){k.current=!1,A.current=!1,clearTimeout(w.current),w.current=void 0},onPress(){"anchorDate"in n||n.isReadOnly||(n.selectDate(r),n.setFocusedDate(r))},onPressUp(e){if(!n.isReadOnly&&("anchorDate"in n&&w.current&&(n.selectDate(r),n.setFocusedDate(r)),"anchorDate"in n))if(k.current)n.setAnchorDate(r);else if(n.anchorDate&&!A.current)n.selectDate(r),n.setFocusedDate(r);else if("keyboard"!==e.pointerType||n.anchorDate)"virtual"===e.pointerType&&(n.selectDate(r),n.setFocusedDate(r));else{n.selectDate(r);let e=r.add({days:1});n.isInvalid(e)&&(e=r.subtract({days:1})),n.isInvalid(e)||n.setFocusedDate(e)}}});i||(o=b2(r,n.focusedDate)?0:-1),(0,u8.useEffect)(()=>{d&&t.current&&(gW(t.current),"pointer"!==yw&&document.activeElement===t.current&&_G(t.current,{containingElement:_V(t.current)}))},[d,t]);let E=_x({day:"numeric",timeZone:n.timeZone,calendar:r.calendar.identifier}),S=(0,u8.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":u||void 0,"aria-invalid":h||void 0},buttonProps:gb(x,{onFocus(){i||n.setFocusedDate(r)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":b,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,$["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in n&&("touch"!==e.pointerType||n.isDragging)&&m&&n.highlightDate(r)},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>r.compare(n.visibleRange.start)||r.compare(n.visibleRange.end)>0,isInvalid:h,formattedDate:S}}({date:e},l,p),{hoverProps:m,isHovered:h}=yZ({...n,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=yq();y&&(y=f.isFocused);let b=(o=c,r=b0(r=e,o.calendar),o=_a(o),r=_a(r),o.era!==r.era||o.year!==r.year||o.month!==r.month),v=!1,$=!1;"highlightedRange"in l&&l.highlightedRange&&(v=b2(e,l.highlightedRange.start),$=b2(e,l.highlightedRange.end));let A=g$({...n,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:b,isFocusVisible:y,isSelectionStart:v,isSelectionEnd:$,...f}}),k={"data-focused":f.isFocused||void 0,"data-hovered":h||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 u7().createElement("td",{...u,ref:t},u7().createElement("div",{...gb(gT(n),d,g,m,k,A),ref:p}))}),vK=(0,u8.createContext)({}),vY=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,vK);let{isDisabled:o,isInvalid:r,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:m}=yq({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=r||(r=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=g$({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:r},defaultClassName:"react-aria-Group"});return u7().createElement("div",{...gb(c,m,p),...h,ref:n,role:null!=(t=e.role)?t:"group",slot:null!=(a=e.slot)?a: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":r||void 0},h.children)}),vJ=(0,u8.createContext)({}),vZ=yQ(function(e,n){[e,n]=gk(e,n,vJ);let{hoverProps:t,isHovered:a}=yZ(e),{isFocused:o,isFocusVisible:r,focusProps:i}=yq({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=g$({...e,values:{isHovered:a,isFocused:o,isFocusVisible:r,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return u7().createElement("input",{...gb((e=>{let{onHoverStart:n,onHoverChange:t,onHoverEnd:a,...o}=e;return o})(e),i,t),...l,ref:n,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":a||void 0,"data-focus-visible":r||void 0,"data-invalid":s||void 0})});var vX={};vX={"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 vQ=u7().createContext(null),v0="react-aria-focus-scope-restore",v1=null;function v2(e){var n,t,a,o,r,i,s,l,c,p;let u,d,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:b}=e,v=(0,u8.useRef)(null),$=(0,u8.useRef)(null),A=(0,u8.useRef)([]),{parentNode:k}=(0,u8.useContext)(vQ)||{},w=(0,u8.useMemo)(()=>new $s({scopeRef:A}),[A]);gt(()=>{let e=k||$l.root;if($l.getTreeNode(e.scopeRef)&&v1&&!v8(v1,e.scopeRef)){let n=$l.getTreeNode(v1);n&&(e=n)}e.addChild(w),$l.addNode(w)},[w,k]),gt(()=>{let e=$l.getTreeNode(A);e&&(e.contain=!!g)},[g]),gt(()=>{var e;let n=null==(e=v.current)?void 0:e.nextSibling,t=[],a=e=>e.stopPropagation();for(;n&&n!==$.current;)t.push(n),n.addEventListener(v0,a),n=n.nextSibling;return A.current=t,()=>{for(let e of t)e.removeEventListener(v0,a)}},[h]),gt(()=>{if(t||a)return;let e=n.current,o=gF(e?e[0]:void 0),r=e=>{let t=yp(e);v4(t,n.current)?v1=n:v6(t)||(v1=null)};return o.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{o.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[n=A,t=y,a=g]),o=A,r=g,u=(0,u8.useRef)(void 0),d=(0,u8.useRef)(void 0),gt(()=>{let e=o.current;if(!r){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let n=gF(e?e[0]:void 0),t=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!v5(o)||e.isComposing)return;let t=((e=document)=>e.activeElement)(n),a=o.current;if(!a||!v4(t,a))return;let r=$a(v3(a),{tabbable:!0},a);if(!t)return;r.currentNode=t;let i=e.shiftKey?r.previousNode():r.nextNode();i||(r.currentNode=e.shiftKey?a[a.length-1].nextElementSibling:a[0].previousElementSibling,i=e.shiftKey?r.previousNode():r.nextNode()),e.preventDefault(),i&&v7(i,!0)},a=e=>{(!v1||v8(v1,o))&&v4(yp(e),o.current)?(v1=o,u.current=yp(e)):v5(o)&&!v6(yp(e),o)?u.current?u.current.focus():v1&&v1.current&&$e(v1.current):v5(o)&&(u.current=yp(e))},i=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let t=yw,a=("virtual"===t||null===t)&&g3()&&g2(),r=((e=document)=>e.activeElement)(n);if(!a&&r&&v5(o)&&!v6(r,o)){v1=o;let n=yp(e);if(n&&n.isConnected){var i;u.current=n,null==(i=u.current)||i.focus()}else v1.current&&$e(v1.current)}})};return n.addEventListener("keydown",t,!1),n.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{n.removeEventListener("keydown",t,!1),n.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,r]),gt(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),i=A,s=y,l=g,f=(0,u8.useRef)("u">typeof document?((e=document)=>e.activeElement)(gF(i.current?i.current[0]:void 0)):null),gt(()=>{let e=i.current,n=gF(e?e[0]:void 0);if(!s||l)return;let t=()=>{(!v1||v8(v1,i))&&v4(((e=document)=>e.activeElement)(n),i.current)&&(v1=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]),gt(()=>{let e=gF(i.current?i.current[0]:void 0);if(!s)return;let n=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey||!v5(i)||n.isComposing)return;let t=e.activeElement;if(!v6(t,i)||!$n(i))return;let a=$l.getTreeNode(i);if(!a)return;let o=a.nodeToRestore,r=$a(e.body,{tabbable:!0});r.currentNode=t;let s=n.shiftKey?r.previousNode():r.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,a.nodeToRestore=void 0),(!s||!v6(s,i))&&o){r.currentNode=o;do s=n.shiftKey?r.previousNode():r.nextNode();while(v6(s,i));(n.preventDefault(),n.stopPropagation(),s)?v7(s,!0):v6(o)?v7(o,!0):t.blur()}};return l||e.addEventListener("keydown",n,!0),()=>{l||e.removeEventListener("keydown",n,!0)}},[i,s,l]),gt(()=>{var e;let n=gF(i.current?i.current[0]:void 0);if(!s)return;let t=$l.getTreeNode(i);if(t)return t.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=$l.getTreeNode(i);if(!e)return;let t=e.nodeToRestore,a=((e=document)=>e.activeElement)(n);if(s&&t&&(a&&v6(a,i)||a===n.body&&$n(i))){let e=$l.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=e.getTreeNode(i);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected)return void $t(n.nodeToRestore);n=n.parent}for(n=e.getTreeNode(i);n;){if(n.scopeRef&&n.scopeRef.current&&$l.getTreeNode(n.scopeRef))return void $t(v9(n.scopeRef.current,!0));n=n.parent}}})}}},[i,s]),c=A,p=b,m=u7().useRef(p),(0,u8.useEffect)(()=>{m.current&&(v1=c,!v4(((e=document)=>e.activeElement)(gF(c.current?c.current[0]:void 0)),v1.current)&&c.current&&$e(c.current)),m.current=!1},[c]),(0,u8.useEffect)(()=>{let e=((e=document)=>e.activeElement)(gF(A.current?A.current[0]:void 0)),n=null;if(v4(e,A.current)){for(let t of $l.traverse())t.scopeRef&&v4(e,t.scopeRef.current)&&(n=t);n===$l.getTreeNode(A)&&(v1=n.scopeRef)}},[A]),gt(()=>()=>{var e,n,t;let a=null!=(t=null==(n=$l.getTreeNode(A))||null==(e=n.parent)?void 0:e.scopeRef)?t:null;(A===v1||v8(A,v1))&&(!a||$l.getTreeNode(a))&&(v1=a),$l.removeTreeNode(A)},[A]);let x=(0,u8.useMemo)(()=>{var e;return e=A,{focusNext(n={}){var t;let a=e.current,{from:o,tabbable:r,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(gF(null!=(t=a[0])?t:void 0)),c=a[0].previousElementSibling,p=$a(v3(a),{tabbable:r,accept:s},a);p.currentNode=v4(l,a)?l:c;let u=p.nextNode();return!u&&i&&(p.currentNode=c,u=p.nextNode()),u&&v7(u,!0),u},focusPrevious(n={}){var t;let a=e.current,{from:o,tabbable:r,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(gF(null!=(t=a[0])?t:void 0)),c=a[a.length-1].nextElementSibling,p=$a(v3(a),{tabbable:r,accept:s},a);p.currentNode=v4(l,a)?l:c;let u=p.previousNode();return!u&&i&&(p.currentNode=c,u=p.previousNode()),u&&v7(u,!0),u},focusFirst(n={}){let t=e.current,{tabbable:a,accept:o}=n,r=$a(v3(t),{tabbable:a,accept:o},t);r.currentNode=t[0].previousElementSibling;let i=r.nextNode();return i&&v7(i,!0),i},focusLast(n={}){let t=e.current,{tabbable:a,accept:o}=n,r=$a(v3(t),{tabbable:a,accept:o},t);r.currentNode=t[t.length-1].nextElementSibling;let i=r.previousNode();return i&&v7(i,!0),i}}},[]),C=(0,u8.useMemo)(()=>({focusManager:x,parentNode:w}),[w,x]);return u7().createElement(vQ.Provider,{value:C},u7().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),h,u7().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))}function v3(e){return e[0].parentElement}function v5(e){let n=$l.getTreeNode(v1);for(;n&&n.scopeRef!==e;){if(n.contain)return!1;n=n.parent}return!0}function v4(e,n){return!!e&&!!n&&n.some(n=>n.contains(e))}function v6(e,n=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of $l.traverse($l.getTreeNode(n)))if(t&&v4(e,t.current))return!0;return!1}function v8(e,n){var t;let a=null==(t=$l.getTreeNode(n))?void 0:t.parent;for(;a;){if(a.scopeRef===e)return!0;a=a.parent}return!1}function v7(e,n=!1){if(null==e||n){if(null!=e)try{e.focus()}catch{}}else try{yF(e)}catch{}}function v9(e,n=!0){let t=e[0].previousElementSibling,a=v3(e),o=$a(a,{tabbable:n},e);o.currentNode=t;let r=o.nextNode();return n&&!r&&((o=$a(a=v3(e),{tabbable:!1},e)).currentNode=t,r=o.nextNode()),r}function $e(e,n=!0){v7(v9(e,n))}function $n(e){let n=$l.getTreeNode(v1);for(;n&&n.scopeRef!==e;){if(n.nodeToRestore)return!1;n=n.parent}return(null==n?void 0:n.scopeRef)===e}function $t(e){e.dispatchEvent(new CustomEvent(v0,{bubbles:!0,cancelable:!0}))&&v7(e)}function $a(e,n,t){var a,o,r;let i=(null==n?void 0:n.tabbable)?gR:gj,s=gF((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(a=e||s,o=NodeFilter.SHOW_ELEMENT,r={acceptNode(e){var a;return(null==n||null==(a=n.from)?void 0:a.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(n,t){return"#comment"!==n.nodeName&&function(e){let n=gL(e);if(!(e instanceof n.HTMLElement)&&!(e instanceof n.SVGElement))return!1;let{display:t,visibility:a}=e.style,o="none"!==t&&"hidden"!==a&&"collapse"!==a;if(o){let{getComputedStyle:n}=e.ownerDocument.defaultView,{display:t,visibility:a}=n(e);o="none"!==t&&"hidden"!==a&&"collapse"!==a}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||v4(e,t))&&(!(null==n?void 0:n.accept)||n.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(a,o,r));return(null==n?void 0:n.from)&&(l.currentNode=n.from),l}function $o(e,n={}){return{focusNext(t={}){let a=e.current;if(!a)return null;let{from:o,tabbable:r=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(gF(a)),c=$a(a,{tabbable:r,accept:s});a.contains(l)&&(c.currentNode=l);let p=c.nextNode();return!p&&i&&(c.currentNode=a,p=c.nextNode()),p&&v7(p,!0),p},focusPrevious(t=n){let a=e.current;if(!a)return null;let{from:o,tabbable:r=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(gF(a)),c=$a(a,{tabbable:r,accept:s});if(a.contains(l))c.currentNode=l;else{let e=$r(c);return e&&v7(e,!0),null!=e?e:null}let p=c.previousNode();if(!p&&i){c.currentNode=a;let e=$r(c);if(!e)return null;p=e}return p&&v7(p,!0),null!=p?p:null},focusFirst(t=n){let a=e.current;if(!a)return null;let{tabbable:o=n.tabbable,accept:r=n.accept}=t,i=$a(a,{tabbable:o,accept:r}).nextNode();return i&&v7(i,!0),i},focusLast(t=n){let a=e.current;if(!a)return null;let{tabbable:o=n.tabbable,accept:r=n.accept}=t,i=$r($a(a,{tabbable:o,accept:r}));return i&&v7(i,!0),null!=i?i:null}}}function $r(e){let n,t;do(n=e.lastChild())&&(t=n);while(n);return t}class $i{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,t){let a=this.fastMap.get(null!=n?n:null);if(!a)return;let o=new $s({scopeRef:e});a.addChild(o),o.parent=a,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&&v4(e.nodeToRestore,n.scopeRef.current)&&(e.nodeToRestore=n.nodeToRestore);let a=n.children;t&&(t.removeChild(n),a.size>0&&a.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 $i;for(let a of this.traverse())t.addTreeNode(a.scopeRef,null!=(n=null==(e=a.parent)?void 0:e.scopeRef)?n:null,a.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new $s({scopeRef:null}),this.fastMap.set(null,this.root)}}class $s{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 $l=new $i;function $c(e,n,t){let{direction:a}=bs(),o=(0,u8.useMemo)(()=>$o(n),[n]),r=()=>{var e;if(!n.current)return;let t=null==(e=window.event)?void 0:e.target,a=$a(n.current,{tabbable:!0});if(t&&(a.currentNode=t,t=a.previousNode()),!t){let e;do(e=a.lastChild())&&(t=e);while(e)}for(;null==t?void 0:t.hasAttribute("data-placeholder");){let e=a.previousNode();if(e&&e.hasAttribute("data-placeholder"))t=e;else break}t&&t.focus()},{pressProps:i}=yy({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&r()},onPress(e){"mouse"!==e.pointerType&&r()}});return gb(i,{onKeyDown:r=>{if(r.currentTarget.contains(r.target)&&(r.altKey&&("ArrowDown"===r.key||"ArrowUp"===r.key)&&"setOpen"in e&&(r.preventDefault(),r.stopPropagation(),e.setOpen(!0)),!t))switch(r.key){case"ArrowLeft":if(r.preventDefault(),r.stopPropagation(),"rtl"===a){if(n.current){let e=r.target,t=$p(n.current,e.getBoundingClientRect().left,-1);t&&t.focus()}}else o.focusPrevious();break;case"ArrowRight":if(r.preventDefault(),r.stopPropagation(),"rtl"===a){if(n.current){let e=r.target,t=$p(n.current,e.getBoundingClientRect().left,1);t&&t.focus()}}else o.focusNext()}}})}function $p(e,n,t){let a=$a(e,{tabbable:!0}),o=a.nextNode(),r=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-n,s=Math.abs(e);Math.sign(e)===t&&s<i&&(r=o,i=s),o=a.nextNode()}return r}function $u(e,n,t){let a=(0,u8.useRef)(n),o=ga(()=>{t&&t(a.current)});(0,u8.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 $d(e){let{description:n,errorMessage:t,isInvalid:a,validationState:o}=e,{labelProps:r,fieldProps:i}=function(e){let{id:n,label:t,"aria-labelledby":a,"aria-label":o,labelElementType:r="label"}=e;n=gh(n);let i=gh(),s={};return t&&(a=a?`${i} ${a}`:i,s={id:i,htmlFor:"label"===r?n:void 0}),{labelProps:s,fieldProps:_P({id:n,"aria-label":o,"aria-labelledby":a})}}(e),s=gg([!!n,!!t,a,o]),l=gg([!!n,!!t,a,o]);return{labelProps:r,fieldProps:i=gb(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function $f(e,n,t){let{validationBehavior:a,focus:o}=e;gt(()=>{if("native"===a&&(null==t?void 0:t.current)&&!t.current.disabled){var e;let a,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:(a=e.validity).badInput,customError:a.customError,patternMismatch:a.patternMismatch,rangeOverflow:a.rangeOverflow,rangeUnderflow:a.rangeUnderflow,stepMismatch:a.stepMismatch,tooLong:a.tooLong,tooShort:a.tooShort,typeMismatch:a.typeMismatch,valueMissing:a.valueMissing,valid:a.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let r=ga(()=>{n.resetValidation()}),i=ga(e=>{var a,r;n.displayValidation.isInvalid||n.commitValidation();let i=null==t||null==(a=t.current)?void 0:a.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==(r=t.current)||r.focus(),yw="keyboard",yM("keyboard",null)),e.preventDefault()}),s=ga(()=>{n.commitValidation()});(0,u8.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",r),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==n||n.removeEventListener("reset",r)}},[t,i,s,r,a])}let $m=new WeakMap,$h="__role_"+Date.now(),$g="__focusManager_"+Date.now();function $y(e,n,t){var a,o;let r,{isInvalid:i,validationErrors:s,validationDetails:l}=n.displayValidation,{labelProps:c,fieldProps:p,descriptionProps:u,errorMessageProps:d}=$d({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,u8.useRef)(null),{focusWithinProps:m}=yU({...e,onFocusWithin(t){var a;f.current=n.value,null==(a=e.onFocus)||a.call(e,t)},onBlurWithin:t=>{var a;n.confirmPlaceholder(),n.value!==f.current&&n.commitValidation(),null==(a=e.onBlur)||a.call(e,t)},onFocusWithinChange:e.onFocusChange}),h=_y((o=vX)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===n.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===n.maxGranularity?"time":"date",b=_F(n.value?h.format(g,{[y]:n.formatValue({month:"long"})}):""),v="presentation"===e[$h]?p["aria-describedby"]:[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[$g],A=(0,u8.useMemo)(()=>$||$o(t),[$,t]),k=$c(n,t,"presentation"===e[$h]);$m.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:A});let w=(0,u8.useRef)(e.autoFocus);r="presentation"===e[$h]?{role:"presentation"}:gb(p,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,u8.useEffect)(()=>{w.current&&A.focusFirst(),w.current=!1},[A]),$u(e.inputRef,n.value,n.setValue),$f({...e,focus(){A.focusFirst()}},n,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(a=n.value)?void 0:a.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=gT(e);return{labelProps:{...c,onClick:()=>{A.focusFirst()}},fieldProps:gb(C,r,k,m,{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 $b={};$b={"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 $_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$v={...$_,customError:!0,valid:!1},$$={isInvalid:!1,validationDetails:$_,validationErrors:[]},$A=(0,u8.createContext)({}),$k="__formValidationState"+Date.now();function $w(e){if(e[$k]){let{realtimeValidation:n,displayValidation:t,updateValidation:a,resetValidation:o,commitValidation:r}=e[$k];return{realtimeValidation:n,displayValidation:t,updateValidation:a,resetValidation:o,commitValidation:r}}return function(e){let{isInvalid:n,validationState:t,name:a,value:o,builtinValidation:r,validate:i,validationBehavior:s="aria"}=e;t&&(n||(n="invalid"===t));let l=void 0!==n?{isInvalid:n,validationErrors:[],validationDetails:$v}:null,c=(0,u8.useMemo)(()=>i&&null!=o?$C(function(e,n){if("function"==typeof e){let t=e(n);if(t&&"boolean"!=typeof t)return $x(t)}return[]}(i,o)):null,[i,o]);(null==r?void 0:r.validationDetails.valid)&&(r=void 0);let p=(0,u8.useContext)($A),u=(0,u8.useMemo)(()=>a?Array.isArray(a)?a.flatMap(e=>$x(p[e])):$x(p[a]):[],[p,a]),[d,f]=(0,u8.useState)(p),[m,h]=(0,u8.useState)(!1);p!==d&&(f(p),h(!1));let g=(0,u8.useMemo)(()=>$C(m?[]:u),[m,u]),y=(0,u8.useRef)($$),[b,v]=(0,u8.useState)($$),$=(0,u8.useRef)($$),[A,k]=(0,u8.useState)(!1);return(0,u8.useEffect)(()=>{if(!A)return;k(!1);let e=c||r||y.current;$E(e,$.current)||($.current=e,v(e))}),{realtimeValidation:l||g||c||r||$$,displayValidation:"native"===s?l||g||b:l||g||c||r||b,updateValidation(e){"aria"!==s||$E(b,e)?y.current=e:v(e)},resetValidation(){$E($$,$.current)||($.current=$$,v($$)),"native"===s&&k(!1),h(!0)},commitValidation(){"native"===s&&k(!0),h(!0)}}}(e)}function $x(e){return e?Array.isArray(e)?e:[e]:[]}function $C(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:$v}:null}function $E(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,a={...$_};for(let o of e){for(let e of o.validationErrors)n.add(e);for(let e in t||(t=o.isInvalid),a)a[e]||(a[e]=o.validationDetails[e])}return a.valid=!t,{isInvalid:t,validationErrors:[...n],validationDetails:a}}let $D=new _u((et=$b)&&et.__esModule?et.default:et);function $M(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function $z(e,n,t,a,o){let r=null!=e&&null!=t&&e.compare(t)>0,i=null!=e&&null!=n&&0>e.compare(n),s=null!=e&&(null==a?void 0:a(e))||!1,l=r||i||s,c=[];if(l){let e=$M(),a=new _m(e,_u.getGlobalDictionaryForPackage("@react-stately/datepicker")||$D),l=new __(e,$T({},o)),p=l.resolvedOptions().timeZone;i&&null!=n&&c.push(a.format("rangeUnderflow",{minValue:l.format(n.toDate(p))})),r&&null!=t&&c.push(a.format("rangeOverflow",{maxValue:l.format(t.toDate(p))})),s&&c.push(a.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:r,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let $O={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},$P={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function $T(e,n){var t;e={...n.shouldForceLeadingZeros?$P:$O,...e};let a=n.granularity||"minute",o=Object.keys(e),r=o.indexOf(null!=(t=n.maxGranularity)?t:"year");r<0&&(r=0);let i=o.indexOf(a);if(i<0&&(i=2),r>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(r,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"===a||"minute"===a||"second"===a)&&n.timeZone&&!n.hideTimeZone&&(s.timeZoneName="short"),n.showEra&&0===r&&(s.era="short"),s}function $B(e){return e&&"hour"in e?e:new bR}function $I(e,n){return null===e?null:e?b0(e,n):void 0}function $N(e,n,t,a){if(e)return $I(e,t);let o=b0(b8(null!=a?a:_t()).set({hour:0,minute:0,second:0,millisecond:0}),t);return"year"===n||"month"===n||"day"===n?bX(o):a?o:bQ(o)}function $j(e,n){let t=e&&"timeZone"in e?e.timeZone:void 0,a=e&&"minute"in e?"minute":"day";if(e&&n&&!(n in e))throw Error("Invalid granularity "+n+" for value "+e.toString());let[o,r]=(0,u8.useState)([a,t]);return e&&(o[0]!==a||o[1]!==t)&&r([a,t]),n||(n=e?a:o[0]),[n,e?t:o[1]]}let $R=new _u({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"),$F={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$L={year:5,month:2,day:7,hour:2,minute:15,second:15},$W={dayperiod:"dayPeriod"};function $G(e){var n,t;let{locale:a,createCalendar:o,hideTimeZone:r,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,m]=$j(d,e.granularity),h=m||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,u8.useMemo)(()=>new __(a),[a]),y=(0,u8.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[b,v]=vM(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),$=(0,u8.useMemo)(()=>{var e;return null!=(e=$I(b,y))?e:null},[b,y]),[A,k]=(0,u8.useState)(()=>$N(e.placeholderValue,f,y,m)),w="gregory"===y.identifier&&"BC"===($||A).era,x=(0,u8.useMemo)(()=>{var n;return{granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",timeZone:m,hideTimeZone:r,hourCycle:e.hourCycle,showEra:w,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,m,r,w]),C=(0,u8.useMemo)(()=>$T({},x),[x]),E=(0,u8.useMemo)(()=>new __(a,C),[a,C]),S=(0,u8.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,u8.useMemo)(()=>E.formatToParts(new Date).filter(e=>$F[e.type]).reduce((e,n)=>(e[n.type]=!0,e),{}),[E]),[M,z]=(0,u8.useState)(()=>e.value||e.defaultValue?{...D}:{}),O=(0,u8.useRef)(null),P=(0,u8.useRef)(y);(0,u8.useEffect)(()=>{b5(y,P.current)||(P.current=y,k(n=>Object.keys(M).length>0?b0(n,y):$N(e.placeholderValue,f,y,m)))},[y,f,M,m,e.placeholderValue]),b&&Object.keys(M).length<Object.keys(D).length&&z(M={...D}),null==b&&Object.keys(M).length===Object.keys(D).length&&(z(M={}),k($N(e.placeholderValue,f,y,m)));let T=$&&Object.keys(M).length>=Object.keys(D).length?$:A,B=n=>{if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(M),a=Object.keys(D);null==n?(v(null),k($N(e.placeholderValue,f,y,m)),z({})):t.length>=a.length||t.length===a.length-1&&D.dayPeriod&&!M.dayPeriod&&"dayPeriod"!==O.current?v(n=b0(n,(null==d?void 0:d.calendar)||new bh)):k(n),O.current=null},I=(0,u8.useMemo)(()=>T.toDate(h),[T,h]),N=(0,u8.useMemo)(()=>(function(e,n,t,a,o,r,i,s){let l=["hour","minute","second"],c=t.formatToParts(e),p=[];for(let e of c){var u,d;let t=$F[e.type];"era"===e.type&&1===r.getEras().length&&(t=!1);let c=$F[e.type]&&!n[e.type],f=$F[e.type]?(u=e.type,d=e.value,"era"===u||"dayPeriod"===u?d:"year"===u||"month"===u||"day"===u?$R.getStringForLocale(u,i):"––"):null,m={type:$W[e.type]||e.type,text:c?f:e.value,...$V(o,e.type,a),isPlaceholder:c,placeholder:f,isEditable:t};"hour"===e.type?(p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1}),p.push(m),e.type===s&&p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(p.push(m),p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1})):p.push(m)}return p})(I,M,E,S,T,y,a,f),[I,M,E,S,T,y,a,f]);D.era&&M.year&&!M.era?(M.era=!0,z({...M})):!D.era&&M.era&&(delete M.era,z({...M}));let j=e=>{M[e]=!0,"year"===e&&D.era&&(M.era=!0),z({...M})},R=(e,n)=>{if(M[e])B(function(e,n,t,a){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:a.hour12?12:24})}throw Error("Unknown segment: "+n)}(T,e,n,S));else{j(e);let n=Object.keys(M),t=Object.keys(D);(n.length>=t.length||n.length===t.length-1&&D.dayPeriod&&!M.dayPeriod)&&B(T)}},F=(0,u8.useMemo)(()=>$z(b,c,p,u,x),[b,c,p,u,x]),L=$w({...e,value:b,builtinValidation:F}),W=L.displayValidation.isInvalid,G=e.validationState||(W?"invalid":null);return{...L,value:$,dateValue:I,calendar:y,setValue:B,segments:N,dateFormatter:E,validationState:G,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,$L[e]||1)},decrementPage(e){R(e,-($L[e]||1))},setSegment(e,n){j(e),B(function(e,n,t,a){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,a=n>=12;if(t>=12===a)return e;return e.set({hour:a?n-12:n+12})}case"hour":if(a.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)}(T,e,n,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(M),t=Object.keys(D);n.length===t.length-1&&D.dayPeriod&&!M.dayPeriod&&(z(M={...D}),B(T.copy()))},clearSegment(n){delete M[n],O.current=n,z({...M});let t=$N(e.placeholderValue,f,y,m),a=T;if("dayPeriod"===n&&"hour"in T&&"hour"in t){let e=T.hour>=12,n=t.hour>=12;e&&!n?a=T.set({hour:T.hour-12}):!e&&n&&(a=T.set({hour:T.hour+12}))}else"hour"===n&&"hour"in T&&T.hour>=12&&M.dayPeriod?a=T.set({hour:t.hour+12}):n in T&&(a=T.set({[n]:t[n]}));v(null),B(a)},formatValue:e=>$?new __(a,$T(e,x)).format(I):"",getDateFormatter:(e,n)=>new __(e,$T({},{...x,...n}))}}function $V(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 $U=(0,u8.createContext)(null),$q=(0,u8.createContext)(null),$H=(0,u8.createContext)(null),$K=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)($q),a=(0,u8.useContext)($H);return t||a?u7().createElement($J,{...e,ref:n}):u7().createElement($Y,{...e,ref:n})}),$Y=(0,u8.forwardRef)((e,n)=>{let[t,a]=gk({slot:e.slot},n,$U),{locale:o}=bs(),r=$G({...t,locale:o,createCalendar:vA}),i=(0,u8.useRef)(null),{fieldProps:s,inputProps:l}=$y({...t,inputRef:i},r,a);return u7().createElement(gv,{values:[[$q,r],[vJ,{...l,ref:i}],[vK,{...s,ref:a,isInvalid:r.isInvalid,isDisabled:r.isDisabled}]]},u7().createElement($J,e))}),$J=(0,u8.forwardRef)((e,n)=>{let{className:t,children:a}=e,o=(0,u8.useContext)($q),r=(0,u8.useContext)($H),i=null!=o?o:r;return u7().createElement(u7().Fragment,null,u7().createElement(vY,{...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,u8.cloneElement)(a(e),{key:n}))),u7().createElement(vZ,null))}),$Z=(0,u8.createContext)({});function $X({children:e}){let n=(0,u8.useMemo)(()=>({register:()=>{}}),[]);return u7().createElement(ya.Provider,{value:n},e)}u7().forwardRef(({children:e,...n},t)=>{let a=(0,u8.useRef)(!1),o=(0,u8.useContext)(ya);t=ge(t||(null==o?void 0:o.ref));let r=gb(o||{},{...n,ref:t,register(){a.current=!0,o&&o.register()}});return ys(o,t),(0,u8.useEffect)(()=>{a.current||(a.current=!0)},[]),u7().createElement(ya.Provider,{value:r},e)});let $Q=u7().createContext(null);function $0(e){var n;let t=gd(),{portalContainer:a=t?null:document.body,isExiting:o}=e,[r,i]=(0,u8.useState)(!1),s=(0,u8.useMemo)(()=>({contain:r,setContain:i}),[r,i]),{getContainer:l}=null!=(n=(0,u8.useContext)($Z))?n:{};if(!e.portalContainer&&l&&(a=l()),!a)return null;let c=e.children;return e.disableFocusManagement||(c=u7().createElement(v2,{restoreFocus:!0,contain:(e.shouldContainFocus||r)&&!o},c)),c=u7().createElement($Q.Provider,{value:s},u7().createElement($X,null,c)),yf.createPortal(c,a)}let $1=(0,u8.createContext)(null),$2=(0,u8.createContext)(null),$3=(0,u8.forwardRef)(function(e,n){let t=e["aria-labelledby"];[e,n]=gk(e,n,$1);let{dialogProps:a,titleProps:o}=function(e,n){let t,a,{role:o="dialog"}=e,r=gg();r=e["aria-label"]?void 0:r;let i=(0,u8.useRef)(!1);return(0,u8.useEffect)(()=>{if(n.current&&!n.current.contains(document.activeElement)){yF(n.current);let e=setTimeout(()=>{document.activeElement===n.current&&(i.current=!0,n.current&&(n.current.blur(),yF(n.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[n]),gt(()=>{null==a||a(!0)},[a=null==(t=(0,u8.useContext)($Q))?void 0:t.setContain]),{dialogProps:{...gT(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}({...e,"aria-labelledby":t},n),r=(0,u8.useContext)($2);a["aria-label"]||a["aria-labelledby"]||e["aria-labelledby"]&&(a["aria-labelledby"]=e["aria-labelledby"]);let i=g$({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==r?void 0:r.close)||(()=>{})}});return u7().createElement("section",{...gT(e),...a,...i,ref:n,slot:e.slot||void 0},u7().createElement(gv,{values:[[y3,{slots:{[g_]:{},title:{...o,level:2}}}],[y1,{slots:{[g_]:{},close:{onPress:()=>null==r?void 0:r.close()}}}]]},i.children))}),$5=(0,u8.createContext)(null),$4=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)($5);return(null==t?void 0:t.isInvalid)?u7().createElement($6,{...e,ref:n}):null}),$6=(0,u8.forwardRef)((e,n)=>{let t=(0,u8.useContext)($5),a=gT(e),o=g$({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===t.validationErrors.length?void 0:t.validationErrors.join(" "),values:t});return null==o.children?null:u7().createElement(y4,{slot:"errorMessage",...a,...o,ref:n})}),$8=(0,u8.createContext)(null),$7=(0,u8.createContext)({}),$9=yQ(function(e,n){[e,n]=gk(e,n,$7);let{elementType:t="label",...a}=e;return u7().createElement(t,{className:"react-aria-Label",...a,ref:n})}),Ae=(0,u8.createContext)({placement:"bottom"}),An=new WeakMap,At=[];function Aa(e,n=-1/0,t=1/0){return Math.min(Math.max(e,n),t)}function Ao(e,n){let t=e,a=n.toString(),o=a.indexOf("."),r=o>=0?a.length-o:0;if(r>0){let e=Math.pow(10,r);t=Math.round(t*e)/e}return t}function Ar(e,n,t,a){n=Number(n),t=Number(t);let o=(e-(isNaN(n)?0:n))%a,r=Ao(2*Math.abs(o)>=a?e+Math.sign(o)*(a-Math.abs(o)):e-o,a);return isNaN(n)?!isNaN(t)&&r>t&&(r=Math.floor(Ao(t/a,a))*a):r<n?r=n:!isNaN(t)&&r>t&&(r=n+Math.floor(Ao((t-n)/a,a))*a),r=Ao(r,a)}let Ai={top:"top",bottom:"top",left:"left",right:"left"},As={top:"bottom",bottom:"top",left:"right",right:"left"},Al={top:"left",left:"top"},Ac={top:"height",left:"width"},Ap={width:"totalWidth",height:"totalHeight"},Au={},Ad="u">typeof document?window.visualViewport:null;function Af(e){var n,t,a,o,r;let i=0,s=0,l=0,c=0,p=0,u=0,d={},f=(null!=(n=null==Ad?void 0:Ad.scale)?n:1)>1;if("BODY"===e.tagName){let n=document.documentElement;l=n.clientWidth,c=n.clientHeight,i=null!=(t=null==Ad?void 0:Ad.width)?t:l,s=null!=(a=null==Ad?void 0:Ad.height)?a:c,d.top=n.scrollTop||e.scrollTop,d.left=n.scrollLeft||e.scrollLeft,Ad&&(p=Ad.offsetTop,u=Ad.offsetLeft)}else({width:i,height:s,top:p,left:u}=Ab(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=i,c=s;return g1()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,p=null!=(o=null==Ad?void 0:Ad.pageTop)?o:0,u=null!=(r=null==Ad?void 0:Ad.pageLeft)?r:0),{width:i,height:s,totalWidth:l,totalHeight:c,scroll:d,top:p,left:u}}function Am(e,n,t,a,o,r,i){var s;let l=null!=(s=o.scroll[e])?s:0,c=a[Ac[e]],p=a.scroll[Ai[e]]+r,u=c+a.scroll[Ai[e]]-r,d=n-l+i[e]-a[Ai[e]],f=n-l+t+i[e]-a[Ai[e]];return d<p?p-d:f>u?Math.max(u-f,p-d):0}function Ah(e){if(Au[e])return Au[e];let[n,t]=e.split(" "),a=Ai[n]||"right",o=Al[a];Ai[t]||(t="center");let r=Ac[a],i=Ac[o];return Au[e]={placement:n,crossPlacement:t,axis:a,crossAxis:o,size:r,crossSize:i},Au[e]}function Ag(e,n,t,a,o,r,i,s,l,c){var p,u,d,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:$}=a,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!=(m=t[$])?m:0)),A[b]+=r;let k=e[b]-t[$]+l+c,w=e[b]+e[$]-l-c;if(A[b]=Aa(A[b],k,w),h===y){let t=s?i[v]:n[Ap[v]];A[As[y]]=Math.floor(t-e[y]+o)}else A[y]=Math.floor(e[y]+e[v]+o);return A}function Ay(e,n,t,a,o,r){var i,s,l;let{placement:c,axis:p,size:u}=r;return c===p?Math.max(0,t[p]-e[p]-(null!=(i=e.scroll[p])?i:0)+n[p]-(null!=(s=a[p])?s:0)-a[As[p]]-o):Math.max(0,e[u]+e[p]+e.scroll[p]-n[p]-t[p]-t[u]-(null!=(l=a[p])?l:0)-a[As[p]]-o)}function Ab(e){let{top:n,left:t,width:a,height:o}=e.getBoundingClientRect(),{scrollTop:r,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:n+r-s,left:t+i-l,width:a,height:o}}function A_(e,n){let t,a=window.getComputedStyle(e);if("fixed"===a.position){let{top:n,left:a,width:o,height:r}=e.getBoundingClientRect();t={top:n,left:a,width:o,height:r}}else{t=Ab(e);let a=Ab(n),o=window.getComputedStyle(n);a.top+=(parseInt(o.borderTopWidth,10)||0)-n.scrollTop,a.left+=(parseInt(o.borderLeftWidth,10)||0)-n.scrollLeft,t.top-=a.top,t.left-=a.left}return t.top-=parseInt(a.marginTop,10)||0,t.left-=parseInt(a.marginLeft,10)||0,t}function Av(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 A$=new WeakMap;function AA(e){let{ref:n,box:t,onResize:a}=e;(0,u8.useEffect)(()=>{let e=null==n?void 0:n.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)};else{let n=new window.ResizeObserver(e=>{e.length&&a()});return n.observe(e,{box:t}),()=>{e&&n.unobserve(e)}}},[a,n,t])}let Ak="u">typeof document?window.visualViewport:null;function Aw(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 Ax=[],AC="u">typeof document&&window.visualViewport,AE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),AS=0;function AD(e,n,t){let a=e.style[n];return e.style[n]=t,()=>{e.style[n]=a}}function AM(e,n,t,a){return e.addEventListener(n,t,a),()=>{e.removeEventListener(n,t,a)}}function Az(e){let n=document.scrollingElement||document.documentElement,t=e;for(;t&&t!==n;){let e=_V(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let n=e.getBoundingClientRect().top,a=t.getBoundingClientRect().top;a>n+t.clientHeight&&(e.scrollTop+=a-n)}t=e.parentElement}}var AO={};function AP(e){var n;let{onDismiss:t,...a}=e,o=_P(a,_y((n=AO)&&n.__esModule?n.default:n,"@react-aria/overlays").format("dismiss"));return u7().createElement(_I,null,u7().createElement("button",{...o,tabIndex:-1,onClick:()=>{t&&t()},style:{width:1,height:1}}))}function AT(e,n,t){gt(()=>{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 a=!1;return Promise.all(n.map(e=>e.finished)).then(()=>{a||(0,yf.flushSync)(()=>{t()})}).catch(()=>{}),()=>{a=!0}}},[e,n,t])}function AB(e){let[n,t]=vM(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=(0,u8.useCallback)(()=>{t(!0)},[t]),o=(0,u8.useCallback)(()=>{t(!1)},[t]),r=(0,u8.useCallback)(()=>{t(!n)},[t,n]);return{isOpen:n,setOpen:t,open:a,close:o,toggle:r}}AO={"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 AI=(0,u8.createContext)(null),AN=(0,u8.createContext)(null),Aj=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,AI);let t=(0,u8.useContext)($2),a=AB(e),o=null==e.isOpen&&null==e.defaultOpen&&t?t:a,r=function(e,n){let[t,a]=(0,u8.useState)(n?"open":"closed");switch(t){case"open":n||a("exiting");break;case"closed":case"exiting":n&&a("open")}let o="exiting"===t;return AT(e,o,(0,u8.useCallback)(()=>{a(e=>"exiting"===e?"closed":e)},[])),o}(n,o.isOpen)||e.isExiting||!1,i=(0,u8.useContext)(yX),{direction:s}=bs();if(i){let n=e.children;return"function"==typeof n&&(n=n({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),u7().createElement(u7().Fragment,null,n)}return!o||o.isOpen||r?u7().createElement(AR,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:r,dir:s}):null});function AR({state:e,isExiting:n,UNSTABLE_portalContainer:t,...a}){var o,r;let i=(0,u8.useRef)(null),[s,l]=(0,u8.useState)(0),c=(0,u8.useRef)(null),u=(0,u8.useContext)(AN),d=u&&"SubmenuTrigger"===a.trigger;gt(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:m,arrowProps:h,placement:g}=function(e,n){let{triggerRef:t,popoverRef:a,groupRef:o,isNonModal:r,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:u,underlayProps:d}=function(e,n){let{onClose:t,shouldCloseOnBlur:a,isOpen:o,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,u8.useEffect)(()=>{if(o&&!Ax.includes(n))return Ax.push(n),()=>{let e=Ax.indexOf(n);e>=0&&Ax.splice(e,1)}},[o,n]);let l=()=>{Ax[Ax.length-1]===n&&t&&t()};!function(e){let{ref:n,onInteractOutside:t,isDisabled:a,onInteractOutsideStart:o}=e,r=(0,u8.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=ga(e=>{t&&Aw(e,n)&&(o&&o(e),r.current.isPointerDown=!0)}),s=ga(e=>{t&&t(e)});(0,u8.useEffect)(()=>{let e=r.current;if(a)return;let t=gF(n.current);if("u">typeof PointerEvent){let a=t=>{e.isPointerDown&&Aw(t,n)&&s(t),e.isPointerDown=!1};return t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerup",a,!0),()=>{t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerup",a,!0)}}},[n,a,i,s])}({ref:n,onInteractOutside:r&&o?e=>{(!s||s(e.target))&&(Ax[Ax.length-1]===n&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&Ax[Ax.length-1]===n&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=yU({isDisabled:!a,onBlurWithin:e=>{!(!e.relatedTarget||v6(e.relatedTarget,v1))&&(!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:!r||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:a),{overlayProps:f,arrowProps:m,placement:h}=function(e){var n,t,a;let{direction:o}=bs(),{arrowSize:r=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:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:b,arrowBoundaryOffset:v=0}=e,[$,A]=(0,u8.useState)(null),k=[h,c,s.current,i.current,l.current,p,u,d,f,m,g,o,b,v,r],w=(0,u8.useRef)(null==Ak?void 0:Ak.scale);(0,u8.useEffect)(()=>{g&&(w.current=null==Ak?void 0:Ak.scale)},[g]);let x=(0,u8.useCallback)(()=>{var e,n,t,a,y,$;if(!1===h||!g||!s.current||!i.current||!d||(null==Ak?void 0:Ak.scale)!==w.current)return;let k=null;if(l.current&&l.current.contains(document.activeElement)){let a=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(k={type:"top",offset:(null!=(n=null==a?void 0:a.top)?n:0)-o.top}).offset>o.height/2&&(k.type="bottom",k.offset=(null!=(t=null==a?void 0:a.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==(a=window.visualViewport)?void 0:a.height)?y:window.innerHeight)+"px");let C=function(e){var n,t,a,o;let r,{placement:i,targetNode:s,overlayNode:l,scrollNode:c,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:m,maxHeight:h,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&&!Av(n)&&(n=document.documentElement),null==n)for(n=e.parentElement;n&&!Av(n);)n=n.parentElement;return n||document.documentElement}(l):document.documentElement,v=b===document.documentElement,$=window.getComputedStyle(b).position,A=v?Ab(s):A_(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 k=Ab(l),w={top:parseInt((r=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(r.marginBottom,10)||0,left:parseInt(r.marginLeft,10)||0,right:parseInt(r.marginRight,10)||0};k.width+=(null!=(n=w.left)?n:0)+(null!=(t=w.right)?t:0),k.height+=(null!=(a=w.top)?a:0)+(null!=(o=w.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=Af(d),E=Af(b),S="BODY"===d.tagName?Ab(b):A_(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,n,t,a,o,r,i,s,l,c,p,u,d,f,m,h){var g,y,b,v,$,A,k,w,x,C,E,S,D,M;let z,O,P,T=Ah(e),{size:B,crossAxis:I,crossSize:N,placement:j,crossPlacement:R}=T,F=Ag(n,s,t,T,p,u,c,d,m,h),L=p,W=Ay(s,c,n,o,r+p,T);if(i&&a[B]>W){let e=Ah(`${As[j]} ${R}`),a=Ag(n,s,t,e,p,u,c,d,m,h);Ay(s,c,n,o,r+p,e)>W&&(T=e,F=a,L=p)}let G="bottom";"top"===T.axis?"top"===T.placement?G="top":"bottom"===T.placement&&(G="bottom"):"top"===T.crossAxis&&("top"===T.crossPlacement?G="bottom":"bottom"===T.crossPlacement&&(G="top"));let V=Am(I,F[I],t[N],s,l,r,c);F[I]+=V;let U=($=F,A=t.height,k=G,z=d?c.height:s[Ap.height],O=null!=$.top?c.top+$.top:c.top+(z-(null!=(w=$.bottom)?w:0)-A),P="top"!==k?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-O-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+r)):Math.max(0,O+A-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(M=o.bottom)?M:0)+r)),Math.min(s.height-2*r,P));f&&f<U&&(U=f),t.height=Math.min(t.height,U),V=Am(I,(F=Ag(n,s,t,T,L,u,c,d,m,h))[I],t[N],s,l,r,c),F[I]+=V;let q={},H=n[I]+.5*n[N]-F[I]-o[Ai[I]],K=m/2+h,Y="left"===Ai[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),J=t[N]-Y-m/2-h,Z=Aa(H,n[I]+m/2-(F[I]+o[Ai[I]]),n[I]+n[N]-m/2-(F[I]+o[Ai[I]]));return q[I]=Aa(Z,K,J),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:T.placement}}(i,A,k,x,w,p,u,C,E,S,f,m,!!$&&"static"!==$,h,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:m,maxHeight:b,arrowSize:r,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":"",k&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),n=l.current.getBoundingClientRect(),t=e[k.type]-n[k.type];l.current.scrollTop+=t-k.offset}A(C)}},k);gt(x,k),gt(()=>(window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}),[a=x]),AA({ref:s,onResize:x}),AA({ref:i,onResize:x});let C=(0,u8.useRef)(!1);gt(()=>{let e,n=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},t=()=>{C.current&&n()};return null==Ak||Ak.addEventListener("resize",n),null==Ak||Ak.addEventListener("scroll",t),()=>{null==Ak||Ak.removeEventListener("resize",n),null==Ak||Ak.removeEventListener("scroll",t)}},[x]);let E=(0,u8.useCallback)(()=>{C.current||null==y||y()},[y,C]);return!function(e){let{triggerRef:n,isOpen:t,onClose:a}=e;(0,u8.useEffect)(()=>{if(!t||null===a)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=a||A$.get(n.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[t,a,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:a,isOpen:n.isOpen,onClose:r&&!c?n.close:null});return!function(e={}){let{isDisabled:n}=e;gt(()=>{if(!n){let e,n,t,a;return 1==++AS&&(p=g0()?(t=null,a=gn(AM(document,"touchstart",t=>{((e=_V(t.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(n=AD(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),AM(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}),AM(document,"touchend",()=>{n&&n()},{passive:!1,capture:!0}),AM(document,"focus",e=>{var n;let a=e.target;((n=a)instanceof HTMLInputElement&&!AE.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable)&&((()=>{if(t)return;let e=window.pageXOffset,n=window.pageYOffset;t=gn(AM(window,"scroll",()=>{window.scrollTo(0,0)}),AD(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),AD(document.documentElement,"overflow","hidden"),AD(document.body,"marginTop",`-${n}px`),()=>{window.scrollTo(e,n)}),window.scrollTo(0,0)})(),a.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{a.style.transform="",AC&&(AC.height<window.innerHeight?requestAnimationFrame(()=>{Az(a)}):AC.addEventListener("resize",()=>Az(a),{once:!0}))}))},!0)),()=>{null==n||n(),null==t||t(),a()}):gn(AD(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),AD(document.documentElement,"overflow","hidden"))),()=>{0==--AS&&p()}}},[n])}({isDisabled:r||!n.isOpen}),gt(()=>{if(n.isOpen&&a.current){if(!r)return function(e,n=document.body){let t=new Set(e),a=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&&a.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&&r(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)r(e),e=o.nextNode()}},r=e=>{var n;let t=null!=(n=An.get(e))?n:0;("true"!==e.getAttribute("aria-hidden")||0!==t)&&(0===t&&e.setAttribute("aria-hidden","true"),a.add(e),An.set(e,t+1))};At.length&&At[At.length-1].disconnect(),o(n);let i=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&0!==n.addedNodes.length&&![...t,...a].some(e=>e.contains(n.target))){for(let e of n.removedNodes)e instanceof Element&&(t.delete(e),a.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:a,observe(){i.observe(n,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return At.push(s),()=>{for(let e of(i.disconnect(),a)){let n=An.get(e);null!=n&&(1===n?(e.removeAttribute("aria-hidden"),An.delete(e)):An.set(e,n-1))}s===At[At.length-1]?(At.pop(),At.length&&At[At.length-1].observe()):At.splice(At.indexOf(s),1)}}([null!=(t=null==o?void 0:o.current)?t:a.current]);var e,t,i=null!=(e=null==o?void 0:o.current)?e:a.current;let n=At[At.length-1];return n&&!n.visibleNodes.has(i)?(n.visibleNodes.add(i),()=>{n.visibleNodes.delete(i)}):void 0}},[r,n.isOpen,a,o]),{popoverProps:gb(u,f),arrowProps:m,underlayProps:d,placement:h}}({...a,offset:null!=(o=a.offset)?o:8,arrowSize:s,groupRef:d?u:c},e),y=a.popoverRef,b=function(e,n=!0){let[t,a]=(0,u8.useState)(!0),o=t&&n;return gt(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let n of e.current.getAnimations())n instanceof CSSTransition&&n.cancel()},[e,o]),AT(e,o,(0,u8.useCallback)(()=>a(!1),[])),o}(y,!!g)||a.isEntering||!1,v=g$({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:g,isEntering:b,isExiting:n}}),$=!a.isNonModal||"SubmenuTrigger"===a.trigger,[A,k]=(0,u8.useState)(!1);gt(()=>{y.current&&k($&&!y.current.querySelector("[role=dialog]"))},[y,$]),(0,u8.useEffect)(()=>{A&&y.current&&!y.current.contains(document.activeElement)&&yF(y.current)},[A,y]);let w={...f.style,...v.style},x=u7().createElement("div",{...gb(gT(a),f),...v,role:A?"dialog":void 0,tabIndex:A?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:y,slot:a.slot||void 0,style:w,dir:a.dir,"data-trigger":a.trigger,"data-placement":g,"data-entering":b||void 0,"data-exiting":n||void 0},!a.isNonModal&&u7().createElement(AP,{onDismiss:e.close}),u7().createElement(Ae.Provider,{value:{...h,placement:g,ref:i}},v.children),u7().createElement(AP,{onDismiss:e.close}));return d?u7().createElement($0,{...a,shouldContainFocus:A,isExiting:n,portalContainer:null!=(r=null!=t?t:null==u?void 0:u.current)?r:void 0},x):u7().createElement($0,{...a,shouldContainFocus:A,isExiting:n,portalContainer:t},!a.isNonModal&&e.isOpen&&u7().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),u7().createElement("div",{ref:c,style:{display:"contents"}},u7().createElement(AN.Provider,{value:c},x)))}function AF(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let AL=(0,u8.createContext)(null),AW=(0,u8.createContext)(null),AG=(0,u8.createContext)(null),AV=(0,u8.createContext)(null),AU=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,AL);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",i=function(e){var n;let t=AB(e),[a,o]=vM(e.value,e.defaultValue||null,e.onChange),r=a||e.placeholderValue||null,[i,s]=$j(r,e.granularity),l=null!=a?a.toDate(null!=s?s:"UTC"):null,c="hour"===i||"minute"===i||"second"===i,p=null==(n=e.shouldCloseOnSelect)||n,[u,d]=(0,u8.useState)(null),[f,m]=(0,u8.useState)(null);if(a&&(u=a,"hour"in a&&(f=a)),r&&!(i in r))throw Error("Invalid granularity "+i+" for value "+r.toString());let h=(null==a?void 0:a.calendar.identifier)==="gregory"&&"BC"===a.era,g=(0,u8.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:b,isDateUnavailable:v}=e,$=(0,u8.useMemo)(()=>$z(a,y,b,v,g),[a,y,b,v,g]),A=$w({...e,value:a,builtinValidation:$}),k=A.displayValidation.isInvalid,w=e.validationState||(k?"invalid":null),x=(e,n)=>{o("timeZone"in n?n.set(bX(e)):bQ(e,n)),d(null),m(null),A.commitValidation()};return{...A,value:a,setValue:o,dateValue:u,timeValue:f,setDateValue:n=>{let a="function"==typeof p?p():p;c?f||a?x(n,f||$B(e.defaultValue||e.placeholderValue)):d(n):(o(n),A.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{u&&e?x(u,e):m(e)},granularity:i,hasTime:c,...t,setOpen(n){!n&&!a&&u&&c&&x(u,f||$B(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:w,isInvalid:k,formatValue:(e,n)=>l?new __(e,$T(n,g)).format(l):"",getDateFormatter:(e,n)=>new __(e,$T({},{...g,...n}))}}({...e,validationBehavior:r}),s=(0,u8.useRef)(null),[l,c]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,fieldProps:d,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var a;let o=gh(),r=gh(),i=gh(),s=_y((a=vX)&&a.__esModule?a.default:a,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:p}=n.displayValidation,{labelProps:u,fieldProps:d,descriptionProps:f,errorMessageProps:m}=$d({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),h=$c(n,t),g=d["aria-labelledby"]||d.id,{locale:y}=bs(),b=n.formatValue(y,{month:"long"}),v=_F(b?s.format("selectedDateDescription",{date:b}):""),$=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=gT(e),k=(0,u8.useMemo)(()=>$o(t),[t]),w=(0,u8.useRef)(!1),{focusWithinProps:x}=yU({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(r);if(!(null==t?void 0:t.contains(n.relatedTarget))){var a,o;w.current=!1,null==(a=e.onBlur)||a.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!w.current){var t,a;w.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(a=e.onFocusChange)||a.call(e,!0)}}});return{groupProps:gb(A,h,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:()=>{k.focusFirst()}},fieldProps:{...d,id:i,[$h]:"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,[$k]:n,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:m,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:r,"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}}({...gx(e),label:c,validationBehavior:r},i,s),[v,$]=(0,u8.useState)(null),A=(0,u8.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);AA({ref:s,onResize:A});let{focusProps:k,isFocused:w,isFocusVisible:x}=yq({within:!0}),C=g$({...e,values:{state:i,isFocusWithin:w,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),E=gT(e);return delete E.id,u7().createElement(gv,{values:[[AG,i],[vK,{...p,ref:s,isInvalid:i.isInvalid}],[$U,d],[y1,{...f,isPressed:i.isOpen}],[$7,{...u,ref:l,elementType:"span"}],[vI,h],[$2,i],[AI,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[$1,m],[y5,{slots:{description:g,errorMessage:y}}],[$5,b]]},u7().createElement("div",{...k,...E,...C,ref:n,slot:e.slot||void 0,"data-focus-within":w||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}))}),Aq=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,AW);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",i=function(e){var n,t,a;let o=AB(e),[r,i]=vM(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,u8.useState)(()=>r||{start:null,end:null});null==r&&s.start&&s.end&&l(s={start:null,end:null});let c=r||s,p=e=>{l(e||{start:null,end:null}),AF(e)?i(e):i(null)},[u,d]=$j((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===u||"minute"===u||"second"===u,m=null==(a=e.shouldCloseOnSelect)||a,[h,g]=(0,u8.useState)(null),[y,b]=(0,u8.useState)(null);c&&AF(c)&&(h=c,"hour"in c.start&&(y=c));let v=(e,n)=>{p({start:"timeZone"in n.start?n.start.set(bX(e.start)):bQ(e.start,n.start),end:"timeZone"in n.end?n.end.set(bX(e.end)):bQ(e.end,n.end)}),g(null),b(null),D.commitValidation()},$=n=>{let t="function"==typeof m?m():m;f?AF(n)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?v(n,{start:(null==y?void 0:y.start)||$B(e.placeholderValue),end:(null==y?void 0:y.end)||$B(e.placeholderValue)}):g(n):AF(n)?(p(n),D.commitValidation()):g(n),t&&o.setOpen(!1)},A=e=>{AF(h)&&AF(e)?v(h,e):b(e)},k=(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,w=(0,u8.useMemo)(()=>({granularity:u,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:k}),[u,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,k]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,u8.useMemo)(()=>{var e,n;let t;return t=$S($z(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,w),$z(null!=(n=null==c?void 0:c.end)?n:null,x,C,E,w)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(t=$S(t,{isInvalid:!0,validationErrors:[(_u.getGlobalDictionaryForPackage("@react-stately/datepicker")||$D).getStringForLocale("rangeReversed",$M())],validationDetails:{...$_,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[c,x,C,E,w]),D=$w({...e,value:r,name:(0,u8.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),M=D.displayValidation.isInvalid,z=e.validationState||(M?"invalid":null);return{...D,value:c,setValue:p,dateRange:h,timeRange:y,granularity:u,hasTime:f,setDate(e,n){var t,a;"start"===e?$({start:n,end:null!=(t=null==h?void 0:h.end)?t:null}):$({start:null!=(a=null==h?void 0:h.start)?a:null,end:n})},setTime(e,n){var t,a;"start"===e?A({start:n,end:null!=(t=null==y?void 0:y.end)?t:null}):A({start:null!=(a=null==y?void 0:y.start)?a:null,end:n})},setDateTime(e,n){var t,a;"start"===e?p({start:n,end:null!=(t=null==c?void 0:c.end)?t:null}):p({start:null!=(a=null==c?void 0:c.start)?a:null,end:n})},setDateRange:$,setTimeRange:A,...o,setOpen(n){!n&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&AF(h)&&f&&v(h,{start:(null==y?void 0:y.start)||$B(e.placeholderValue),end:(null==y?void 0:y.end)||$B(e.placeholderValue)}),o.setOpen(n)},validationState:z,isInvalid:M,formatValue(n,t){let a;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,r=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=$T(t,{granularity:r,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 __(n,l);if(o===i&&r===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 a=e[t];if("shared"===a.source&&"literal"===a.type)n=t;else if("endRange"===a.source)break}let t="",a="";for(let o=0;o<e.length;o++)o<n?t+=e[o].value:o>n&&(a+=e[o].value);return{start:t,end:a}}catch{}a=d}else a=new __(n,$T(t,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(p),end:a.format(u)}},getDateFormatter:(e,n)=>new __(e,$T({},{...w,...n}))}}({...e,validationBehavior:r}),s=(0,u8.useRef)(null),[l,c]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,startFieldProps:d,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:b,...v}=function(e,n,t){var a,o,r,i,s,l;let c=_y((l=vX)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:p,validationErrors:u,validationDetails:d}=n.displayValidation,{labelProps:f,fieldProps:m,descriptionProps:h,errorMessageProps:g}=$d({...e,labelElementType:"span",isInvalid:p,errorMessage:e.errorMessage||u}),y=m["aria-labelledby"]||m.id,{locale:b}=bs(),v=n.formatValue(b,{month:"long"}),$=_F(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),A={"aria-label":c.format("startDate"),"aria-labelledby":y},k={"aria-label":c.format("endDate"),"aria-labelledby":y},w=gh(),x=gh(),C=$c(n,t),E=[$["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,u8.useMemo)(()=>$o(t,{accept:e=>e.id!==w}),[t,w]),D={[$g]:S,[$h]:"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},M=gT(e),z=(0,u8.useRef)(!1),{focusWithinProps:O}=yU({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(x);if(!(null==t?void 0:t.contains(n.relatedTarget))){var a,o;z.current=!1,null==(a=e.onBlur)||a.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!z.current){var t,a;z.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(a=e.onFocusChange)||a.call(e,!0)}}}),P=(0,u8.useRef)($$),T=(0,u8.useRef)($$);return{groupProps:gb(M,C,m,$,O,{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:w,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${w} ${y}`,"aria-describedby":E,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${w} ${y}`},startFieldProps:{...A,...D,value:null!=(i=null==(a=n.value)?void 0:a.start)?i:null,onChange:e=>n.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[$k]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){P.current=e,n.updateValidation($S(e,T.current))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},endFieldProps:{...k,...D,value:null!=(s=null==(o=n.value)?void 0:o.end)?s:null,onChange:e=>n.setDateTime("end",e),name:e.endName,[$k]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){T.current=e,n.updateValidation($S(P.current,e))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(r=n.dateRange)?void 0:r.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}}({...gx(e),label:c,validationBehavior:r},i,s),[$,A]=(0,u8.useState)(null),k=(0,u8.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);AA({ref:s,onResize:k});let{focusProps:w,isFocused:x,isFocusVisible:C}=yq({within:!0}),E=g$({...e,values:{state:i,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=gT(e);return delete S.id,u7().createElement(gv,{values:[[AV,i],[vK,{...p,ref:s,isInvalid:i.isInvalid}],[y1,{...m,isPressed:i.isOpen}],[$7,{...u,ref:l,elementType:"span"}],[vN,g],[$2,i],[AI,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":$}}],[$1,h],[$U,{slots:{start:d,end:f}}],[y5,{slots:{description:y,errorMessage:b}}],[$5,v]]},u7().createElement("div",{...w,...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 AH(e){return u7().createElement(bi,e)}function AK(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 bN||e instanceof bL||e instanceof bG)return n?b0(e,n):e;{let t=fB()(e).toDate(),a=new bN(t.getFullYear(),t.getMonth()+1,t.getDate());return n?b0(a,n):a}}function AY(e){if(e)return e.toDate(_t())}function AJ(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ea=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ea=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(e){return"en-US"}}(ea||"en-US"),AX=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},AQ={};for(let e=1;e<100;e++)AQ[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var A0={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},A1="[1234567890一二三四五六七八九〇\\d]",A2={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},A3={},A5={"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},A4={zone:A5,year:AQ,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:{}},A6={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(A5).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,}"},A8={...A6,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}"},A7={},A9=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(n=AZ){return A7[n.toLowerCase()]||(A7[n.toLowerCase()]=new e(n)),A7[n.toLowerCase()]}constructor(e=AZ){this.locale=e,this.lookups={...A4},this.vars={...A6};const 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,a=this.toInt(e);return a<12&&12===t&&(a+=12),12===a&&0===t&&(a=0),a}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,a]=n;return("-"===e||"−"===e?-1:1)*(60*this.toInt(t)+this.toInt(a||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=A2: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(A3[e])return A3[e];if("fullwide"===e||"hanidec"===e)return{group:A1,lookup:{...A2}};let n=A0[e];if(!n)return{group:"\\d",lookup:{...A2}};let t=String.fromCharCode(n),a=String.fromCharCode(n+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(n+e)]=e;return A3[e]={group:`[${t}-${a}]`,lookup:o},A3[e]}(this.numberingSystem);for(let t in this.lookups.digit=n,A8)A8.hasOwnProperty(t)&&(this.vars[t]=A8[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,a)=>{["","k","kuu","kuuta"].forEach((o,r)=>{e[t+o+(r<2?"\\.?":"")]=!0,n[t+o]=a+1})});else{let t=[],a=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 r=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=r.formatToParts(t[i]).find(a).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 r=0;r<12;r++){let i=o.formatToParts(t[r]).find(a).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,n[i]=r+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=[],a={};for(let o of["long","short"]){let r=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=r.formatToParts(e[i]).find(n).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),t.push(`${s}\\.?`)):t.push(s),a[s]=i}}this.vars.DAYNAME=t.join("|"),this.lookups.dayname=a}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],n=e=>"dayPeriod"===e.type,t=[],a={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let r=0;r<2;r++){let i=o.formatToParts(e[r]).find(n);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);t.push(s),a[s]=12*r}this.vars.MERIDIEM=t.join("|"),this.lookups.meridiem=a}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")}},ke=["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"],kn={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},kt=()=>new Date;function ka(e){return function(n){let t={};for(let a=0,o=e.length;a<o;a++){let o=e[a];o&&(t[o]=n[a])}return t}}var ko=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:n,patterns:t,formatter:a}){this.doneChecker=e,this.fallback=n,this.patterns=t,this.formatter=a}attempt(e){if("string"!=typeof e)return this.fallback(e);let n=e.trim(),t={},a=!1;for(let e of this.patterns){let o=n.match(e.regex);if(!o)continue;a=!0;let r=e.handler(o);if(r){for(let[e,n]of Object.entries(r))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 a?this.formatter(t):this.fallback(e)}},kr=["year","month","day","hour","minute","second","millisecond","offset"],ki={};function ks(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 kl=[[/([^\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"]],kc={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," "],...kl],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:kl,id:kl,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function kp(e,n=AZ){let t=function(e){if(!ki[e]){var n,t;let a,o,r=A9.factory(e);ki[e]=new ko({doneChecker:ks,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:(a=[{name:"timestampWithOffset",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:r.compile(`^(${A1}{2,4})\\s*\u5E74\\s*(${A1}{1,2})\\s*\u6708\\s*(${A1}{1,2})\\s*\u65E5$`),handler:ka(["","year","month","day"])},{name:"korean",regex:r.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:ka(["","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:ka(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let n=kt(),t=e[0].toLowerCase(),a={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[t];0!==a&&n.setTime(n.getTime()+a);let o={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};return"now"===t?{...o,hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),millisecond:n.getMilliseconds()}:o}},{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,a]){n=parseFloat(n),"week"===(t=t.length<=2?kn[t]:(t=t.replace(/s$/,"")).toLowerCase())&&(t="day",n*=7),("-"===e||a)&&(n*=-1);let o=kt();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:r.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:ka(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:r.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:ka(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:r.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:ka(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:r.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","minute","second","meridiem"])},{name:"hms24",regex:r.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:ka(["","hour","minute","second","millisecond"])},{name:"hm12",regex:r.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","minute","meridiem"])},{name:"hm24",regex:r.compile("(_H24_):(_MIN_)"),handler:ka(["","hour","minute"])},{name:"h12",regex:r.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:ka(["","year","month","day"])},{name:"yearMonthnameDay",regex:r.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:ka(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:r.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:ka(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:r.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:ka(["","monthname","day","","year"])},{name:"dayMonthname",regex:r.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:ka(["","day","","monthname"])},{name:"monthnameDay",regex:r.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:ka(["","monthname","day"])},{name:"hmsNoMeridiem",regex:r.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:ka(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:r.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:ka(["","hour","minute"])},{name:"ymd",regex:r.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:ka(["","year","","month","day"])},{name:"mdy",regex:r.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:ka(["","month","","day","year"])},{name:"dmy",regex:r.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:ka(["","day","month","year"])},{name:"yearLoose",regex:r.compile("_YEAR4_"),handler:ka(["year"])},{name:"dayMonthnameLoose",regex:r.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:ka(["","day","monthname"])},{name:"monthnameDayLoose",regex:r.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:ka(["","monthname","day"])},{name:"monthname",regex:r.compile("_MONTHNAME_"),handler:ka(["monthname"])},{name:"year4",regex:r.compile("_YEAR4_"),handler:ka(["year"])},{name:"md",regex:r.compile("(_MONTH_)[/-](_DAY_)"),handler:ka(["","month","day"])},{name:"dm",regex:r.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:ka(["","day","month"])},{name:"day",regex:r.compile("_DAY_"),handler:ka(["day"])},{name:"year2",regex:r.compile("_YEAR2_"),handler:ka(["year"])},{name:"onlyZone",regex:r.compile("_ZONE_"),handler:ka(["zone"])},{name:"onlyOffset",regex:r.compile("_OFFSET_"),handler:ka(["offset"])}],o=r.baseName.slice(0,5),ke.includes(o)?a:a.filter(e=>!["mdy","md"].includes(e.name))),formatter:(t=r,function(e){let n={};for(let[a,o]of Object.entries(e))if("monthname"===a){if(o){let e=t.monthNameToInt(o);void 0!==e&&(n.month=e)}}else if("hour"===a&&e.meridiem){let a=t.h12ToInt(o,e.meridiem);void 0!==a&&(n.hour=a)}else if("zone"===a){if(o){let e=t.zoneToOffset(o);void 0!==e&&(n.offset=e)}}else if("offset"===a){let e=t.offsetToMinutes(o);void 0!==e&&(n.offset=e)}else if("millisecond"===a){let e=t.millisecondToInt(o);"number"==typeof e&&(n.millisecond=e)}else if(kr.includes(a)){let e=t.toInt(o);"number"==typeof e&&(n[a]=e)}return n.year<100&&(n.year=AQ[n.year]),n.year&&"buddhist"===t.dateOptions.calendar&&(n.year-=543),n})})}return ki[e]}(n),a=function(e,n){let t=kc[n.slice(0,2).toLowerCase()];if(!t)return e;for(let[n,a]of t)e=e.replace(n,a);return e}(e,n);return t.attempt(a)}function ku(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let n=new AX(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 AX(n.valueOf()-60*e.offset*1e3):n}function kd(e,n=AZ){let t=kp(e,n),a=t.invalid?new AX(NaN):ku(t);return a.isValid()||(a.invalid=`Unable to parse date "${e}"`),a}function kf(e,n=AZ){return e instanceof Date?new AX(e.valueOf()):"number"==typeof e?new AX(e):kd(e,n)}Date.fromString=AX.fromString=kd,Date.fromAny=AX.fromAny=kf,"u">typeof window&&(window.anyDateParser={fromString:kd,fromAny:kf,fromObject:ku,attempt:kp});var km=t(5238),kh=t(83826);let kg=function(e){return null==e};function ky(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}fB().extend(fI),fB().extend(kh),fB().extend(km);let kb="YYYY-MM-DDTHH:mm:ss.SSSZZ";function k_(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fB()(e,kb).isValid()}function kv(e){return fB()(e).isToday()}function k$(e){return k_(e)?fB()(e,kb).toDate():null}function kA(e,n=!1){let t=fB()(e);return n&&(t=t.utc()),t.format(kb)}function kk(e){return fB()(e).toDate()}var kw=new WeakMap;let kx=new class{register(e,n){ky(this,kw).set(e,n)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let n=`${e.language}-${e.region}`;if(ky(this,kw).has(n))return ky(this,kw).get(n)}if(e.language&&ky(this,kw).has(e.language))return ky(this,kw).get(e.language);let n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return ky(this,kw).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,kw,{writable:!0,value:new Map})}};function kC(e,n){kx.register(e,n)}function kE(e){let n=e??AJ();return kx.getCalendar(n instanceof Intl.Locale?n:new Intl.Locale(n))}let kS={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function kD(e,n={}){let t=kp(e,AJ());if(t.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!kg(t.day)&&kg(t.month)&&(t=Object.assign({},nW(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},nW(t,"day"),{date:t.day}));let a=fB()().set(t).toDate();return kg(t.year)&&(n.year=!1),kg(t.month)&&(n.month=!1),kg(t.date)&&(n.day=!1),kM(a,n)}function kM(e,n){let t,a=n?.locale??AJ(),o=new Intl.Locale(a),{calendar:r,mode:i,time:s,day:l,month:c,year:p,noToday:u,numberingSystem:d}={...kS,...{noToday:"am"===o.language},...n},f={calendar:r??kE(o),year:p?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},m=fB()(e).isToday();if(m&&!u)t=(t=new Intl.RelativeTimeFormat(a,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(a)+t.slice(1);else{"en"===o.language&&(a="en-GB");let n=new Intl.DateTimeFormat(a,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&p&&l&&(n=n.map(kz("-"))),"wide"==i&&(n=n.map(kz(" — "))),"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||m&&"for today"===s)&&(t+=`, ${kO(e)}`),t}let kz=e=>(n,t,a)=>"literal"!==n.type||" "!==n.value||t<a.length-1&&"era"===a[t+1].type?n:{type:"literal",value:e};function kO(e){return e.toLocaleTimeString(AJ(),{hour:"2-digit",minute:"2-digit"})}function kP(e,n){return kM(e,{...n,time:!0})}function kT(e,n){let t=kE("string"==typeof n?new Intl.Locale(n):n);return t?b0(e,vA(t)):e}function kB(e,n){return new Intl.DurationFormat(AJ(),n).format(e)}function kI(e,n){if(null==e)return null;if("string"==typeof e){let t=kp(e,AJ());return t.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(t.day&&!t.month&&(t={...nW(t,"day"),...{month:t.day}}),t.month&&(t.month-=1),t.day&&(t={...nW(t,"day"),...{date:t.day}}),fB()(n).set(t))}return fB()(e)}let kN=["years","months","days","hours","minutes","seconds"],kj={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},kR={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function kF(e,n=fB()(),t){let a,o=fB()(n),r=kI(e,o);if(null==r)return null;if("string"==typeof t){let e=kj[t]??t;return{[e]:o.diff(r,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=t??{};if(void 0!==s||void 0!==l){let e,n=l?kj[l]??l:void 0;return e="auto"===s||void 0===s?function(e,n,t){let a=kN.indexOf(t);for(let o=0;o<kN.length;o++){let r=kN[o];if(n.diff(e,r)>0)return o<=a?r:t}return t}(r,o,n??"seconds"):kj[s]??s,function(e,n,t,a){let o=kN.indexOf(t),r=kN.indexOf(a),i=kN.slice(o,r+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}(r,o,e,n??e)}let c=(a=function(e){let n={...kR};if(e)for(let[t,a]of Object.entries(e))void 0!==a&&(n[kj[t]??t]=a);return n}(i),o.diff(r,"seconds")<a.seconds?"seconds":o.diff(r,"minutes")<a.minutes?"minutes":o.diff(r,"hours")<a.hours?"hours":o.diff(r,"days")<a.days?"days":o.diff(r,"months")<a.months?"months":"years");return{[c]:o.diff(r,c)}}let kL={style:"short",localeMatcher:"lookup"};function kW(e,n=fB()(),t){let a=kF(e,n,t);return null==a?null:kB(a,"object"==typeof t&&t.formatOptions?{...kL,...t.formatOptions}:kL)}let kG=(0,u8.createContext)(null);function kV(){let e=d1({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,n=(0,u8.useMemo)(()=>{let n=AJ();return e[n]&&(n=e[n]),n},[window.i18next.language]),t=(0,u8.useMemo)(()=>{let e=kE(n);return void 0!==e?vA(e):void 0},[n]),a=(0,u8.useMemo)(()=>new Intl.Locale(n,{calendar:t?.identifier}),[n,t]),o=(0,u8.useMemo)(()=>t?b0(b7(_t()),t):b7(_t()),[t]);return{calendar:t,intlLocale:a,today_:o}}let kU=new bN(1793,1,1);var kq={};function kH(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}kq={"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:"數字欄位"}};var kK=t(80137);function kY(e={}){let{locale:n}=bs();return(0,u8.useMemo)(()=>new(0,kK.K)(n,e),[n,e])}var kJ={};function kZ(e){var n;let t=(0,u8.useRef)(void 0),{value:a,textValue:o,minValue:r,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:p,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=_y((n=kJ)&&n.__esModule?n.default:n,"@react-aria/spinbutton");(0,u8.useEffect)(()=>()=>clearTimeout(t.current),[]);let y=(0,u8.useRef)(!1),b=()=>{y.current=!0},v=()=>{y.current=!1},$=""===o?g.format("Empty"):(o||`${a}`).replace("-","−");(0,u8.useEffect)(()=>{y.current&&(gE&&gE.clear("assertive"),gS($,"assertive"))},[$]);let A=ga(e=>{clearTimeout(t.current),null==p||p(),t.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===a||isNaN(a)||a<i)&&A(60)},e)}),k=ga(e=>{clearTimeout(t.current),null==d||d(),t.current=window.setTimeout(()=>{(void 0===r||isNaN(r)||void 0===a||isNaN(a)||a>r)&&k(60)},e)}),w=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=yl();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===a||isNaN(a)?void 0:a,"aria-valuetext":$,"aria-valuemin":r,"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":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{A(400),x(window,"contextmenu",w)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{k(400),x(window,"contextmenu",w)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v}}}kJ={"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:"空白"}};var kX=t(37120);function kQ(e,n,t){let a="+"===e?n+t:n-t;if(n%1!=0||t%1!=0){let o=n.toString().split("."),r=t.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,r[1]&&r[1].length||0));n=Math.round(n*i),t=Math.round(t*i),a=("+"===e?n+t:n-t)/i}return a}let k0=(0,u8.createContext)(null),k1=(0,u8.createContext)(null),k2=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,k0);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",{locale:i}=bs(),s=function(e){let{minValue:n,maxValue:t,step:a,formatOptions:o,value:r,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:p}=e;null===r&&(r=NaN),void 0===r||isNaN(r)||(r=void 0===a||isNaN(a)?Aa(r,n,t):Ar(r,n,t,a)),isNaN(i)||(i=void 0===a||isNaN(a)?Aa(i,n,t):Ar(i,n,t,a));let[u,d]=vM(r,isNaN(i)?NaN:i,s),[f,m]=(0,u8.useState)(()=>isNaN(u)?"":new(0,kK.K)(l,o).format(u)),h=(0,u8.useMemo)(()=>new(0,kX.d)(l,o),[l,o]),g=(0,u8.useMemo)(()=>h.getNumberingSystem(f),[h,f]),y=(0,u8.useMemo)(()=>new(0,kK.K)(l,{...o,numberingSystem:g}),[l,o,g]),b=(0,u8.useMemo)(()=>y.resolvedOptions(),[y]),v=(0,u8.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),$=$w({...e,value:u}),A=void 0===a||isNaN(a)?1:a;"percent"===b.style&&(void 0===a||isNaN(a))&&(A=.01);let[k,w]=(0,u8.useState)(u),[x,C]=(0,u8.useState)(l),[E,S]=(0,u8.useState)(o);Object.is(u,k)&&l===x&&o===E||(m(v(u)),w(u),C(l),S(o));let D=(0,u8.useMemo)(()=>h.parse(f),[h,f]),M=(e,a=0)=>{if(isNaN(D))return Ar(isNaN(a)?0:a,n,t,A);{let a=Ar(D,n,t,A);return"+"===e&&a>D||"-"===e&&a<D?a:Ar(kQ(e,D,A),n,t,A)}},z=(0,u8.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===t||isNaN(t)||Ar(D,n,t,A)>D||kQ("+",D,A)<=t),[c,p,n,t,A,D]),O=(0,u8.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===n||isNaN(n)||Ar(D,n,t,A)<D||kQ("-",D,A)>=n),[c,p,n,t,A,D]);return{...$,validate:e=>h.isValidPartialNumber(e,n,t),increment:()=>{let e=M("+",n);e===u&&m(v(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=t&&(d(Ar(t,n,t,A)),$.commitValidation())},decrement:()=>{let e=M("-",t);e===u&&m(v(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=n&&(d(n),$.commitValidation())},canIncrement:z,canDecrement:O,minValue:n,maxValue:t,numberValue:D,setNumberValue:d,setInputValue:m,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),m(void 0===r?"":v(u));return}isNaN(D)?m(v(u)):(e=void 0===a||isNaN(a)?Aa(D,n,t):Ar(D,n,t,a),d(e=h.parse(v(e))),m(v(void 0===r?e:u)))}}}({...e,locale:i,validationBehavior:r}),l=(0,u8.useRef)(null),[c,p]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:u,groupProps:d,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var a,o;let r,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:p,isRequired:u,minValue:d,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:v,onKeyDown:$,onKeyUp:A,description:k,errorMessage:w,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:M,numberValue:z,inputValue:O,commit:P,commitValidation:T}=n,B=_y((o=kq)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=gh(i),{focusProps:N}=yL({onBlur(){P()}}),j=kY(g),R=(0,u8.useMemo)(()=>j.resolvedOptions(),[j]),F=kY({...g,currencySign:void 0}),L=(0,u8.useMemo)(()=>isNaN(z)?"":F.format(z),[F,z]),{spinButtonProps:W,incrementButtonProps:G,decrementButtonProps:V}=kZ({isDisabled:c,isReadOnly:p,isRequired:u,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:M,value:z,textValue:L}),[U,q]=(0,u8.useState)(!1),{focusWithinProps:H}=yU({isDisabled:c,onFocusWithinChange:q});!function(e,n){let{onScroll:t,isDisabled:a}=e,o=(0,u8.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t&&t({deltaX:e.deltaX,deltaY:e.deltaY}))},[t]);_N(n,"wheel",a?void 0:o)}({onScroll:(0,u8.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!=(a=R.maximumFractionDigits)?a:0)>0,Y=void 0===n.minValue||isNaN(n.minValue)||n.minValue<0,J="numeric";gX()?Y?J="text":K&&(J="decimal"):g3()&&(Y?J="numeric":K&&(J="decimal"));let Z=gT(e),X=(0,u8.useCallback)(e=>{"Enter"===e.key?(P(),T()):e.continuePropagation()},[P,T]),{isInvalid:Q,validationErrors:ee,validationDetails:en}=n.displayValidation,{labelProps:et,inputProps:ea,descriptionProps:eo,errorMessageProps:er}=function(e,n,t){let a=ga(e=>{let a=t.current;if(!a)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteContentForward":o=a.selectionEnd===a.selectionStart?a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd+1):a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteContentBackward":o=a.selectionEnd===a.selectionStart?a.value.slice(0,a.selectionStart-1)+a.value.slice(a.selectionStart):a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=a.value.slice(a.selectionStart);break;default:null!=e.data&&(o=a.value.slice(0,a.selectionStart)+e.data+a.value.slice(a.selectionEnd))}null!=o&&n.validate(o)||e.preventDefault()});(0,u8.useEffect)(()=>{if(!kH()||!t.current)return;let e=t.current;return e.addEventListener("beforeinput",a,!1),()=>{e.removeEventListener("beforeinput",a,!1)}},[t,a]);let o=kH()?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:r,inputProps:i,descriptionProps:s,errorMessageProps:l,...c}=function(e,n){let{inputElementType:t="input",isDisabled:a=!1,isRequired:o=!1,isReadOnly:r=!1,type:i="text",validationBehavior:s="aria"}=e,[l,c]=vM(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=yV(e,n),u=$w({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:m}=u.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:b}=$d({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=gT(e,{labelable:!0}),$={type:i,pattern:e.pattern};return $u(n,l,c),$f(e,u,n),(0,u8.useEffect)(()=>{if(n.current instanceof gL(n.current).HTMLTextAreaElement){let e=n.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[n]),{labelProps:h,inputProps:gb(v,"input"===t?$:void 0,{disabled:a,readOnly:r,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(u7().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:m}}(e,t),p=(0,u8.useRef)(null);return{inputProps:gb(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:n,selectionEnd:a}=t.current;p.current={value:e,selectionStart:n,selectionEnd:a}},onCompositionEnd(){if(t.current&&!n.validate(t.current.value)){let{value:e,selectionStart:a,selectionEnd:o}=p.current;t.current.value=e,t.current.setSelectionRange(a,o),n.setInputValue(e)}}}),labelProps:r,descriptionProps:s,errorMessageProps:l,...c}}({...C,...Z,name:void 0,label:h,autoFocus:m,isDisabled:c,isReadOnly:p,isRequired:u,validate:void 0,[$k]:n,value:O,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:J,onChange:e=>{n.validate(e)&&n.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:v,onKeyDown:(0,u8.useMemo)(()=>gn(X,$),[X,$]),onKeyUp:A,description:k,errorMessage:w},n,t);$u(t,n.numberValue,n.setNumberValue);let ei=gb(W,N,ea,{role:null,"aria-roledescription":g0()?null:B.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||(r=null!=e.label?et.id:e["aria-labelledby"]);let ec=gh(),ep=gh(),eu=gb(G,{"aria-label":l||B.format("increase",{fieldLabel:el}).trim(),id:r&&!l?ec:null,"aria-labelledby":r&&!l?`${ec} ${r}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canIncrement,onPressStart:es}),ed=gb(V,{"aria-label":s||B.format("decrease",{fieldLabel:el}).trim(),id:r&&!s?ep:null,"aria-labelledby":r&&!s?`${ep} ${r}`: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:er,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:en}}({...gx(e),label:p,validationBehavior:r},s,l),v=g$({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),$=gT(e);return delete $.id,u7().createElement(gv,{values:[[k1,s],[vK,d],[vJ,{...f,ref:l}],[$7,{...u,ref:c}],[y1,{slots:{increment:m,decrement:h}}],[y5,{slots:{description:g,errorMessage:y}}],[$5,b]]},u7().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&&u7().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function k3(e,n){return Number.parseInt(kM(e,{calendar:n.calendar,locale:n.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let k5=(0,u8.forwardRef)(function(e,n){let{className:t}=e,a=(0,u8.useContext)(vj),o=(0,u8.useContext)(vR),r=a??o,i=(0,u8.useContext)(kG),s=_t(),l=kM(r.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),c=k3(r.visibleRange.start.toDate(s),i),p=r.maxValue?k3(r.maxValue.toDate(s),i):void 0,u=r.minValue?k3(r.minValue.toDate(s),i):void 0,d=(0,u8.useCallback)(e=>{r.setFocusedDate(r.focusedDate.cycle("year",e-r.focusedDate.year))},[]);return r&&(0,fQ.jsxs)("span",{ref:n,className:t,children:[(0,fQ.jsx)("span",{children:l}),(0,fQ.jsxs)(k2,{formatOptions:{useGrouping:!1},maxValue:p,minValue:u,onChange:d,value:c,children:[(0,fQ.jsx)(vZ,{}),(0,fQ.jsxs)(vY,{children:[(0,fQ.jsx)(y2,{slot:"increment",children:(0,fQ.jsx)(mj,{size:8})}),(0,fQ.jsx)(y2,{slot:"decrement",children:(0,fQ.jsx)(mB,{size:8})})]})]})]})});var k4=t(74782),k6={};k6.styleTagTransform=ma(),k6.setAttributes=f9(),k6.insert=f8().bind(null,"head"),k6.domAPI=f4(),k6.insertStyleElement=mn(),f3()(k4.A,k6);let k8=k4.A&&k4.A.locals?k4.A.locals:void 0;function k7({children:e}){let n=(0,u8.useContext)(AG),t=(0,u8.useContext)(AV),a=n??t,o=fk(()=>a?.close());return(0,fQ.jsx)($3,{className:k8.dialog,ref:o,children:e})}let k9=(0,u8.forwardRef)(function({variant:e,today_:n,minDate:t,maxDate:a},o){let r="range"===e;return(0,fQ.jsx)(Aj,{ref:o,className:k8.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,fQ.jsx)(k7,{children:(0,fQ.jsxs)(r?vL:vF,{...r?{minValue:t,maxValue:a,className:"cds--date-picker__calendar"}:{},children:[(0,fQ.jsxs)("header",{className:k8.header,children:[(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,k8.flatButtonMd),slot:"previous",children:(0,fQ.jsx)(mU,{size:16})}),(0,fQ.jsx)(k5,{className:k8.monthYear}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,k8.flatButtonMd),slot:"next",children:(0,fQ.jsx)(mq,{size:16})})]}),(0,fQ.jsx)(vG,{className:k8.calendarGrid,children:e=>(0,fQ.jsx)(vH,{className:f1()("cds--date-picker__day",{[k8.today]:0===n.compare(e)}),date:e},e.toString())})]})})})}),we=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)(AG),[a,o]=gk({slot:e.slot},n,$U),{locale:r}=bs(),i=$G({...a,locale:r,createCalendar:vA}),s=(0,u8.useRef)(null),{fieldProps:l,inputProps:c}=$y({...a,inputRef:s},i,o),p=(0,u8.useCallback)(()=>{i.isDisabled||t.toggle()},[]);return(0,fQ.jsxs)(gv,{values:[[$q,i],[vJ,{...c,ref:s}],[vK,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fQ.jsx)(vY,{...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,u8.cloneElement)(e.children(n),{key:t}))}),(0,fQ.jsx)(vZ,{})]})}),wn=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)(AG),a=(0,u8.useContext)(AV);return(t??a).isInvalid?(0,fQ.jsx)(hZ,{ref:n,size:16,...e}):(0,fQ.jsx)(mT,{ref:n,size:16,...e})});class wt{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,n){this.locale=e,this.dictionary=n}}let wa=new Map,wo=(0,u8.forwardRef)(function({segment:e,...n},t){let a=(0,u8.useContext)($q),o=ge(t),{segmentProps:r}=function(e,n,t){let a,o,r,i,s=(0,u8.useRef)(""),{locale:l,direction:c}=bs(),p=function(){var e;let{locale:n}=bs(),t=_g((e=vX)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,u8.useMemo)(()=>{try{return new Intl.DisplayNames(n,{type:"dateTimeField"})}catch{return new wt(n,t)}},[n,t])}(),{ariaLabel:u,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:m}=$m.get(n),h=e.isPlaceholder?"":e.text,g=(0,u8.useMemo)(()=>n.dateFormatter.resolvedOptions(),[n.dateFormatter]),y=_x({month:"long",timeZone:g.timeZone}),b=_x({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=b.format(n.dateValue));else{let e=y.format(n.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:v}=kZ({value:e.value,textValue:h,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,u8.useMemo)(()=>new(0,kX.d)(l,{maximumFractionDigits:0}),[l]),A=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!$.isValidPartialNumber(e.text)||n.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&n.clearSegment(e.type);else{let t=e.text.slice(0,-1),a=$.parse(t);0===(t=0===a?"":t).length||0===a?n.clearSegment(e.type):n.setSegment(e.type,a),s.current=t}},{startsWith:k}=(a=function(e){let{locale:n}=bs(),t=n+(e?Object.entries(e).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(wa.has(t))return wa.get(t);let a=new Intl.Collator(n,e);return wa.set(t,a),a}({usage:"search",sensitivity:"base"}),o=(0,u8.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===a.compare(e.slice(0,n.length),n)),[a]),r=(0,u8.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===a.compare(e.slice(-n.length),n)),[a]),i=(0,u8.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 r=e.slice(t,t+o);if(0===a.compare(n,r))return!0}return!1},[a]),(0,u8.useMemo)(()=>({startsWith:o,endsWith:r,contains:i}),[o,r,i])),w=_x({hour:"numeric",hour12:!0}),x=(0,u8.useMemo)(()=>{let e=new Date;return e.setHours(0),w.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[w]),C=(0,u8.useMemo)(()=>{let e=new Date;return e.setHours(12),w.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[w]),E=_x({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,u8.useMemo)(()=>{if("era"!==e.type)return[];let t=b0(new bN(1,1,1),n.calendar),a=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}(a.map(e=>e.formatted));if(o)for(let e of a)e.formatted=e.formatted.slice(o);return a},[E,n.calendar,e.type]),D=t=>{if(n.isDisabled||n.isReadOnly)return;let a=s.current+t;switch(e.type){case"dayPeriod":if(k(x,t))n.setSegment("dayPeriod",0);else if(k(C,t))n.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=S.find(e=>k(e.formatted,t));e&&(n.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!$.isValidPartialNumber(a))return;let o=$.parse(a),r=o,i=0===e.minValue;if("hour"===e.type&&n.dateFormatter.resolvedOptions().hour12){switch(n.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(r=$.parse(t));break;case"h12":i=!1,o>12&&(r=$.parse(t))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(r=$.parse(t));if(isNaN(o))return;let l=0!==r||i;l&&n.setSegment(e.type,r),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||a.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=a}}};_N((0,u8.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 M=(0,u8.useRef)("");_N(t,"beforeinput",a=>{if(t.current)switch(a.preventDefault(),a.inputType){case"deleteContentBackward":case"deleteContentForward":$.isValidPartialNumber(e.text)&&!n.isReadOnly&&A();break;case"insertCompositionText":M.current=t.current.textContent,t.current.textContent=t.current.textContent;break;default:null!=a.data&&D(a.data)}}),_N(t,"input",e=>{let{inputType:n,data:a}=e;"insertCompositionText"===n&&(t.current&&(t.current.textContent=M.current),null!=a&&(k(x,a)||k(C,a))&&D(a))}),gt(()=>{let e=t.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[t,m]);let z=g0()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,u8.useMemo)(()=>n.segments.find(e=>e.isEditable),[n.segments])||n.isInvalid||(f=void 0);let O=gh(),P=!n.isDisabled&&!n.isReadOnly&&e.isEditable,T="literal"===e.type?"":p.of(e.type),B=_P({"aria-label":`${T}${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:gb(v,B,{id:O,...z,"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:P,suppressContentEditableWarning:P,spellCheck:P?"false":void 0,autoCorrect:P?"off":void 0,[parseInt(u7().version,10)>=17?"enterKeyHint":"enterkeyhint"]:P?"next":void 0,inputMode:n.isDisabled||"dayPeriod"===e.type||"era"===e.type||!P?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&&_G(t.current,{containingElement:_V(t.current)});let e=window.getSelection();null==e||e.collapse(t.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,a,o),{focusProps:i,isFocused:s,isFocusVisible:l}=yq(),{hoverProps:c,isHovered:p}=yZ({...n,isDisabled:a.isDisabled||"literal"===e.type}),u=function(e){let{className:n,style:t,children:a,defaultClassName:o,defaultChildren:r,defaultStyle:i,values:s}=e;return(0,u8.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 a?a({...s,defaultChildren:r}):null==a?r:a,{className:e??o,style:l||i?{...i,...l}:void 0,children:c??r,"data-rac":""}},[n,t,a,o,r,i,s])}({...n,values:{...e,isReadOnly:!e.isEditable,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isHovered:p,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,u8.useCallback)(e=>{e.stopPropagation()},[]);return(0,fQ.jsx)("span",{...gb(gT(n),r,i,c),...u,ref:o,style:r.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":a.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":a.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})}),wr={short:!1,size:"md"},wi=(0,u8.forwardRef)(function(e,n){let{className:t,defaultValue:a,isDisabled:o,invalid:r,invalidText:i,isInvalid:s,label:l,labelText:c,light:p,maxDate:u,minDate:d,onChange:f,onChangeRaw:m,short:h,size:g,value:y,...b}={...wr,...e},{calendar:v,intlLocale:$,today_:A}=kV(),k=(0,u8.useId)(),w=!!(c??l),x=(0,u8.useMemo)(()=>AK(a,v),[a,v]),C=(0,u8.useMemo)(()=>AK(y,v,!0),[y,v]),E=(0,u8.useMemo)(()=>AK(u,v),[u,v]),S=(0,u8.useMemo)(()=>AK(d??kU,v),[d,v]),D=(0,u8.useMemo)(()=>r||s,[r,s]),M=(0,u8.useMemo)(()=>(m&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>f?.(AY(e)))),[m,f]);return(0,fQ.jsx)(AH,{locale:$.toString(),children:(0,fQ.jsx)("div",{className:f1()("cds--form-item",t),children:(0,fQ.jsx)(gv,{values:[[kG,$]],children:(0,fQ.jsxs)(AU,{className:f1()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":p}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===$.language||void 0,...b,onChange:M,children:[(0,fQ.jsxs)("div",{className:"cds--date-picker-container",children:[w&&(0,fQ.jsx)($9,{className:f1()("cds--label",{"cds--label--disabled":o}),htmlFor:k,children:c??l}),(0,fQ.jsxs)(vY,{className:k8.inputGroup,children:[(0,fQ.jsx)(we,{id:w?k:void 0,ref:n,className:f1()("cds--date-picker-input__wrapper",k8.inputWrapper,{[k8.inputWrapperSm]:"sm"===g,[k8.inputWrapperMd]:"md"===g||!g||0===g.length,[k8.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e}):(0,fQ.jsx)(u7().Fragment,{})}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,{[k8.flatButtonSm]:"sm"===g,[k8.flatButtonMd]:"md"===g||!g||0===g.length,[k8.flatButtonLg]:"lg"===g}),children:(0,fQ.jsx)(wn,{})})]}),(0,fQ.jsx)($4,{className:k8.invalidText,children:i})]}),(0,fQ.jsx)(k9,{variant:"single",today_:A})]})})})})}),ws=(0,u8.forwardRef)(function({className:e,defaultValue:n,invalid:t,invalidText:a,isDisabled:o,isInvalid:r,label:i,labelText:s,light:l,maxDate:c,minDate:p,onChange:u,onChangeRaw:d,size:f="md",value:m,...h},g){let{calendar:y,intlLocale:b,today_:v}=kV(),$=(0,u8.useId)(),A=!!(s??i),k=(0,u8.useMemo)(()=>{if(m)return{start:AK(m[0],y,!1),end:AK(m[1],y,!1)}},[m,y]),w=(0,u8.useMemo)(()=>{if(n)return{start:AK(n[0],y,!1),end:AK(n[1],y,!1)}},[n,y]),x=(0,u8.useMemo)(()=>AK(p??kU,y,!0),[p,y]),C=(0,u8.useMemo)(()=>AK(c,y,!0),[c,y]),E=(0,u8.useMemo)(()=>t||r,[t,r]),S=(0,u8.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?.([AY(e.start),AY(e.end)]))),[d,u]);return(0,fQ.jsx)(AH,{locale:b.toString(),children:(0,fQ.jsx)("div",{className:f1()("cds--form-item",e),children:(0,fQ.jsx)(gv,{values:[[kG,b]],children:(0,fQ.jsx)(Aq,{id:A?$:void 0,className:f1()("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:k,defaultValue:w,ref:g,isDisabled:o,...h,onChange:S,children:(0,fQ.jsxs)("div",{className:"cds--date-picker-container",children:[A&&(0,fQ.jsx)($9,{className:f1()("cds--label",{"cds--label--disabled":o}),htmlFor:$,children:s??i}),(0,fQ.jsxs)(vY,{className:k8.inputGroup,children:[(0,fQ.jsxs)("div",{className:f1()(k8.inputsWrapper,{[k8.inputsWrapperSm]:"sm"===f,[k8.inputsWrapperMd]:"md"===f||!f||0===f.length,[k8.inputsWrapperLg]:"lg"===f}),children:[(0,fQ.jsx)($K,{className:f1()("cds--date-picker-input__wrapper",k8.startInput,k8.dateInputWrapper),slot:"start",children:e=>(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e})}),(0,fQ.jsx)("div",{className:k8.separator,children:(0,fQ.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fQ.jsx)($K,{className:f1()("cds--date-picker-input__wrapper",k8.endInput,k8.dateInputWrapper),slot:"end",children:e=>(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e})})]}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,{[k8.flatButtonSm]:"sm"===f,[k8.flatButtonMd]:"md"===f||!f||0===f.length,[k8.flatButtonLg]:"lg"===f}),children:(0,fQ.jsx)(wn,{})})]}),(0,fQ.jsx)($4,{className:k8.invalidText,children:a}),(0,fQ.jsx)(k9,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var wl=t(89124),wc={};wc.styleTagTransform=ma(),wc.setAttributes=f9(),wc.insert=f8().bind(null,"head"),wc.domAPI=f4(),wc.insertStyleElement=mn(),f3()(wl.A,wc);let wp=wl.A&&wl.A.locals?wl.A.locals:void 0,wu=({diagnoses:e})=>{let{diagnosisTags:n}=d1({externalModuleName:"@openmrs/esm-styleguide"});return(0,fQ.jsx)("div",{className:wp.container,children:e.map(e=>{let{rank:t,uuid:a,display:o}=e,r=n[1===t?"primaryColor":"secondaryColor"];return(0,fQ.jsx)(mu.vwO,{type:r,children:o},a)})})};var wd=t(87770),wf={};wf.styleTagTransform=ma(),wf.setAttributes=f9(),wf.insert=f8().bind(null,"head"),wf.domAPI=f4(),wf.insertStyleElement=mn(),f3()(wd.A,wf);let wm=wd.A&&wd.A.locals?wd.A.locals:void 0,wh=({width:e="64",height:n="64"})=>(0,fQ.jsx)("svg",{width:e,height:n,viewBox:"0 0 64 64",children:(0,fQ.jsx)("use",{href:"#omrs-empty-data-illustration"})}),wg=e=>{let n="tablet"===fb(),t=e.launchForm;return(0,fQ.jsx)(mu.Wdr,{className:wm.layer,children:(0,fQ.jsxs)(mu.FAs,{className:wm.tile,children:[(0,fQ.jsx)("div",{className:n?wm.tabletHeading:wm.desktopHeading,children:(0,fQ.jsx)("h4",{children:e.headerTitle})}),(0,fQ.jsx)(wh,{}),(0,fQ.jsx)("p",{className:wm.content,children:r_("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fQ.jsx)("p",{className:wm.action,children:t&&(0,fQ.jsx)(mu.$nd,{onClick:()=>t(),kind:"ghost",size:n?"lg":"sm",children:r_("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var wy=t(88480),wb={};wb.styleTagTransform=ma(),wb.setAttributes=f9(),wb.insert=f8().bind(null,"head"),wb.domAPI=f4(),wb.insertStyleElement=mn(),f3()(wy.A,wb);let w_=wy.A&&wy.A.locals?wy.A.locals:void 0,wv=({error:e,headerTitle:n})=>{let t="tablet"===fb();return(0,fQ.jsx)(mu.Wdr,{children:(0,fQ.jsxs)(mu.FAs,{className:w_.tile,children:[(0,fQ.jsx)("div",{className:t?w_.tabletHeading:w_.desktopHeading,children:(0,fQ.jsx)("h4",{children:n})}),(0,fQ.jsxs)("p",{className:w_.errorMessage,children:[r_("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fQ.jsx)("p",{className:w_.errorCopy,children:r_("errorCopy")})]})})},w$=wv;var wA=t(15764),wk={};wk.styleTagTransform=ma(),wk.setAttributes=f9(),wk.insert=f8().bind(null,"head"),wk.domAPI=f4(),wk.insertStyleElement=mn(),f3()(wA.A,wk);let ww=wA.A&&wA.A.locals?wA.A.locals:void 0,wx=u7().forwardRef((e,n)=>{let{slotName:t,basePath:a,componentContext:o,state:r}=f$(),i=window.location??{pathname:""},s=dc(t??"");return e.isChildOfHeader&&t&&s.length>0?(0,fQ.jsxs)(mu.f8J,{"aria-label":r_("leftNavigation","Left navigation"),className:ww.leftNav,expanded:!0,isFixedNav:!0,ref:n,...e,children:[(0,fQ.jsx)(dd,{name:"global-nav-menu-slot"}),t?(0,fQ.jsx)(dq,{value:o,fallback:(0,fQ.jsx)(dd,{name:t,state:{basePath:a,currentPath:i,...r}}),children:(0,fQ.jsx)(u9.Provider,{value:o,children:(0,fQ.jsx)(dd,{name:t,state:{basePath:a,currentPath:i,...r}})})}):null]}):null});var wC=t(48500),wE={};wE.styleTagTransform=ma(),wE.setAttributes=f9(),wE.insert=f8().bind(null,"head"),wE.domAPI=f4(),wE.insertStyleElement=mn(),f3()(wC.A,wE);let wS=wC.A&&wC.A.locals?wC.A.locals:void 0,wD=({selectedLocationUuid:e,defaultLocationUuid:n,locationTag:t,locationsPerRequest:a=50,onChange:o})=>{let[r,i]=(0,u8.useState)(""),s=(0,u8.useId)(),{location:l}=function(e){let n=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:t,error:a,isLoading:o}=d6()(n,o_,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,u8.useMemo)(()=>({location:t?.data?.entry?t.data.entry[0]:null,error:n?a:null,isLoading:!!n&&o}),[t,o,a,n])}(n),{locations:c,isLoading:p,hasMore:u,loadingNewData:d,error:f,setPage:m}=function(e,n=0,t=""){let a=d5(t),{data:o,isLoading:r,isValidating:i,setSize:s,error:l}=fp()(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 r=`${og}/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 a&&""!==a&&i.append("name:contains",a),r+i.toString()},o_);return(0,u8.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:r,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}),[r,o,i,s,l])}(t,a,r),h=(0,u8.useMemo)(()=>l&&!r&&n?[l,...c.filter(({resource:e})=>e.id!==n)]:c??[],[l,c,n,r]),g=(0,u8.useCallback)(e=>{o(),i(e.trim())},[o]),y=fw((0,u8.useCallback)(()=>{!d&&u&&m(e=>e+1)},[d,u,m])),b=u?Math.max(0,Math.floor(h.length-a/2)):-1;return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)(mu.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:r_("searchForLocation"),id:s,placeholder:r_("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,fQ.jsx)("div",{className:wS.errorNotification,id:`${s}-error`,children:(0,fQ.jsx)(mu.jeF,{kind:"error",subtitle:r_("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:r_("error","Error")})}),(0,fQ.jsx)("div",{className:wS.searchResults,children:p?(0,fQ.jsx)("div",{className:wS.loadingContainer,children:Array.from({length:5}).map((e,n)=>(0,fQ.jsx)(mu.Psq,{className:wS.radioButtonSkeleton,role:"progressbar"},n))}):(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("div",{className:wS.locationResultsContainer,children:h.length>0?(0,fQ.jsx)(mu.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,n)=>(0,fQ.jsx)(mu.aaP,{className:wS.locationRadioButton,id:e.resource.id,labelText:(0,fQ.jsx)("span",{ref:n===b?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fQ.jsx)("div",{className:wS.emptyState,children:(0,fQ.jsx)("p",{className:wS.locationNotFound,children:r_("noResultsToDisplay")})})}),d&&(0,fQ.jsx)("div",{className:wS.loadingIcon,children:(0,fQ.jsx)(mu.OuH,{description:r_("loading")})})]})})]})},wM=V("modalState",{modalContainer:null,modalStack:[]}),wz=0;async function wO(e,n,t={}){let a=uV(n),o=null;if(e){if(!a)throw Error(`No modal named '${n}' has been registered.`);let{load:r}=a,i=await r(),s=wz++;o=ay({...i,name:`${n}-${s}`},{...t,domElement:e})}else T(`Failed to launch modal. Please notify your administrator. Modal name: ${n}`);return o}let wP=window.getComputedStyle(document.body).overflow;function wT({modalStack:e,modalContainer:n}){n&&(e.length?(n.style.visibility||(addEventListener("keydown",wI),document.body.style.overflow="hidden",n.style.visibility="unset"),e.forEach((t,a)=>{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,wO(e,t.modalName,t.props).then(a=>{t.parcel=a,t.state="MOUNTED",n.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":t.container&&(t.container.style.visibility=a?"hidden":"unset");break;case"TO_BE_DELETED":t.onClose(),t.parcel?.unmount?.(),t.container?.remove(),setTimeout(()=>{wM.setState({modalContainer:n,modalStack:e.filter(e=>e!==t)})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=wP,removeEventListener("keydown",wI)))}function wB(e){let n=wM.getState(),t=n.modalStack.map(n=>n===e?{...n,state:"TO_BE_DELETED"}:n);wM.setState({...n,modalStack:t})}function wI(e){"Escape"===e.key&&function(){let[e]=wM.getState().modalStack;e&&wB(e)}()}function wN(e){wM.subscribe(wT),wM.setState({...wM.getState(),modalContainer:e})}function wj(e,n={},t=()=>{}){let a=()=>{let e=wM.getState().modalStack.find(e=>e.onClose===t);e&&wB(e)};if(uV(e)){var o;let r,i;o={state:"NEW",onClose:t,modalName:e,props:{close:a,...n}},i=[o,...(r=wM.getState()).modalStack],wM.setState({...r,modalStack:i})}else T(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return a}let wR=({notification:e})=>{let{description:n,action:t,kind:a,critical:o,title:r,onAction:i}=e;return(0,fQ.jsx)(mu.kZS,{actionButtonLabel:t,kind:a||"info",lowContrast:o,subtitle:n,title:r||"",inline:!0,onActionButtonClick:i})},wF=({subject:e})=>{let[n,t]=(0,u8.useState)([]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(wR,{notification:e},e.id))})},wL=({notification:e})=>{let{actionButtonLabel:n,onActionButtonClick:t=()=>{},subtitle:a,kind:o,title:r,critical:i,progressActionLabel:s,id:l,...c}=e,[p,u]=(0,u8.useState)(n);return(0,fQ.jsx)(mu.kZS,{kind:o||"info",actionButtonLabel:p,ariaLabel:r_("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{t(),s&&u(s)},statusIconDescription:r_("actionableNotification","Actionable notification"),subtitle:a,title:r,lowContrast:i,inline:!0,...c})},wW=({subject:e})=>{let[n,t]=(0,u8.useState)([]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(wL,{notification:e},e.id))})};var wG=t(66401);let wV=new eo.Subject,wU=0,wq=new eo.Subject,wH=0;function wK(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(wF,{subject:wV}))}function wY(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&(n instanceof Error||!(0,wG.A)(n)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{wV.next({...e,id:wU++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function wJ(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(wW,{subject:wq}))}function wZ(e){var n;e&&("string"==typeof(n=e.actionButtonLabel)?n.trim().length>0:"object"==typeof n&&!(0,wG.A)(n))?setTimeout(()=>{wq.next({...e,id:wH++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let wX=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],wQ=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var w0=t(4112),w1={};w1.styleTagTransform=ma(),w1.setAttributes=f9(),w1.insert=f8().bind(null,"head"),w1.domAPI=f4(),w1.insertStyleElement=mn(),f3()(w0.A,w1);let w2=w0.A&&w0.A.locals?w0.A.locals:void 0,w3=({value:e,unit:n,label:t,interpretation:a,referenceRange:o,conceptUuid:r,variant:i="card",patientUuid:s})=>{let l=(0,u8.useId)(),{referenceRange:c,isLoading:p}=function(e,n){let t=null;e&&(t=n?`${oh}/conceptreferencerange/?patient=${n}&concept=${e}&v=full`:`${oh}/conceptreferencerange/?concept=${e}&v=full`);let{data:a,error:o,isLoading:r}=d6()(t,o_),i=a?.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:r}}(o||a?void 0:r,s),u=o??c,d=(0,u8.useMemo)(()=>{if(a)return a?"--"===a?"normal":wX.includes(a)?a.toLowerCase():wQ.includes(a)?a:"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"},[a,u,e,p])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,m="normal"!==d,h=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:r_("notAvailable","Not available"),$=f1()({[w2["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[w2["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[w2.low]:"low"===d,[w2.high]:"high"===d,[w2["off-scale-low"]]:"off_scale_low"===d,[w2["off-scale-high"]]:"off_scale_high"===d}),A=f1()({[w2.container]:!0,[w2.card]:!0,[w2["critical-value"]]:f,[w2["abnormal-value"]]:m&&!f}),k=f1()({[w2.cell]:!0,[$]:!0});return"cell"===i?(0,fQ.jsxs)("div",{className:k,children:[v,b&&n?` ${n}`:""]}):(0,fQ.jsxs)("section",{className:A,"data-testid":"numeric-observation-card",children:[t&&(0,fQ.jsxs)("div",{className:w2["label-container"],children:[(0,fQ.jsx)("span",{id:h,className:w2.label,children:t}),m&&(0,fQ.jsx)("span",{className:w2[d.replace("_","-")],title:r_("abnormalValue","Abnormal value")})]}),(0,fQ.jsxs)("div",{className:w2["value-container"],children:[(0,fQ.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:w2.value,children:v}),b&&n&&(0,fQ.jsx)("span",{id:y,className:w2.units,children:n})]})]})};var w5=t(292),w4={};w4.styleTagTransform=ma(),w4.setAttributes=f9(),w4.insert=f8().bind(null,"head"),w4.domAPI=f4(),w4.insertStyleElement=mn(),f3()(w5.A,w4);let w6=w5.A&&w5.A.locals?w5.A.locals:void 0,w8=e=>{if("children"in e){let{children:n,className:t,...a}=e;return(0,fQ.jsx)("div",{className:f1()(w6.pageHeader,t),...a,children:n})}{let{title:n,illustration:t,className:a,...o}=e;return(0,fQ.jsx)("div",{className:f1()(w6.pageHeader,a),...o,children:(0,fQ.jsx)(w7,{title:n,illustration:t})})}},w7=({title:e,illustration:n,className:t})=>{let[a,o]=(0,u8.useState)(null);return(0,u8.useEffect)(()=>{tc("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fQ.jsxs)("div",{className:f1()(w6.pageHeaderContent,t),children:[n,(0,fQ.jsxs)("div",{className:w6.pageLabels,children:[a?.implementationName&&(0,fQ.jsx)("p",{children:r_(a.implementationName)}),(0,fQ.jsx)("p",{className:w6.pageName,children:e})]})]})};var w9=t(72886),xe={};xe.styleTagTransform=ma(),xe.setAttributes=f9(),xe.insert=f8().bind(null,"head"),xe.domAPI=f4(),xe.insertStyleElement=mn(),f3()(w9.A,xe);let xn=w9.A&&w9.A.locals?w9.A.locals:void 0,xt=({totalItems:e,pageSize:n,onPageNumberChange:t,pageNumber:a,dashboardLinkUrl:o,currentItems:r,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=fE(n,e,a,r),c="tablet"===fb(),p=r_("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fQ.jsx)(fQ.Fragment,{children:e>0&&(0,fQ.jsxs)("div",{className:f1()({[xn.tablet]:c,[xn.desktop]:!c}),children:[(0,fQ.jsxs)("div",{children:[p,o&&(0,fQ.jsx)(de,{to:o,className:xn.configurableLink,children:i??r_("seeAll","See all")})]}),(0,fQ.jsx)(mu.dKS,{className:xn.pagination,page:a,pageSize:n,pageSizes:s,totalItems:e,onChange:t,pageRangeText:(e,n)=>r_("paginationOfPages","of {{count}} pages",{count:n}),size:c?"lg":"sm"})]})})};function xa(e){return xr(xs(e,"usual","official"))}function xo(e){return xa(e)}function xr(e){var n;let t;return e?e.text??(t=(n=e).given??[],(n.family?t.concat(n.family):t).join(" ")):""}function xi(e){return xr(e)}function xs(e,...n){for(let t of(0==n.length&&(n=["usual"]),n)){let n=e.name?.find(e=>{var n,a;return n=e,a=t,n.use?n.use===a:"usual"===a});if(n)return n}}function xl(e,n=fB()()){let t=fB()(n),a=kI(e,t);if(null==a)return null;let o=t.diff(a,"hours"),r=t.diff(a,"days"),i=t.diff(a,"weeks"),s=t.diff(a,"months"),l=t.diff(a,"years"),c={};if(o<2)c.minutes=t.diff(a,"minutes");else if(r<2)c.hours=o;else if(i<4)c.days=r;else if(l<1){let e=t.subtract(i,"weeks").diff(a,"days");c.weeks=i,c.days=e}else if(l<2){let e=t.subtract(s,"months").diff(a,"days");c.months=s,c.days=e}else if(l<18){let e=t.subtract(l,"year").diff(a,"months");c.years=l,c.months=e}else c.years=l;return c}function xc(e,n=fB()()){let t=xl(e,n);if(null==t)return null;let a={style:"short",localeMatcher:"lookup"};return"minutes"in t&&0===t.minutes&&(a.minutesDisplay="always"),kB(t,a)}var xp=t(46010),xu={};xu.styleTagTransform=ma(),xu.setAttributes=f9(),xu.insert=f8().bind(null,"head"),xu.domAPI=f4(),xu.insertStyleElement=mn(),f3()(xp.A,xu);let xd=xp.A&&xp.A.locals?xp.A.locals:void 0;function xf({showIdentifierLabel:e,type:n,value:t}){return(0,fQ.jsx)("span",{className:xd.primaryIdentifier,children:(0,fQ.jsxs)(mu.vwO,{className:xd.tag,type:"gray",children:[e&&n?.text&&(0,fQ.jsxs)("span",{className:xd.label,children:[n.text,": "]}),(0,fQ.jsx)("span",{className:xd.value,children:t})]})})}function xm({showIdentifierLabel:e,type:n,value:t}){return(0,fQ.jsxs)(mu.lRv,{className:xd.secondaryIdentifier,id:`patient-banner-identifier-${t}`,children:[e&&(0,fQ.jsxs)("span",{className:xd.label,children:[n?.text,": "]}),(0,fQ.jsx)("span",{className:xd.value,children:t})]})}function xh({identifiers:e,showIdentifierLabel:n}){let{excludePatientIdentifierCodeTypes:t}=d1(),{primaryIdentifierCode:a}=fM(),o=e?.filter(e=>{let n=e.type?.coding?.[0]?.code;return n&&!t?.uuids.includes(n)})??[];return(0,fQ.jsx)(fQ.Fragment,{children:o?.length?o.map(({value:e,type:t},r)=>(0,fQ.jsxs)(u7().Fragment,{children:[(0,fQ.jsx)("span",{className:xd.identifier,children:t?.coding?.[0]?.code===a?(0,fQ.jsx)(xf,{showIdentifierLabel:n,type:t,value:e}):(0,fQ.jsx)(xm,{showIdentifierLabel:n,type:t,value:e})}),r<o.length-1&&(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"})]},e)):""})}let xg={Female:m5,Male:m4,Other:m6,Unknown:m8},xy=({gender:e})=>{let n=xg[e];return n?(0,fQ.jsx)(n,{fill:"#525252"}):null},xb={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function x_({patient:e,renderedFrom:n}){var t;let a,o,r=xa(e),i=e?.gender&&(o=xb[a=(t=e.gender).toLowerCase()]??"Unknown",{displayText:r_(a,t),iconKey:o}),s=(0,u8.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:n}),[e.id,e,n]);return(0,fQ.jsxs)("div",{className:xd.patientInfo,children:[(0,fQ.jsx)("div",{className:f1()(xd.row,xd.patientNameRow),children:(0,fQ.jsxs)("div",{className:xd.flexRow,children:[(0,fQ.jsx)("span",{className:xd.patientName,children:r}),i&&(0,fQ.jsxs)("div",{className:xd.gender,children:[(0,fQ.jsx)(xy,{gender:i.iconKey}),(0,fQ.jsx)("span",{children:i.displayText})]}),(0,fQ.jsx)(dd,{className:xd.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fQ.jsxs)("div",{className:xd.demographics,children:[e.birthDate&&(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("span",{children:xc(e.birthDate)}),(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"}),(0,fQ.jsx)("span",{children:kD(e.birthDate,{time:!1})}),(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"})]}),(0,fQ.jsx)(xh,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fQ.jsx)(dd,{className:xd.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xv=t(81673),x$=t(9102),xA={};xA.styleTagTransform=ma(),xA.setAttributes=f9(),xA.insert=f8().bind(null,"head"),xA.domAPI=f4(),xA.insertStyleElement=mn(),f3()(x$.A,xA);let xk=x$.A&&x$.A.locals?x$.A.locals:void 0;function xw({patient:e,patientUuid:n,actionsSlotName:t,additionalActionsSlotState:a}){let[o,r]=(0,u8.useState)(!1),{extensions:i}=dp(t),s="tablet"===fb(),l=fk(()=>r(!1),o),c=(0,u8.useRef)(null),p=(0,u8.useRef)(null),u=(0,u8.useId)(),d=`patient-actions-menu-trigger-${u}`,f=`patient-actions-menu-${u}`,m=(0,u8.useCallback)(()=>r(e=>!e),[]),h=(0,u8.useCallback)(()=>{r(!1),c.current?.focus()},[]),g=(0,u8.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();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,a=Array.from(n).indexOf(t);if(-1===a)return void n["ArrowDown"===e.key?0:n.length-1]?.focus();let o=a+("ArrowDown"===e.key?1:-1),r=o<0?n.length-1:o>=n.length?0:o;n[r]?.focus()}},[h,o]);(0,u8.useEffect)(()=>{if(o&&p.current){let e=p.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,u8.useMemo)(()=>({patientUuid:n,patient:e,closeMenu:h,...a}),[n,e,h,a]);return 0===i.length?null:(0,fQ.jsx)("div",{className:xk.overflowMenuContainer,children:(0,fQ.jsxs)("div",{"data-overflow-menu":!0,className:f1()("cds--overflow-menu",mg.container),ref:l,children:[(0,fQ.jsxs)("button",{className:f1()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},mg.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:m,onKeyDown:g,ref:c,children:[(0,fQ.jsx)("span",{className:xk.actionsButtonText,children:r_("actions","Actions")})," ",(0,fQ.jsx)(xv.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fQ.jsxs)("div",{className:f1()("cds--overflow-menu-options","cds--overflow-menu--flip",mg.menu,{[mg.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:p,role:"menu",tabIndex:-1,children:[(0,fQ.jsx)("ul",{className:f1()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fQ.jsx)(dd,{name:t,state:y},t)}),(0,fQ.jsx)("span",{})]})]})})}var xx=t(16767),xC=t.n(xx);function xE(e){let{patientPhotoConceptUuid:n}=d1({externalModuleName:"@openmrs/esm-styleguide"}),t=n?`${oh}/obs?patient=${e}&concept=${n}&v=full`:null,{data:a,error:o,isLoading:r}=(0,dS.Ay)(e?t:null,o_),i=a?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:r}}let xS=({width:e=56,height:n=56,"aria-label":t})=>{let{t:a}=(0,dE.useTranslation)();return(0,fQ.jsxs)("svg",{"aria-label":t??a("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fQ.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fQ.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 xD=t(27268),xM={};xM.styleTagTransform=ma(),xM.setAttributes=f9(),xM.insert=f8().bind(null,"head"),xM.domAPI=f4(),xM.insertStyleElement=mn(),f3()(xD.A,xM);let xz=xD.A&&xD.A.locals?xD.A.locals:void 0;function xO({patientUuid:e,patientName:n,alt:t}){let{data:a,isLoading:o}=xE(e),[r,i]=(0,u8.useState)(null),[s,l]=(0,u8.useState)(!1),c=(0,u8.useMemo)(()=>xC().generate(e),[e]);(0,u8.useEffect)(()=>{if(a?.imageSrc){let e=new URL(a.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)},[a?.imageSrc]);let p=(0,u8.useMemo)(()=>t||(r?r_("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:n}):r_("patientAvatarAlt","Avatar for {{patientName}}",{patientName:n})),[t,r,n]);return o||s?(0,fQ.jsx)(mu.ryE,{className:xz.skeleton,"data-testid":"skeleton-icon"}):a?.imageSrc&&!r?(0,fQ.jsx)(xS,{"aria-label":r_("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:n})}):r?(0,fQ.jsx)("div",{"aria-label":p,children:(0,fQ.jsx)("img",{className:xz.avatar,src:r,alt:p,title:n})}):(0,fQ.jsx)("div",{"aria-label":p,children:(0,fQ.jsx)("div",{className:xz.avatar,title:n,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fQ.jsx)("span",{className:xz.initials,children:function(e,n=3){return e.split(/\s+/).filter(Boolean).slice(0,n).map(e=>e[0]).join("")}(n)})})})}var xP=t(1636),xT={};xT.styleTagTransform=ma(),xT.setAttributes=f9(),xT.insert=f8().bind(null,"head"),xT.domAPI=f4(),xT.insertStyleElement=mn(),f3()(xP.A,xT);let xB=xP.A&&xP.A.locals?xP.A.locals:void 0,xI=["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"],xN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-appointments",pictogramProps:e})})),xj=xN,xR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),xF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),xL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),xW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),xG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),xV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),xU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),xq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-facility",pictogramProps:e})})),xH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),xK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),xY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),xJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),xZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),xX=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),xQ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),x0=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-patients",pictogramProps:e})})),x1=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),x2=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),x3=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),x5=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-registration",pictogramProps:e})})),x4=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),x6=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),x8=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-transfer",pictogramProps:e})})),x7=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-triage",pictogramProps:e})})),x9=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Ce=xq,Cn=x0,Ct=(0,u8.memo)((0,u8.forwardRef)(function({pictogram:e,fallback:n,...t},a){let o=(0,u8.useRef)(document.getElementById(e));return(0,u8.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,fQ.jsx)(dq,{value:o.current,fallback:n,children:(0,fQ.jsx)(Ca,{ref:a,pictogram:e,pictogramProps:t})})})),Ca=(0,u8.memo)((0,u8.forwardRef)(function({pictogram:e,pictogramProps:n},t){let{className:a,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,fQ.jsx)("svg",{ref:t,className:f1()(xB.pictogram,a),height:o,width:o,children:(0,fQ.jsx)("use",{href:`#${e}`})})})),Co=({children:e})=>"tablet"===fb()?(0,fQ.jsx)(mu.Wdr,{children:e}):(0,fQ.jsx)(fQ.Fragment,{children:e});var Cr=t(85925),Ci={};Ci.styleTagTransform=ma(),Ci.setAttributes=f9(),Ci.insert=f8().bind(null,"head"),Ci.domAPI=f4(),Ci.insertStyleElement=mn(),f3()(Cr.A,Ci);let Cs=Cr.A&&Cr.A.locals?Cr.A.locals:void 0,Cl=({snackbar:e,closeSnackbar:n})=>{let{actionButtonLabel:t="",kind:a="success",onActionButtonClick:o=()=>{},isLowContrast:r="error"!==a,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==a,title:p,id:u,...d}=e,[f,m]=(0,u8.useState)(t),[h,g]=(0,u8.useState)(!0),[y,b]=(0,u8.useState)(!1),v=(0,u8.useCallback)(()=>{setTimeout(n,250)},[n]),$=(0,u8.useCallback)(()=>{b(!0),v()},[v]);return(0,u8.useEffect)(()=>{if(c){let e=setTimeout($,l);return()=>clearTimeout(e)}},[l,c,$]),(0,u8.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fQ.jsx)(mu.kZS,{actionButtonLabel:f,"aria-label":r_("closeSnackbar","Close snackbar"),className:f1()(Cs.slideIn,{[Cs.animated]:h,[Cs.slideOut]:y}),kind:a,lowContrast:r,onActionButtonClick:()=>{o(),$(),i&&m(i)},onClose:v,statusIconDescription:r_("snackbarNotification","Snackbar notification"),subtitle:s,title:p,...d})},Cc=({subject:e})=>{let[n,t]=(0,u8.useState)([]),a=(0,u8.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(Cl,{snackbar:e,closeSnackbar:()=>a(e)},e.id))})},Cp=new eo.Subject,Cu=0;function Cd(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(Cc,{subject:Cp}))}function Cf(e){var n;e&&"string"==typeof(n=e.title)&&n.trim().length>0?setTimeout(()=>{Cp.next({...e,id:Cu++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Cm=({toast:e,closeToast:n})=>{let{description:t,kind:a,critical:o,title:r,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,u8.useCallback)(()=>{s(),n()},[n,s]);return(0,fQ.jsx)("div",{children:(0,fQ.jsx)(mu.kZS,{actionButtonLabel:i,kind:a||"info",lowContrast:o,subtitle:t,title:r||"",onActionButtonClick:l,onClose:n})})},Ch=({subject:e})=>{let[n,t]=(0,u8.useState)([]),a=(0,u8.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(Cm,{toast:e,closeToast:()=>a(e)},e.id))})},Cg=new eo.Subject,Cy=0;function Cb(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(Ch,{subject:Cg}))}function C_(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&!(0,wG.A)(n))?setTimeout(()=>{Cg.next({...e,id:Cy++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Cv(e,n=!1){if(n)return!0;let t=Cx[e];return!t||!t()}function C$(e,n){let t=CP.getState()?.workspaceGroup,a=t?.name;a&&e===a&&CN(()=>{let a=CW(e);a&&(a.setState({},!0),a.subscribe(()=>{})()),"function"==typeof t?.cleanup&&t.cleanup(),CP.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof n&&n()},a?e=>e.currentWorkspaceGroup===a:()=>!0)}function CA(e,n){let{name:t,additionalProps:a}=n;uJ(t);let o=()=>{CM(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Ck(t,a),closeWorkspaceGroup:!1})};Cv(e.name)?o():CR("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Ck(e,n){let t=uJ(e),a=CP.getState().workspaceGroup;if(a&&!a.members?.includes(e))return void C$(a.name,()=>{Ck(e,n)});let o=CP.getState().workspaceGroup?.name,r={...t,title:CF(t,n),closeWorkspace:(n={})=>CM(e,n),closeWorkspaceWithSavedChanges:n=>CM(e,{ignoreChanges:!0,...n}),promptBeforeClosing:n=>{var t,a;return t=e,a=n,void(Cx[t]=a)},setTitle:(n,t)=>{r.title=n,r.titleNode=t,CP.setState(n=>{let t=n.openWorkspaces.map(n=>n.name===e?r:n);return{...n,openWorkspaces:t}})},currentWorkspaceGroup:o,additionalProps:n??{}};function i(e,n){CP.setState(t=>{let a=[e,...n??t.openWorkspaces],o=CI(e);return{...t,openWorkspaces:a,workspaceWindowState:o}})}o&&CW(o,n);let s=CP.getState().openWorkspaces,l=s.findIndex(n=>n.name===e),c=s.find(e=>e.type==r.type);if(0===s.length)i(r);else if(s[0].canHide||0===l)if(l>=0){let n=s[l];i({...n,additionalProps:r.additionalProps,...n.title===CF(n,n.additionalProps)&&{title:CF(r,r.additionalProps)}},s.filter(n=>n.name!=e))}else c?(i(c,CP.getState().openWorkspaces.filter(e=>e.type!=r.type)),CA(c,{name:e,additionalProps:n})):i(r);else CA(s[0],{name:e,additionalProps:n})}function Cw({targetUrl:e,contextKey:n,workspaceName:t,additionalProps:a}){Cz(n),Ck(t,a),or({to:e})}let Cx={};function CC(e,n){Cx[e]=n}function CE(e){return Cx[e]}function CS(){let e=CP.getState();CP.setState({...e,prompt:null})}let CD={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function CM(e,n={}){n={...CD,...n};let t=()=>{let t=CP.getState();t.openWorkspaces.find(n=>n.name===e);let a=t.openWorkspaces.filter(n=>n.name!=e),o=CP.getState().workspaceGroup?.name;o&&n.closeWorkspaceGroup&&C$(o),Cx[e]=()=>!1,CP.setState(e=>({...e,prompt:null,openWorkspaces:a,workspaceWindowState:CI(a?.[0])})),n?.onWorkspaceClose?.()};return Cv(e,n?.ignoreChanges)?(t(),!0):(CR("closing-workspace",t,uJ(e).title??e),!1)}function Cz(e){CP.getState().context!=e&&CP.setState({context:e,openWorkspaces:[],prompt:null})}let CO={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},CP=V("workspace",CO);function CT(){return CP}function CB(e){let n=CP.getState();CP.setState({...n,workspaceWindowState:e})}function CI(e){return e?.preferredWindowSize??"normal"}function CN(e=()=>{},n=()=>!0){let t=CP.getState().openWorkspaces.filter(n).every(({name:e})=>Cv(e)),a=()=>{CL(),e?.()};t?a():CR("closing-all-workspaces",a)}function Cj(){let{workspaceWindowState:e,openWorkspaces:n,prompt:t,workspaceGroup:a}=dr(CP);return(0,u8.useMemo)(()=>({active:n.length>0,prompt:t,workspaceWindowState:e,workspaces:n,workspaceGroup:a}),[n,e,t,a])}function CR(e,n=()=>{},t=""){let a;switch(e){case"closing-workspace":a={title:r_("unsavedChangesTitleText","Unsaved changes"),body:r_("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{n?.()},confirmText:r_("discard","Discard")};break;case"closing-all-workspaces":{let e=CP.getState().openWorkspaces.filter(({name:e})=>!Cv(e)).map(({title:e},n)=>`${n+1}. ${e}`);a={title:r_("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:r_("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:r_("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":a={title:r_("unsavedChangesTitleText","Unsaved changes"),body:r_("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:t}),onConfirm:()=>{CP.setState(e=>({...e,prompt:null})),n?.()},confirmText:r_("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),n?.();return}CP.setState(e=>({...e,prompt:a}))}function CF(e,n){return n?.workspaceTitle??e.title}function CL(){CP.setState(CO)}function CW(e,n={}){if(!e||"default"===e)return;let t=q(e,{});return n&&t.setState(e=>({...e,...n})),t}var CG=t(81341),CV={};CV.styleTagTransform=ma(),CV.setAttributes=f9(),CV.insert=f8().bind(null,"head"),CV.domAPI=f4(),CV.insertStyleElement=mn(),f3()(CG.A,CV);let CU=CG.A&&CG.A.locals?CG.A.locals:void 0;function Cq({getIcon:e,formOpenInTheBackground:n,tagContent:t}){return(0,fQ.jsxs)(fQ.Fragment,{children:[e({size:16}),n?(0,fQ.jsx)("span",{className:CU.interruptedTag,children:"!"}):(0,fQ.jsx)("span",{className:CU.countTag,children:t})]})}let CH=({getIcon:e,label:n,iconDescription:t,handler:a,type:o,tagContent:r})=>{let i=fb(),{workspaces:s,workspaceWindowState:l}=Cj(),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,fQ.jsxs)(mu.$nd,{className:f1()(CU.container,{[CU.active]:p}),iconDescription:t,kind:"ghost",onClick:a,role:"button",tabIndex:0,size:"md",children:[(0,fQ.jsx)("span",{className:CU.elementContainer,children:(0,fQ.jsx)(Cq,{formOpenInTheBackground:u,getIcon:e,tagContent:r})}),(0,fQ.jsx)("span",{children:n})]}):(0,fQ.jsx)(mu.K0,{align:"left","aria-label":t,className:f1()(CU.container,{[CU.active]:p}),enterDelayMs:300,kind:"ghost",label:n,onClick:a,size:"md",children:(0,fQ.jsx)("div",{className:CU.elementContainer,children:(0,fQ.jsx)(Cq,{formOpenInTheBackground:u,getIcon:e,tagContent:r})})})};var CK=t(54535),CY=t(40771),CJ=t(24898),CZ=/[\\^$.*+?()[\]{}|]/g,CX=RegExp(CZ.source);let CQ=function(e){return(e=(0,CJ.A)(e))&&CX.test(e)?e.replace(CZ,"\\$&"):e};var C0=t(37781),C1={};C1.styleTagTransform=ma(),C1.setAttributes=f9(),C1.insert=f8().bind(null,"head"),C1.domAPI=f4(),C1.insertStyleElement=mn(),f3()(C0.A,C1);let C2=C0.A&&C0.A.locals?C0.A.locals:void 0;function C3({contextKey:e}){let{prompt:n}=Cj();return(0,u8.useEffect)(()=>{RegExp(`/${CQ(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,u8.useEffect)(()=>(Cz(e),()=>{Cz(null)}),[e]),(0,u8.useEffect)(()=>{let n=n=>{let{detail:{cancelNavigation:t,newUrl:a}}=n,o=RegExp(`/${CQ(e)}(/|$)`),r=new URL(a),i=o.test(r.pathname),s=CP.getState().openWorkspaces.every(({name:e})=>Cv(e));i||(s?CL():(t?.(),CN(()=>{or({to:a})})))};return window.addEventListener("single-spa:before-routing-event",n),()=>{window.removeEventListener("single-spa:before-routing-event",n)}},[]),null!=n?(0,fQ.jsxs)(mu.KXP,{open:!0,onClose:CS,children:[(0,fQ.jsx)(mu.rQ0,{title:n.title}),(0,fQ.jsx)(mu.cwr,{children:(0,fQ.jsx)("p",{className:C2.messageBody,children:n.body})}),(0,fQ.jsxs)(mu.jlY,{children:[(0,fQ.jsx)(mu.$nd,{kind:"secondary",onClick:CS,children:n.cancelText??r_("cancel")}),(0,fQ.jsx)(mu.$nd,{kind:"danger",onClick:n.onConfirm,children:n.confirmText??r_("confirm")})]})]}):null}function C5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C4(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C5(Object(t),!0).forEach(function(n){C8(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function C6(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function C8(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C7(e){return(C7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C9(e,n){return(C9=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function Ee(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var En=function(e){var n=u8.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&&C9(i,n);var t,a,o,r=(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=C7(i);e=t?Reflect.construct(n,arguments,C7(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 Ee(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),C8(Ee(n=r.call(this,e)),"handleRef",function(e){n.el=e}),C8(Ee(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}))}),C8(Ee(n),"getParcelProps",function(){var e=C4(C4({},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 a=[{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,C4({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 d_&&d_.Consumer?u8.createElement(d_.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):null;var n=d_&&d_.Consumer?u8.createElement(d_.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):void 0;return u8.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},n)}}],C6(i.prototype,a),o&&C6(i,o),i}();C8(En,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Et=t(57515),Ea={};Ea.styleTagTransform=ma(),Ea.setAttributes=f9(),Ea.insert=f8().bind(null,"head"),Ea.domAPI=f4(),Ea.insertStyleElement=mn(),f3()(Et.A,Ea);let Eo=Et.A&&Et.A.locals?Et.A.locals:void 0;function Er({workspace:e,additionalPropsFromPage:n}){let[t,a]=(0,u8.useState)(),o=function(e){let[n,t]=(0,u8.useState)({}),[a,o]=(0,u8.useState)(e);return(0,u8.useEffect)(()=>{a!==e&&o(e)},[e]),(0,u8.useEffect)(()=>{let e,n=CW(a);return n&&(t(n.getState()),e=n.subscribe(t)),()=>{n&&e?.()}},[a]),n}(e.currentWorkspaceGroup);(0,u8.useEffect)(()=>{let n=!0;return e.load().then(e=>{n&&a(e)}),()=>{n=!1}},[e]);let r=(0,u8.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...n,...o,...e.additionalProps},[e,n,o]);return t?(0,fQ.jsx)(En,{config:t,mountParcel:ay,...r},e.name):(0,fQ.jsx)(mu.OuH,{className:Eo.loader,description:`${r_("loading","Loading")} ...`})}var Ei=t(24646),Es={};Es.styleTagTransform=ma(),Es.setAttributes=f9(),Es.insert=f8().bind(null,"head"),Es.domAPI=f4(),Es.insertStyleElement=mn(),f3()(Ei.A,Es);let El=Ei.A&&Ei.A.locals?Ei.A.locals:void 0;function Ec({isWithinWorkspace:e,name:n,actionMenuProps:t={}}){let[a,o]=(0,u8.useState)(!1),r=(0,u8.useRef)(window.innerHeight),{featureName:i}=(0,u8.useContext)(u9),s=fb();(0,u8.useEffect)(()=>{let e=()=>{o(!f_(s)&&r.current>window.innerHeight),r.current!=window.innerHeight&&(r.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[r]);let l=`action-menu-${n&&"default"!=n?n:i}-items-slot`;return(0,fQ.jsx)("aside",{className:f1()(El.sideRail,{[El.withinWorkspace]:e,[El.sideRailHidden]:a,[El.sideRailVisible]:!a}),children:(0,fQ.jsx)("div",{className:El.container,children:(0,fQ.jsx)(dd,{className:El.chartExtensions,name:l,state:t})})})}function Ep({contextKey:e,overlay:n,showSiderailAndBottomNav:t,additionalWorkspaceProps:a,actionMenuProps:o}){let r=fb(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=Cj(),c=l?.name,p=i[0],u="hidden"===s||null==p,d=p?.width??(n?"wider":"narrow"),f=(0,u8.useMemo)(()=>t||c&&!u,[c,u,t]);return dX(!u&&!f_(r)),(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)("div",{className:t?Eo.workspaceContainerWithActionMenu:Eo.workspaceContainerWithoutActionMenu,children:[(0,fQ.jsx)("aside",{className:f1()(n?Eo.workspaceOverlayOuterContainer:Eo.workspaceWindowSpacer,{[Eo.hiddenRelative]:u,[Eo.narrowWorkspace]:"narrow"===d,[Eo.widerWorkspace]:"wider"===d,[Eo.extraWideWorkspace]:"extra-wide"===d}),children:(0,fQ.jsx)("div",{className:f1()(Eo.workspaceFixedContainer,{[Eo.maximizedWindow]:"maximized"===s,[Eo.hiddenFixed]:u}),children:i.map((e,n)=>(0,fQ.jsx)("div",{className:f1()(Eo.workspaceInnerContainer,{[Eo.hiddenExtraWorkspace]:0!==n}),children:(0,fQ.jsx)(u8.Suspense,{fallback:null,children:(0,fQ.jsx)(dE.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fQ.jsx)(Eu,{workspaceInstance:e,additionalWorkspaceProps:a})})})},`workspace-container-${e?e.name:`empty-${n}`}`))})}),(0,fQ.jsx)(C3,{contextKey:e})]}),f&&(0,fQ.jsx)(Ec,{name:c,isWithinWorkspace:!t,actionMenuProps:o})]})}function Eu({workspaceInstance:e,additionalWorkspaceProps:n}){let{t}=(0,dE.useTranslation)(),a=fb(),{workspaceWindowState:o,workspaceGroup:r}=Cj(),i=r?.name,s="maximized"===o;(0,u8.useEffect)(()=>{let n=t(e.title);n!==e.title&&e.setTitle(n)},[e.title,t,e.setTitle]);let{featureName:l}=(0,u8.useContext)(u9),c=(0,u8.useCallback)(()=>{CB(s?"normal":"maximized")},[s]),{canHide:p=!1,canMaximize:u=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,u8.useMemo)(()=>e??{},[e]),m=(0,u8.useMemo)(()=>({...n,...e?.additionalProps}),[n,e]);return e&&(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)(mu.Y9Y,{"aria-label":r_("workspaceHeader","Workspace Header"),className:Eo.header,children:[!f_(a)&&!p&&(0,fQ.jsx)(mu.dJ2,{"aria-label":r_("close","Close"),renderMenuIcon:(0,fQ.jsx)(mD,{}),onClick:()=>f()}),(0,fQ.jsx)(mu.bCw,{prefix:"",children:e.titleNode??t(e.title)}),(0,fQ.jsx)("div",{className:Eo.overlayHeaderSpacer}),(0,fQ.jsxs)(mu.wdv,{className:Eo.headerButtons,children:[(0,fQ.jsx)(dd,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,fQ.jsx)(dd,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,fQ.jsx)(dd,{name:`workspace-header-${l}-slot`,state:m}),f_(a)&&(0,fQ.jsxs)(fQ.Fragment,{children:[(u||s)&&(0,fQ.jsx)(mu.V8d,{"aria-label":s?r_("minimize","Minimize"):r_("maximize","Maximize"),onClick:c,children:s?(0,fQ.jsx)(CK.Xj,{}):(0,fQ.jsx)(CK.hz,{})}),p&&!i?(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide","Hide"),onClick:()=>CB("hidden"),children:(0,fQ.jsx)(mM,{})}):(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close","Close"),onClick:()=>f?.(),children:(0,fQ.jsx)(mK,{})})]}),"tablet"===a&&p&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close","Close"),onClick:()=>f?.(),children:(0,fQ.jsx)(CY.d3,{})})]})]}),(0,fQ.jsx)("div",{className:f1()(Eo.workspaceContent,{[Eo.marginWorkspaceContent]:!!d}),children:(0,fQ.jsx)(Er,{workspace:e,additionalPropsFromPage:n},e.name)})]})}async function Ed(e,n){let{openedGroup:t}=uX.getState();if(t){if(t.groupName===e&&Eh(t.props,n))return!0;else if(!await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return uX.setState(t=>({...t,openedGroup:{groupName:e,props:n},openedWindows:[]})),!0}async function Ef(e){let{openedGroup:n,openedWindows:t}=uX.getState();if(n){if(t.length>0&&!(e||await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;uX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Em(e,n=null,t=null,a=null){let o=uX.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let r=uQ(e);if(!r)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=r,l=u0(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${r.name} is not registered to a workspace group`);let c=u1(e);if(i&&(i.groupName!==l.name||!Eh(i.props,a)))return!!await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:a},openedWindows:[{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let a=o.openedWindows[c],r=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:p}=a;if(Eh(a.props,t)){let u=p.find(n=>n.workspaceName===e);return u&&Eh(u.props,n)?((i||c!==o.openedWindows.length-1)&&uX.setState(Ey.restoreWindow(o,s)),!0):!!await Eg({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??r},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[E$(e,n)],props:a?.props??t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Eg({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(uX.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Eg({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:r.name})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Eh(e,n){return null==e||null==n||N(e,n)}function Eg(e){function n(e,n){let t=[];for(let a=e.openedWorkspaces.length-1;a>=0;a--){let o=e.openedWorkspaces[a];if(o.hasUnsavedChanges&&t.push(o),n&&o.workspaceName===n)break}return t}let{openedWindows:t,workspaceTitleByWorkspaceName:a}=uX.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=t.flatMap(e=>n(e));break;case"CLOSE_WINDOW":{let a=t.find(n=>n.windowName===e.windowName);if(!a)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(a);break}case"CLOSE_WORKSPACE":{let a=t.find(n=>n.windowName===e.windowName);if(!a)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(a,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=wj("workspace2-close-prompt",{onConfirm:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)},affectedWorkspaceTitles:o.map(e=>a[e.workspaceName])})})}let Ey={setWindowMaximized(e,n,t){let a=e.openedWindows.findIndex(e=>e.windowName===n),o=[...e.openedWindows],r={...o[a],maximized:t};return o[a]=r,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,n){let t=e.openedWindows.findIndex(e=>e.windowName===n),a=e.openedWindows[t],o=[...e.openedWindows.filter((e,n)=>n!==t),a];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,n){let t=u1(n);if(t<0)return e;let a={...e.openedWindows[t]},o=a.openedWorkspaces.findIndex(e=>e.workspaceName===n),r=[...e.openedWindows];a.openedWorkspaces=a.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===a.openedWorkspaces.length){let n=t===e.openedWindows.length-1;r.splice(t,1),n&&r.length>0&&(i=!1)}else r[t]=a;return{...e,openedWindows:r,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,n,t,a){let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);let r=e.registeredWorkspacesByName[n];if(!r)throw Error(`No workspace named "${n}" registered`);if(r.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,E$(t,a)]}:e)}},setHasUnsavedChanges(e,n,t){let a=u1(n);if(a<0)return e;let o={...e.openedWindows[a]},r=o.openedWorkspaces.findIndex(e=>e.workspaceName===n);if(r<0)return e;o.openedWorkspaces[r]={...o.openedWorkspaces[r],hasUnsavedChanges:t};let i=[...e.openedWindows];return i[a]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,n,t){let a={...e.workspaceTitleByWorkspaceName};return null===t?delete a[n]:a[n]=t,{...e,workspaceTitleByWorkspaceName:a}}};function Eb(){return di(uX,Ey)}let E_=()=>(0,u8.useContext)(d_),Ev=()=>Object.keys(uX.getState().registeredWorkspacesByName);function E$(e,n){return{workspaceName:e,props:n??{},hasUnsavedChanges:!1,uuid:pn()}}var EA=t(81179),Ek={};Ek.styleTagTransform=ma(),Ek.setAttributes=f9(),Ek.insert=f8().bind(null,"head"),Ek.domAPI=f4(),Ek.insertStyleElement=mn(),f3()(EA.A,Ek);let Ew=EA.A&&EA.A.locals?EA.A.locals:void 0,Ex=({title:e,children:n,hasUnsavedChanges:t=!1})=>{let a=fb(),{setWindowMaximized:o,hideWindow:r,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:p,registeredWorkspacesByName:u,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:m}=Eb(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:b}=E_(),v=u1(h),$=s[v],A=$?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,u8.useEffect)(()=>{A?.hasUnsavedChanges!=t&&i(h,t??!1)},[A?.hasUnsavedChanges,t,h,i]),(0,u8.useEffect)(()=>{d[h]!==e&&f(h,e)},[d,h,e,f]),v<0||null==l||null==A)return null;let k=c[l.groupName];if(!k)throw Error(`Cannot find registered workspace group ${l.groupName}`);let w=u[h].window,x=p[w];if(!x)throw Error(`Cannot find registered workspace window ${w}`);let{icon:C,canMaximize:E}=x,S="closable"===k.persistence,D=!!C&&!S,{maximized:M}=$,z=x?.width??"narrow",O=Object.values(p).some(e=>e.group===l.groupName&&void 0!==e.icon),P=v<s.length-1||m;return(0,fQ.jsxs)("div",{className:f1()(Ew.workspaceOuterContainer,{[Ew.narrowWorkspace]:"narrow"===z,[Ew.widerWorkspace]:"wider"===z,[Ew.extraWideWorkspace]:"extra-wide"===z,[Ew.isActionMenuOpened]:O}),children:[(0,fQ.jsx)("div",{className:f1()(Ew.workspaceSpacer,{[Ew.hidden]:P})}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceMiddleContainer,{[Ew.maximized]:M,[Ew.hidden]:P,[Ew.isRootWorkspace]:g,[Ew.showActionMenu]:b}),children:(0,fQ.jsxs)("div",{className:f1()(Ew.workspaceInnerContainer,{[Ew.maximized]:M,[Ew.hidden]:P,[Ew.isRootWorkspace]:g}),children:[(0,fQ.jsxs)(mu.Y9Y,{"aria-label":r_("workspaceHeader"),className:Ew.header,children:[(0,fQ.jsx)(mu.bCw,{prefix:"",children:e}),(0,fQ.jsx)("div",{className:Ew.overlayHeaderSpacer}),(0,fQ.jsx)(mu.wdv,{className:Ew.headerButtons,children:f_(a)?(0,fQ.jsxs)(fQ.Fragment,{children:[(E||M)&&(0,fQ.jsx)(mu.V8d,{"aria-label":M?r_("minimize"):r_("maximize"),onClick:()=>o(w,!M),children:M?(0,fQ.jsx)(CK.Xj,{}):(0,fQ.jsx)(CK.hz,{})}),D&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide"),onClick:()=>r(),children:(0,fQ.jsx)(mM,{})}),!S&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close"),onClick:()=>y({closeWindow:!0}),children:(0,fQ.jsx)(mK,{})})]}):(0,fQ.jsxs)(fQ.Fragment,{children:[D&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide"),onClick:()=>r(),children:(0,fQ.jsx)(CY.d3,{})}),(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close"),onClick:()=>{S?Ef():y({closeWindow:!0})},children:(0,fQ.jsx)(mK,{})})]})})]}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceContent),children:n})]})})]})};var EC=t(97810),EE={};EE.styleTagTransform=ma(),EE.setAttributes=f9(),EE.insert=f8().bind(null,"head"),EE.domAPI=f4(),EE.insertStyleElement=mn(),f3()(EC.A,EE);let ES=EC.A&&EC.A.locals?EC.A.locals:void 0;function ED({getIcon:e,hasUnsavedChanges:n,tagContent:t}){return(0,fQ.jsxs)(fQ.Fragment,{children:[e({size:16}),n?(0,fQ.jsx)("span",{className:ES.interruptedTag,children:"!"}):(0,fQ.jsx)("span",{className:ES.countTag,children:t})]})}let EM=({icon:e,label:n,tagContent:t,workspaceToLaunch:a,onBeforeWorkspaceLaunch:o})=>{let r=fb(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=Eb(),{extension:p}=(0,u8.useContext)(u9),u=i.findIndex(e=>e.windowName===p?.extensionId),d=i[u],f=null!=d,m=f&&(u<i.length-1||c),h=f&&!m,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)m?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:n,windowProps:t}=a;Em(e,n,t)}};return"tablet"===r||"phone"===r?(0,fQ.jsxs)(mu.$nd,{className:f1()(ES.container,{[ES.active]:f&&!h,[ES.focused]:h}),iconDescription:n,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fQ.jsx)("span",{className:ES.elementContainer,children:(0,fQ.jsx)(ED,{hasUnsavedChanges:g,getIcon:e,tagContent:t})}),(0,fQ.jsx)("span",{children:n})]}):(0,fQ.jsx)(mu.K0,{align:"left","aria-label":n,className:f1()(ES.container,{[ES.active]:f&&!h,[ES.focused]:h}),enterDelayMs:300,kind:"ghost",label:n,onClick:y,size:"md",children:(0,fQ.jsx)("div",{className:ES.elementContainer,children:(0,fQ.jsx)(ED,{hasUnsavedChanges:g,getIcon:e,tagContent:t})})})};function Ez({showContactDetails:e,toggleContactDetails:n,className:t}){return(0,fQ.jsx)(mu.$nd,{className:t,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:e?mH:mV,children:e?r_("showLess","Show less"):r_("showMore","Show more")})}var EO=t(95804),EP={};EP.styleTagTransform=ma(),EP.setAttributes=f9(),EP.insert=f8().bind(null,"head"),EP.domAPI=f4(),EP.insertStyleElement=mn(),f3()(EO.A,EP);let ET=EO.A&&EO.A.locals?EO.A.locals:void 0,EB=({patientUuid:e})=>{let{cohorts:n=[],isLoading:t}=function(e){let n=e?`${oh}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:t,isLoading:a}=(0,dS.Ay)(n,o_),o=t?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,u8.useMemo)(()=>({cohorts:o,isLoading:a}),[a,o])}(e);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)("p",{className:ET.heading,children:[r_("patientLists","Patient Lists")," (",n?.length??0,")"]}),t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsxs)("ul",{children:[(()=>{if(n?.length>0){let e=n.sort((e,n)=>kk(e?.startDate).getTime()-kk(n?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fQ.jsx)("li",{children:(0,fQ.jsx)(de,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fQ.jsx)("li",{children:"--"})})(),n.length>3&&(0,fQ.jsx)("li",{className:ET.link,children:(0,fQ.jsx)(de,{to:`${window.spaBase}/home/patient-lists`,children:r_("seeMoreLists","See {{count}} more lists",{count:n?.length-3})})})]})]})},EI=({patientId:e})=>{let{patient:n,isLoading:t}=fD(e),a=n?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("address","Address")}),(0,fQ.jsx)("ul",{children:a?Object.entries(a).filter(([e])=>"id"!==e&&"use"!==e).map(([e,n])=>"extension"===e?a.extension?.[0]?.extension?.map((n,t)=>(0,fQ.jsxs)("li",{children:[r_(o(n.url),o(n.url)),": ",n.valueString]},`address-${e}-${t}`)):(0,fQ.jsxs)("li",{children:[r_(e,e),": ",n]},`address-${e}`)):(0,fQ.jsx)("li",{children:"--"})})]})},EN=({patientUuid:e})=>{let{isLoading:n,contactAttributes:t}=(e=>{let{contactAttributeTypes:n=[]}=d1({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:t,error:a,isLoading:o}=(e=>{let{data:n,error:t,isLoading:a}=d6()(`${oh}/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)))`,o_);return{isLoading:a,attributes:n?.data.person.attributes??[],error:t}})(e);return{contactAttributes:(0,u8.useMemo)(()=>t.filter(({attributeType:e})=>n?.some(n=>e.uuid===n)),[t,n]),isLoading:o,error:a}})(e),a=(0,u8.useMemo)(()=>t?[...t?.map(e=>[e.attributeType.display?r_(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[t]);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("contactDetails","Contact Details")}),n?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsx)("ul",{children:a.length?a.map(([e,n],t)=>(0,fQ.jsxs)("li",{children:[e,": ",n]},`${e}-${n}-${t}`)):(0,fQ.jsx)("li",{children:"--"})})]})},Ej=({patientId:e})=>{let{data:n,isLoading:t}=function(e){let n=`${oh}/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:a,isLoading:o,isValidating:r}=(0,dS.Ay)(e?n:null,o_),i=t?.data?.results?.length?function(e,n){let t=[];for(let a of n)e===a.personA.uuid?t.push({uuid:`${a.uuid}`,display:a.personB.display,relativeAge:a.personB.age,relativeUuid:a.personB.uuid,relationshipType:a.relationshipType.bIsToA}):t.push({uuid:`${a.uuid}`,display:a.personA.display,relativeAge:a.personA.age,relativeUuid:a.personA.uuid,relationshipType:a.relationshipType.aIsToB});return t}(e,t.data.results):null;return{data:t?i:null,error:a,isLoading:o,isValidating:r}}(e);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("relationships","Relationships")}),t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsx)("ul",{children:n&&n.length>0?(0,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsxs)("li",{className:ET.relationship,children:[(0,fQ.jsx)("div",{children:(0,fQ.jsx)(de,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fQ.jsx)("div",{children:e.relationshipType}),(0,fQ.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?r_("yearAbbreviation","yr"):r_("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fQ.jsx)("li",{children:"--"})})]})};function ER({patientId:e,deceased:n}){return(0,fQ.jsxs)("div",{className:f1()(ET.contactDetails,{[ET.deceased]:n}),children:[(0,fQ.jsxs)("div",{className:ET.row,children:[(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EI,{patientId:e})}),(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EN,{patientUuid:e})})]}),(0,fQ.jsxs)("div",{className:ET.row,children:[(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(Ej,{patientId:e})}),(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EB,{patientUuid:e})})]})]})}function EF(e){let n=document.querySelector("template#loading-spinner");if(n){let t=n.content.cloneNode(!0),a=Array.prototype.map.call(t.childNodes,e=>e);return e.appendChild(t),()=>a.forEach(e=>e.remove())}return()=>{}}var EL=t(24039),EW={};EW.styleTagTransform=ma(),EW.setAttributes=f9(),EW.insert=f8().bind(null,"head"),EW.domAPI=f4(),EW.insertStyleElement=mn(),f3()(EL.A,EW);let EG=EL.A&&EL.A.locals?EL.A.locals:void 0;function EV({workspaceGroup:e,groupProps:n}){let t=fb(),{persistence:a}=e;return(0,fQ.jsx)("aside",{className:EG.sideRail,children:(0,fQ.jsxs)("div",{className:EG.container,children:["closable"==a&&f_(t)&&(0,fQ.jsx)(mu.K0,{align:"left",onClick:()=>Ef(),label:r_("close"),kind:"ghost",children:(0,fQ.jsx)(mK,{})}),(0,fQ.jsx)(u9.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fQ.jsx)(dd,{className:EG.container,name:e.name,state:{groupProps:n}})})]})})}let EU=({lifeCycle:e,openedWorkspace:n,openedWindow:t,isRootWorkspace:a,isLeafWorkspace:o,showActionMenu:r})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Eb(),c=(0,u8.useMemo)(()=>n&&{closeWorkspace:async(e={})=>{let{closeWindow:a=!1,discardUnsavedChanges:o=!1}=e;return a?!!(o||await Eg({reason:"CLOSE_WINDOW",explicit:!0,windowName:t.windowName}))&&(s(t.openedWorkspaces[0].workspaceName),!0):!!(o||await Eg({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:n.workspaceName}))&&(s(n.workspaceName),!0)},launchChildWorkspace:async(e,a)=>{let o=n.workspaceName,{openedWorkspaces:r}=t,i=r.findIndex(e=>e.workspaceName===o);-1===i||i!==r.length-1&&r.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Eg({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:r[i+1].workspaceName})||l(o,e,a||{})},workspaceName:n.workspaceName,workspaceProps:n.props,windowProps:t.props,groupProps:i&&i.props?i.props:null,isRootWorkspace:a,isLeafWorkspace:o,windowName:t.windowName,showActionMenu:r},[n,s,i,t]);if(!e){let{registeredWorkspacesByName:e}=uX.getState(),t=e[n.workspaceName],o=t&&t.window?t.window:void 0,{registeredWindowsByName:s}=uX.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,fQ.jsxs)("div",{className:f1()(Ew.workspaceOuterContainer,{[Ew.narrowWorkspace]:"narrow"===c,[Ew.widerWorkspace]:"wider"===c,[Ew.extraWideWorkspace]:"extra-wide"===c,[Ew.isActionMenuOpened]:p}),children:[(0,fQ.jsx)("div",{className:Ew.workspaceSpacer}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceMiddleContainer,{[Ew.isRootWorkspace]:a,[Ew.showActionMenu]:r}),children:(0,fQ.jsx)("div",{className:f1()(Ew.workspaceInnerContainer,{[Ew.isRootWorkspace]:a}),children:(0,fQ.jsx)(mu.OuH,{className:Ew.loader,description:`${r_("loading")} ...`})})})]})}return(0,fQ.jsx)(En,{config:e,mountParcel:ay,...c},n.workspaceName)},Eq=({openedWindow:e,showActionMenu:n})=>{let{openedWorkspaces:t}=e,[a,o]=(0,u8.useState)({}),{registeredWorkspacesByName:r}=uX.getState();return(0,u8.useEffect)(()=>{let e=!1;return Promise.all(t.map(async e=>{let{moduleName:n,component:t}=r[e.workspaceName];return[e.uuid,await fW(n,t)]})).then(n=>{e||o(Object.fromEntries(n))}),()=>{e=!0}},[t]),(0,fQ.jsx)(fQ.Fragment,{children:t.map((o,r)=>(0,fQ.jsx)(EU,{openedWorkspace:o,openedWindow:e,lifeCycle:a[o.uuid],isRootWorkspace:0===r,isLeafWorkspace:r===t.length-1,showActionMenu:n},o.uuid))})};var EH=t(297),EK={};EK.styleTagTransform=ma(),EK.setAttributes=f9(),EK.insert=f8().bind(null,"head"),EK.domAPI=f4(),EK.insertStyleElement=mn(),f3()(EH.A,EK);let EY=EH.A&&EH.A.locals?EH.A.locals:void 0;function EJ(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(EZ,{}))}function EZ(){let{openedGroup:e,openedWindows:n,registeredGroupsByName:t,registeredWindowsByName:a}=Eb();if((0,u8.useEffect)(()=>px("before-page-changed",n=>{let{newPage:a,cancelNavigation:o,oldUrl:r,newUrl:i}=n;if(!e)return;if(a)return void o(Ef().then(e=>!e));let s=t[e.groupName],l=s?.scopePattern;l&&function(e,n,t){try{let a=new URL(n,window.location.origin).pathname,o=new URL(t,window.location.origin).pathname,r=new RegExp(e),i=a.match(r),s=o.match(r);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,r,i)&&o(Ef().then(e=>!e))}),[e,t]),!e)return null;let o=t[e.groupName],r=n.some(e=>e.maximized),{name:i}=o,s=Object.values(a).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,fQ.jsxs)("div",{className:f1()(EY.workspaceWindowsAndMenuContainer,{[EY.overlay]:o.overlay,[EY.hasMaximizedWindow]:r}),children:[(0,fQ.jsx)("div",{className:EY.workspaceWindowsContainer,children:n.map(e=>(0,fQ.jsx)(Eq,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,fQ.jsx)(EV,{workspaceGroup:o,groupProps:e.props})]})}function EX(e){if("string"!=typeof e||0===e.trim().length)return;let n=e.replaceAll("_","-");try{return new Intl.Locale(n).toString()}catch{return}}function EQ(e,n,t){if(null==e)return t;let a=EX(e);if(!a)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),t;let o=[];for(let e of n){let n=EX(e);if(!n){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:n,original:e})}let r=a;for(;r;){let e=o.find(e=>e.canonical===r);if(e)return e.original;let n=r+"-",t=o.find(e=>e.canonical.startsWith(n));if(t)return t.original;if("ht"===r){r="fr-HT";continue}let a=r.lastIndexOf("-");if(-1===a)break;let i=(r=r.slice(0,a)).lastIndexOf("-");-1!==i&&r.length-i==2&&(r=r.slice(0,i))}return t}function E0(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function E1(e){return!!e&&e.constructor===Object}var E2=t(99589);function E3(e){let[n,t,a]=e.split(".");return`${n}.${t}.${a}`}function E5(e,n){let t=function(e){let n=e.indexOf("-");if(n>=0){let t=E3(e.slice(0,n)),a=e.slice(n+1);return`${t}-${a}`}return E3(e)}(n);return E2.satisfies(t,e,{includePrerelease:!0})}async function E4(e,n={}){let t,{shouldRetry:a,getDelay:o,onError:r}=n;a=a??(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 E6(o(i)),await e()}catch(e){r?.(e,i),t=e}while(a(i++));throw t}async function E6(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)}(a,n)}}let fY={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 fJ(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fY.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fY.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fY.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fY.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fY.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fY.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fY.SMALL_DESKTOP_MAX)}let fZ=!1;function fX(){fZ||(window.addEventListener("resize",fJ),fJ(),fZ=!0)}var fQ=t(74848),f0=t(46942),f1=t.n(f0),f2=t(85072),f3=t.n(f2),f5=t(97825),f4=t.n(f5),f6=t(77659),f8=t.n(f6),f7=t(55056),f9=t.n(f7),me=t(10540),mn=t.n(me),mt=t(41113),ma=t.n(mt),mo=t(76097),mr={};mr.styleTagTransform=ma(),mr.setAttributes=f9(),mr.insert=f8().bind(null,"head"),mr.domAPI=f4(),mr.insertStyleElement=mn(),f3()(mo.A,mr);let mi=mo.A&&mo.A.locals?mo.A.locals:void 0;function ms({title:e,children:n}){let t="tablet"===fb();return(0,fQ.jsxs)("div",{className:f1()({[mi.tabletHeader]:t,[mi.desktopHeader]:!t}),children:[(0,fQ.jsx)("h4",{children:e}),n]})}let ml=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],mc={primaryColor:{_type:nG.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tP.oneOf(ml)]},secondaryColor:{_type:nG.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tP.oneOf(ml)]}},mp={"Brand color #1":{_default:"#005d5d",_type:nG.String},"Brand color #2":{_default:"#004144",_type:nG.String},"Brand color #3":{_default:"#007d79",_type:nG.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nG.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nG.UUID}}},implementationName:{_type:nG.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nG.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:nG.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:[tP.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:nG.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:nG.String}},diagnosisTags:mc};var mu=t(78068);let md={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},mf=e=>(0,fQ.jsx)(mu.GGC,{translateWithId:(e,n)=>{let t=md[e];return t?r_(t,e,n):e},...e});var mm=t(99158),mh={};mh.styleTagTransform=ma(),mh.setAttributes=f9(),mh.insert=f8().bind(null,"head"),mh.domAPI=f4(),mh.insertStyleElement=mn(),f3()(mm.A,mh);let mg=mm.A&&mm.A.locals?mm.A.locals:void 0,my=(0,u8.createContext)(null);function mb(){let e=(0,u8.useContext)(my);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function m_({menuTitle:e,children:n}){let[t,a]=u7().useState(!1),o=fk(()=>a(!1),t),r="tablet"===fb(),i=(0,u8.useCallback)(()=>a(e=>!e),[]),s=(0,u8.useRef)(null),l=(0,u8.useRef)(null),c=(0,u8.useId)(),p=`custom-overflow-menu-trigger-${c}`,u=`custom-overflow-menu-${c}`,d=(0,u8.useCallback)(()=>{a(!1),s.current?.focus()},[]),f=(0,u8.useMemo)(()=>({closeMenu:d}),[d]),m=(0,u8.useCallback)(e=>{"Escape"===e.key&&t&&(e.stopPropagation(),d())},[d,t]),h=u8.Children.toArray(n);(0,u8.useEffect)(()=>{if(t&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[t]);let g=(0,u8.useCallback)(({currentIndex:e,direction:n})=>{let t=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let a=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(t).indexOf(a);if(-1===o)return void t[n>0?0:t.length-1]?.focus();let r=o+n,i=r<0?t.length-1:r>=t.length?0:r;t[i]?.focus()},[]),y=h.map((e,n)=>(0,u8.isValidElement)(e)?(0,u8.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:n}):e);return(0,fQ.jsxs)("div",{"data-overflow-menu":!0,className:f1()("cds--overflow-menu",mg.container),ref:o,children:[(0,fQ.jsx)("button",{className:f1()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":t},mg.overflowMenuButton),"aria-controls":u,"aria-expanded":t,"aria-haspopup":"true",id:p,onClick:i,onKeyDown:m,ref:s,children:e}),(0,fQ.jsxs)("div",{className:f1()("cds--overflow-menu-options","cds--overflow-menu--flip",mg.menu,{[mg.show]:t}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:u,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,fQ.jsx)("ul",{className:f1()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":r}),children:(0,fQ.jsx)(my.Provider,{value:f,children:y})}),(0,fQ.jsx)("span",{})]})]})}function mv(e){let n=(0,u8.useContext)(my);return(0,fQ.jsx)(mu.XSD,{...e,closeMenu:n?.closeMenu})}var m$=t(57283),mA=t(30424),mk={};mk.styleTagTransform=ma(),mk.setAttributes=f9(),mk.insert=f8().bind(null,"head"),mk.domAPI=f4(),mk.insertStyleElement=mn(),f3()(mA.A,mk);let mw=mA.A&&mA.A.locals?mA.A.locals:void 0,mx=["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"],mC=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-activity",iconProps:e})})),mE=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-add",iconProps:e})})),mS=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-down",iconProps:e})})),mD=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-left",iconProps:e})})),mM=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-right",iconProps:e})})),mz=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-arrow-up",iconProps:e})})),mO=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-baby",iconProps:e})})),mP=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),mT=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-calendar",iconProps:e})})),mB=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-down",iconProps:e})})),mI=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-left",iconProps:e})})),mN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-right",iconProps:e})})),mj=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-caret-up",iconProps:e})})),mR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chart-average",iconProps:e})})),mF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chart-line",iconProps:e})})),mL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-checkmark-filled",iconProps:e})})),mW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-checkmark-outline",iconProps:e})})),mG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chemistry",iconProps:e})})),mV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-down",iconProps:e})})),mU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-left",iconProps:e})})),mq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-right",iconProps:e})})),mH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-chevron-up",iconProps:e})})),mK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close",iconProps:e})})),mY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close-filled",iconProps:e})})),mJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-close-outline",iconProps:e})})),mZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-document",iconProps:e})})),mX=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-document-attachment",iconProps:e})})),mQ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-download",iconProps:e})})),m0=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-drug-order",iconProps:e})})),m1=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-edit",iconProps:e})})),m2=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-event-schedule",iconProps:e})})),m3=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-events",iconProps:e})})),m5=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-female",iconProps:e})})),m4=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-male",iconProps:e})})),m6=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-other",iconProps:e})})),m8=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-gender-unknown",iconProps:e})})),m7=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-generic-order-type",iconProps:e})})),m9=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-group",iconProps:e})})),he=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-group-access",iconProps:e})})),hn=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-hospital-bed",iconProps:e})})),ht=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-image-medical",iconProps:e})})),ha=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information",iconProps:e})})),ho=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information-filled",iconProps:e})})),hr=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-information-square",iconProps:e})})),hi=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-inventory-management",iconProps:e})})),hs=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-lab-order",iconProps:e})})),hl=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-list-checked",iconProps:e})})),hc=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-location",iconProps:e})})),hp=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-material-order",iconProps:e})})),hu=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-maximize",iconProps:e})})),hd=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-medication",iconProps:e})})),hf=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-message-queue",iconProps:e})})),hm=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-microscope",iconProps:e})})),hh=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-money",iconProps:e})})),hg=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-mother",iconProps:e})})),hy=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-movement",iconProps:e})})),hb=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h_=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),hv=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-password",iconProps:e})})),h$=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-pedestrian-family",iconProps:e})})),hA=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-pen",iconProps:e})})),hk=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-printer",iconProps:e})})),hw=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-procedure-order",iconProps:e})})),hx=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-programs",iconProps:e})})),hC=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-referral-order",iconProps:e})})),hE=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-renew",iconProps:e})})),hS=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-report",iconProps:e})})),hD=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-reset",iconProps:e})})),hM=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-save",iconProps:e})})),hz=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-search",iconProps:e})})),hO=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-settings",iconProps:e})})),hP=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-switcher",iconProps:e})})),hT=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-shopping-cart",iconProps:e})})),hB=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),hI=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-sticky-note-add",iconProps:e})})),hN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-syringe",iconProps:e})})),hj=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-table-of-contents",iconProps:e})})),hR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-table",iconProps:e})})),hF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-time",iconProps:e})})),hL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-tools",iconProps:e})})),hW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-translate",iconProps:e})})),hG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-trash-can",iconProps:e})})),hV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-tree-view--alt",iconProps:e})})),hU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-avatar",iconProps:e})})),hq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-follow",iconProps:e})})),hH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user-xray",iconProps:e})})),hK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-user",iconProps:e})})),hY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-view-off",iconProps:e})})),hJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-view",iconProps:e})})),hZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(h5,{ref:n,icon:"omrs-icon-warning",iconProps:e})})),hX=hZ,hQ=mX,h0=hl,h1=ht,h2=hB,h3=(0,u8.memo)((0,u8.forwardRef)(function({icon:e,fallback:n,...t},a){let o=(0,u8.useRef)(e?document.getElementById(e):void 0);return(0,u8.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,fQ.jsx)(dq,{value:o.current,fallback:n,children:(0,fQ.jsx)(h5,{ref:a,icon:e,iconProps:t})})})),h5=(0,u8.memo)((0,u8.forwardRef)(function({icon:e,iconProps:n},t){let{className:a,fill:o,size:r}=Object.assign({},{fill:"currentColor",size:20},n);(r<=0||r>72)&&(console.error(`Invalid size '${r}' specified for ${e}. Defaulting to 20.`),r=20);let i=(0,u8.useRef)(null);return(0,u8.useImperativeHandle)(t,()=>i.current),(0,u8.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fQ.jsx)("svg",{ref:i,className:f1()("omrs-icon",mw.icon,a),height:r,width:r,viewBox:"0 0 16 16",children:(0,fQ.jsx)("use",{href:`#${e}`})})}));var h4=t(28852),h6={};h6.styleTagTransform=ma(),h6.setAttributes=f9(),h6.insert=f8().bind(null,"head"),h6.domAPI=f4(),h6.insertStyleElement=mn(),f3()(h4.A,h6);let h8=h4.A&&h4.A.locals?h4.A.locals:void 0,h7=({path:e,title:n,basePath:t,icon:a})=>{let{t:o}=(0,dE.useTranslation)(),r=(0,m$.useLocation)(),i=(0,u8.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)),a=(r.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return a.some((e,n)=>t.every((e,t)=>a[n+t]===e))},[r.pathname,e]);return(0,fQ.jsx)("div",{children:(0,fQ.jsx)(de,{className:f1()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${t}/${encodeURIComponent(e)}`,children:(0,fQ.jsxs)("span",{className:h8.menu,children:[(0,fQ.jsx)(h3,{icon:a,className:h8.icon,size:16}),(0,fQ.jsx)("span",{children:o(n)})]})})},e)};function h9(e){return function({basePath:n}){return(0,fQ.jsx)(m$.BrowserRouter,{children:(0,fQ.jsx)(h7,{basePath:n,...e})})}}function ge(e){let n=(0,u8.useRef)(null);return(0,u8.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function gn(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let gt="u">typeof document?u7().useLayoutEffect:()=>{};function ga(e){let n=(0,u8.useRef)(null);return gt(()=>{n.current=e},[e]),(0,u8.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let go={prefix:String(Math.round(1e10*Math.random())),current:0},gr=u7().createContext(go),gi=u7().createContext(!1),gs=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),gl="function"==typeof u7().useId?function(e){let n=u7().useId(),[t]=(0,u8.useState)(gd()),a=t?"react-aria":`react-aria${go.prefix}`;return e||`${a}-${n}`}:function(e){let n=(0,u8.useContext)(gr),t=function(e=!1){let n=(0,u8.useContext)(gr),t=(0,u8.useRef)(null);if(null===t.current&&!e){var a,o;let e=null==(o=u7().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(a=o.ReactCurrentOwner)?void 0:a.current;if(e){let t=gs.get(e);null==t?gs.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,gs.delete(e))}t.current=++n.current}return t.current}(!!e),a=`react-aria${n.prefix}`;return e||`${a}-${t}`};function gc(){return!1}function gp(){return!0}function gu(e){return()=>{}}function gd(){return"function"==typeof u7().useSyncExternalStore?u7().useSyncExternalStore(gu,gc,gp):(0,u8.useContext)(gi)}let gf=!!("u">typeof window&&window.document&&window.document.createElement),gm=new Map;function gh(e){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(null),o=gl(n),r=(0,u8.useRef)(null);if(s&&s.register(r,o),gf){let e=gm.get(o);e&&!e.includes(a)?e.push(a):gm.set(o,[a])}return gt(()=>()=>{s&&s.unregister(r),gm.delete(o)},[o]),(0,u8.useEffect)(()=>{let e=a.current;return e&&t(e),()=>{e&&(a.current=null)}}),o}function gg(e=[]){let n=gh(),[t,a]=function(e){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(null),o=ga(()=>{if(!a.current)return;let e=a.current.next();if(e.done){a.current=null;return}n===e.value?o():t(e.value)});gt(()=>{a.current&&o()});let r=ga(e=>{a.current=e(n),o()});return[n,r]}(n),o=(0,u8.useCallback)(()=>{a(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,a]);return gt(o,[n,o,...e]),t}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{gm.delete(e)}));let gy=function(){for(var e,n,t=0,a="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=function e(n){var t,a,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(t=0;t<r;t++)n[t]&&(a=e(n[t]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}(e))&&(a&&(a+=" "),a+=n);return a};function gb(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let a=e[t];for(let e in a){let t=n[e],o=a[e];"function"==typeof t&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=gn(t,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof o?n[e]=gy(t,o):"id"===e&&t&&o?n.id=function(e,n){if(e===n)return e;let t=gm.get(e);if(t)return t.forEach(e=>e.current=n),n;let a=gm.get(n);return a?(a.forEach(n=>n.current=e),e):n}(t,o):n[e]=void 0!==o?o:t}}return n}let g_=Symbol("default");function gv({values:e,children:n}){for(let[t,a]of e)n=u7().createElement(t.Provider,{value:a},n);return n}function g$(e){let{className:n,style:t,children:a,defaultClassName:o,defaultChildren:r,defaultStyle:i,values:s}=e;return(0,u8.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 a?a({...s,defaultChildren:r}):null==a?r:a,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=c?c:r,"data-rac":""}},[n,t,a,o,r,i,s])}function gA(e,n){let t=(0,u8.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||g_;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),a=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${a} Valid slot names are ${e}.`)}return t.slots[e]}return t}function gk(e,n,t){let{ref:a,...o}=gA(t,e.slot)||{},r=ge((0,u8.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,a),[n,a])),i=gb(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,a={...n.defaultStyle,...t},r="function"==typeof e.style?e.style({...n,defaultStyle:a}):e.style;return{...a,...r}}:i.style={...o.style,...e.style}),[i,r]}function gw(e=!0){let[n,t]=(0,u8.useState)(e),a=(0,u8.useRef)(!1),o=(0,u8.useCallback)(e=>{a.current=!0,t(!!e)},[]);return gt(()=>{a.current||t(!1)},[]),[o,n]}function gx(e){let n=/^(data-.*)$/,t={};for(let a in e)n.test(a)||(t[a]=e[a]);return t}let gC=(0,u8.createContext)(null),gE=null;function gS(e,n="assertive",t=7e3){gE?gE.announce(e,n,t):(gE=new gD,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?gE.announce(e,n,t):setTimeout(()=>{(null==gE?void 0:gE.isAttached())&&(null==gE||gE.announce(e,n,t))},100))}class gD{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 a,o;if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===n?null==(a=this.assertiveLog)||a.appendChild(r):null==(o=this.politeLog)||o.appendChild(r),""!==e&&setTimeout(()=>{r.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 gM=new Set(["id"]),gz=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gO=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gP=/^(data-.*)$/;function gT(e,n={}){let{labelable:t,isLink:a,propNames:o}=n,r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(gM.has(n)||t&&gz.has(n)||a&&gO.has(n)||(null==o?void 0:o.has(n))||gP.test(n))&&(r[n]=e[n]);return r}let gB=["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"])'],gI=gB.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";gB.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let gN=gB.join(':not([hidden]):not([tabindex="-1"]),');function gj(e){return e.matches(gI)}function gR(e){return e.matches(gN)}let gF=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},gL=e=>e&&"window"in e&&e.window===e?e:gF(e).defaultView||window;function gW(e){if(function(){if(null==gG){gG=!1;try{document.createElement("div").focus({get preventScroll(){return gG=!0,!0}})}catch{}}return gG}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],a=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==a;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return a instanceof HTMLElement&&t.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:a}of e)n.scrollTop=t,n.scrollLeft=a}(n)}}let gG=null;function gV(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gU(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function gq(e){let n=(0,u8.useRef)({isFocused:!1,observer:null});gt(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=ga(n=>{null==e||e(n)});return(0,u8.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let a=e.target;a.addEventListener("focusout",e=>{n.current.isFocused=!1,a.disabled&&t(gV(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&a.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let gH=!1;function gK(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 gY(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 gJ(e){let n=null;return()=>(null==n&&(n=e()),n)}let gZ=gJ(function(){return gY(/^Mac/i)}),gX=gJ(function(){return gY(/^iPhone/i)}),gQ=gJ(function(){return gY(/^iPad/i)||gZ()&&navigator.maxTouchPoints>1}),g0=gJ(function(){return gX()||gQ()});gJ(function(){return gZ()||g0()});let g1=gJ(function(){return gK(/AppleWebKit/i)&&!g2()}),g2=gJ(function(){return gK(/Chrome/i)}),g3=gJ(function(){return gK(/Android/i)}),g5=gJ(function(){return gK(/Firefox/i)}),g4=new Map,g6=new Set;function g8(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let a=g4.get(t.target);if(a&&(a.delete(t.propertyName),0===a.size&&(t.target.removeEventListener("transitioncancel",n),g4.delete(t.target)),0===g4.size)){for(let e of g6)e();g6.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let a=g4.get(t.target);a||(a=new Set,g4.set(t.target,a),t.target.addEventListener("transitioncancel",n,{once:!0})),a.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function g7(e){requestAnimationFrame(()=>{0===g4.size?e():g6.add(e)})}"u">typeof document&&("loading"!==document.readyState?g8():document.addEventListener("DOMContentLoaded",g8));let g9="default",ye="",yn=new WeakMap;function yt(e){if(g0())"disabled"===g9&&(g9="restoring",setTimeout(()=>{g7(()=>{if("restoring"===g9){let n=gF(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=ye||""),ye="",g9="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&yn.has(e)){let n=yn.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),yn.delete(e)}}let ya=u7().createContext({register:()=>{}});function yo(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function yr(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function yi(e,n,t){var a=yo(e,n,"set");if(a.set)a.set.call(e,t);else{if(!a.writable)throw TypeError("attempted to set read only private field");a.value=t}return t}function ys(e,n){gt(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function yl(){let e=(0,u8.useRef)(new Map),n=(0,u8.useCallback)((n,t,a,o)=>{let r=(null==o?void 0:o.once)?(...n)=>{e.current.delete(a),a(...n)}:a;e.current.set(a,{type:t,eventTarget:n,fn:r,options:o}),n.addEventListener(t,r,o)},[]),t=(0,u8.useCallback)((n,t,a,o)=>{var r;let i=(null==(r=e.current.get(a))?void 0:r.fn)||a;n.removeEventListener(t,i,o),e.current.delete(a)},[]),a=(0,u8.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,u8.useEffect)(()=>a,[a]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:a}}ya.displayName="PressResponderContext";function yc(e,n){return!!n&&!!e&&e.contains(n)}function yp(e){return e.target}function yu(e,n,t=!0){var a,o;let{metaKey:r,ctrlKey:i,altKey:s,shiftKey:l}=n;g5()&&(null==(o=window.event)||null==(a=o.type)?void 0:a.startsWith("key"))&&"_blank"===e.target&&(gZ()?r=!0:i=!0);let c=g1()&&gZ()&&!gQ()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});yu.isOpening=t,gW(e),e.dispatchEvent(c),yu.isOpening=!1}function yd(e){return 0===e.mozInputSource&&!!e.isTrusted||(g3()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}yu.isOpening=!1;var yf=t(40961),ym=new WeakMap;class yh{continuePropagation(){yi(this,ym,!1)}get shouldStopPropagation(){var e;return e=yo(this,ym,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,a){var o;yr(this,ym,{writable:!0,value:void 0}),yi(this,ym,!0);let r=null!=(o=null==a?void 0:a.target)?o:t.currentTarget;const i=null==r?void 0:r.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 yg=Symbol("linkClicked");function yy(e){let{onPress:n,onPressChange:t,onPressStart:a,onPressEnd:o,onPressUp:r,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:d,...f}=function(e){let n=(0,u8.useContext)(ya);if(n){let{register:t,...a}=n;e=gb(a,e),t()}return ys(n,e.ref),e}(e),[m,h]=(0,u8.useState)(!1),g=(0,u8.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=yl(),v=ga((e,n)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let r=!0;if(o.isTriggeringEvent=!0,a){let t=new yh("pressstart",n,e);a(t),r=t.shouldStopPropagation}return t&&t(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),r}),$=ga((e,a,r=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let n=new yh("pressend",a,e);o(n),l=n.shouldStopPropagation}if(t&&t(!1),h(!1),n&&r&&!s){let t=new yh("press",a,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),A=ga((e,n)=>{let t=g.current;if(s)return!1;if(r){t.isTriggeringEvent=!0;let a=new yh("pressup",n,e);return r(a),t.isTriggeringEvent=!1,a.shouldStopPropagation}return!0}),k=ga(e=>{let n=g.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&$(yv(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,b(),u||yt(n.target),n.disposables))t();n.disposables=[]}}),w=ga(e=>{p&&k(e)}),x=ga(e=>{null==i||i(e)}),C=ga((e,n)=>{if(i){let t=new MouseEvent("click",e);gU(t,n),i(gV(t))}}),E=(0,u8.useMemo)(()=>{let e=g.current,n={onKeyDown(n){if(y_(n.nativeEvent,n.currentTarget)&&yc(n.currentTarget,yp(n.nativeEvent))){var a;y$(yp(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 a=n.currentTarget;y(gF(n.currentTarget),"keyup",gn(n=>{y_(n,a)&&!n.repeat&&yc(a,yp(n))&&e.target&&A(yv(e.target,n),"keyboard")},t),!0)}o&&n.stopPropagation(),n.metaKey&&gZ()&&(null==(a=e.metaKeyEvents)||a.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||yc(n.currentTarget,yp(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!yu.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||yd(n.nativeEvent))){let e=v(n,"virtual"),a=A(n,"virtual"),o=$(n,"virtual");x(n),t=e&&a&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let a=e.pointerType||n.nativeEvent.pointerType||"virtual";t=$(yv(n.currentTarget,n),a,!0),e.isOverTarget=!1,x(n),k(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,a,o;if(e.isPressed&&e.target&&y_(n,e.target)){y$(yp(n),n.key)&&n.preventDefault();let t=yp(n),o=yc(e.target,yp(n));$(yv(e.target,n),"keyboard",o),o&&C(n,e.target),b(),"Enter"!==n.key&&yb(e.target)&&yc(e.target,t)&&!n[yg]&&(n[yg]=!0,yu(e.target,n,!1)),e.isPressed=!1,null==(a=e.metaKeyEvents)||a.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||!yc(n.currentTarget,yp(n.nativeEvent)))return;if(o=n.nativeEvent,!g3()&&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 r=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,u||function(e){if(g0()){if("default"===g9){let n=gF(e);ye=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}g9="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";yn.set(e,e.style[n]),e.style[n]="none"}}(e.target),r=v(n,e.pointerType);let o=yp(n.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(n.pointerId),y(gF(n.currentTarget),"pointerup",t,!1),y(gF(n.currentTarget),"pointercancel",a,!1)}r&&n.stopPropagation()},n.onMouseDown=n=>{if(yc(n.currentTarget,yp(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!gj(e);)e=e.parentElement;let n=gL(e),t=n.document.activeElement;if(!t||t===e)return;gH=!0;let a=!1,o=e=>{(e.target===t||a)&&e.stopImmediatePropagation()},r=n=>{(n.target===t||a)&&(n.stopImmediatePropagation(),e||a||(a=!0,gW(t),l()))},i=n=>{(n.target===e||a)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||a)&&(n.stopImmediatePropagation(),a||(a=!0,gW(t),l()))};n.addEventListener("blur",o,!0),n.addEventListener("focusout",r,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",o,!0),n.removeEventListener("focusout",r,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),gH=!1,a=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{yc(n.currentTarget,yp(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(yv(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,$(yv(e.target,n),e.pointerType,!1),w(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(yc(e.target,yp(n))&&null!=e.pointerType){let t=!1,a=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?k(n):(gW(e.target),e.target.click()))},80);y(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(a))}else k(n);e.isOverTarget=!1}},a=e=>{k(e)};n.onDragStart=e=>{yc(e.currentTarget,yp(e.nativeEvent))&&k(e)}}return n},[y,s,c,b,u,k,w,$,v,A,x,C]);return(0,u8.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof gL(e).Element&&"auto"===gL(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,u8.useEffect)(()=>{let e=g.current;return()=>{var n;for(let t of(u||yt(null!=(n=e.target)?n:void 0),e.disposables))t();e.disposables=[]}},[u]),{isPressed:l||m,pressProps:gb(f,E)}}function yb(e){return"A"===e.tagName&&e.hasAttribute("href")}function y_(e,n){let{key:t,code:a}=e,o=n.getAttribute("role");return("Enter"===t||" "===t||"Spacebar"===t||"Space"===a)&&!(n instanceof gL(n).HTMLInputElement&&!yk(n,t)||n instanceof gL(n).HTMLTextAreaElement||n.isContentEditable)&&!(("link"===o||!o&&yb(n))&&"Enter"!==t)}function yv(e,n){let t=n.clientX,a=n.clientY;return{currentTarget:e,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,clientX:t,clientY:a}}function y$(e,n){return e instanceof HTMLInputElement?!yk(e,n):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!yb(e))}let yA=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yk(e,n){return"checkbox"===e.type||"radio"===e.type?" "===n:yA.has(e.type)}let yw=null,yx=new Set,yC=new Map,yE=!1,yS=!1,yD={Tab:!0,Escape:!0};function yM(e,n){for(let t of yx)t(e,n)}function yz(e){yE=!0,e.metaKey||!gZ()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yw="keyboard",yM("keyboard",e))}function yO(e){yw="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(yE=!0,yM("pointer",e))}function yP(e){yd(e)&&(yE=!0,yw="virtual")}function yT(e){e.target!==window&&e.target!==document&&!gH&&e.isTrusted&&(yE||yS||(yw="virtual",yM("virtual",e)),yE=!1,yS=!1)}function yB(){gH||(yE=!1,yS=!0)}function yI(e){if("u"<typeof window||yC.get(gL(e)))return;let n=gL(e),t=gF(e),a=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){yE=!0,a.apply(this,arguments)},t.addEventListener("keydown",yz,!0),t.addEventListener("keyup",yz,!0),t.addEventListener("click",yP,!0),n.addEventListener("focus",yT,!0),n.addEventListener("blur",yB,!1),"u">typeof PointerEvent&&(t.addEventListener("pointerdown",yO,!0),t.addEventListener("pointermove",yO,!0),t.addEventListener("pointerup",yO,!0)),n.addEventListener("beforeunload",()=>{yN(e)},{once:!0}),yC.set(n,{focus:a})}let yN=(e,n)=>{let t=gL(e),a=gF(e);n&&a.removeEventListener("DOMContentLoaded",n),yC.has(t)&&(t.HTMLElement.prototype.focus=yC.get(t).focus,a.removeEventListener("keydown",yz,!0),a.removeEventListener("keyup",yz,!0),a.removeEventListener("click",yP,!0),t.removeEventListener("focus",yT,!0),t.removeEventListener("blur",yB,!1),"u">typeof PointerEvent&&(a.removeEventListener("pointerdown",yO,!0),a.removeEventListener("pointermove",yO,!0),a.removeEventListener("pointerup",yO,!0)),yC.delete(t))};function yj(){return"pointer"!==yw}"u">typeof document&&("loading"!==(d=gF(void 0)).readyState?yI(void 0):d.addEventListener("DOMContentLoaded",()=>{yI(void 0)}));let yR=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yF(e){let n=gF(e),t=((e=document)=>e.activeElement)(n);"virtual"===yw?g7(()=>{((e=document)=>e.activeElement)(n)===t&&e.isConnected&&gW(e)}):gW(e)}function yL(e){let{isDisabled:n,onFocus:t,onBlur:a,onFocusChange:o}=e,r=(0,u8.useCallback)(e=>{if(e.target===e.currentTarget)return a&&a(e),o&&o(!1),!0},[a,o]),i=gq(r),s=(0,u8.useCallback)(e=>{let n=gF(e.target),a=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();e.target===e.currentTarget&&a===yp(e.nativeEvent)&&(t&&t(e),o&&o(!0),i(e))},[o,t,i]);return{focusProps:{onFocus:!n&&(t||o||a)?s:void 0,onBlur:!n&&(a||o)?r:void 0}}}function yW(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 yG=u7().createContext(null);function yV(e,n){let{focusProps:t}=yL(e),{keyboardProps:a}={keyboardProps:e.isDisabled?{}:{onKeyDown:yW(e.onKeyDown),onKeyUp:yW(e.onKeyUp)}},o=gb(t,a),r=function(e){let n=(0,u8.useContext)(yG)||{};ys(n,e);let{ref:t,...a}=n;return a}(n),i=e.isDisabled?{}:r,s=(0,u8.useRef)(e.autoFocus);(0,u8.useEffect)(()=>{s.current&&n.current&&yF(n.current),s.current=!1},[n]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:gb({...o,tabIndex:l},i)}}function yU(e){let{isDisabled:n,onBlurWithin:t,onFocusWithin:a,onFocusWithinChange:o}=e,r=(0,u8.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=yl(),l=(0,u8.useCallback)(e=>{e.currentTarget.contains(e.target)&&r.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(r.current.isFocusWithin=!1,s(),t&&t(e),o&&o(!1))},[t,o,r,s]),c=gq(l),p=(0,u8.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let n=gF(e.target),t=((e=document)=>e.activeElement)(n);if(!r.current.isFocusWithin&&t===yp(e.nativeEvent)){a&&a(e),o&&o(!0),r.current.isFocusWithin=!0,c(e);let t=e.currentTarget;i(n,"focus",e=>{if(r.current.isFocusWithin&&!yc(t,e.target)){let a=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});gU(a,t),l(gV(a))}},{capture:!0})}},[a,o,c,i,l]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:l}}}function yq(e={}){var n;let{autoFocus:t=!1,isTextInput:a,within:o}=e,r=(0,u8.useRef)({isFocused:!1,isFocusVisible:t||yj()}),[i,s]=(0,u8.useState)(!1),[l,c]=(0,u8.useState)(()=>r.current.isFocused&&r.current.isFocusVisible),p=(0,u8.useCallback)(()=>c(r.current.isFocused&&r.current.isFocusVisible),[]),u=(0,u8.useCallback)(e=>{r.current.isFocused=e,s(e),p()},[p]);n={isTextInput:a},yI(),(0,u8.useEffect)(()=>{let e=(e,t)=>{var a;let o,i,s,l,c;a=!!(null==n?void 0:n.isTextInput),o=gF(null==t?void 0:t.target),i="u">typeof window?gL(null==t?void 0:t.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?gL(null==t?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?gL(null==t?void 0:t.target).HTMLElement:HTMLElement,c="u">typeof window?gL(null==t?void 0:t.target).KeyboardEvent:KeyboardEvent,(a=a||o.activeElement instanceof i&&!yR.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&t instanceof c&&!yD[t.key]||(e=>{r.current.isFocusVisible=e,p()})(yj())};return yx.add(e),()=>{yx.delete(e)}},[]);let{focusProps:d}=yL({isDisabled:o,onFocusChange:u}),{focusWithinProps:f}=yU({isDisabled:!o,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:o?f:d}}u7().forwardRef(function(e,n){let{children:t,...a}=e,o=ge(n),r={...a,ref:o};return u7().createElement(yG.Provider,{value:r},t)});let yH=!1,yK=0;function yY(e){"touch"===e.pointerType&&(yH=!0,setTimeout(()=>{yH=!1},50))}function yJ(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",yY),yK++,()=>{!(--yK>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",yY)}}function yZ(e){let{onHoverStart:n,onHoverChange:t,onHoverEnd:a,isDisabled:o}=e,[r,i]=(0,u8.useState)(!1),s=(0,u8.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,u8.useEffect)(yJ,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=yl(),{hoverProps:p,triggerHoverEnd:u}=(0,u8.useMemo)(()=>{let e=(e,n)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==n&&s.isHovered&&o&&(s.isHovered=!1,c(),a&&a({type:"hoverend",target:o,pointerType:n}),t&&t(!1),i(!1))},r={};return"u">typeof PointerEvent&&(r.onPointerEnter=a=>{yH&&"mouse"===a.pointerType||((a,r)=>{if(s.pointerType=r,o||"touch"===r||s.isHovered||!a.currentTarget.contains(a.target))return;s.isHovered=!0;let c=a.currentTarget;s.target=c,l(gF(a.target),"pointerover",n=>{s.isHovered&&s.target&&!yc(s.target,n.target)&&e(n,n.pointerType)},{capture:!0}),n&&n({type:"hoverstart",target:c,pointerType:r}),t&&t(!0),i(!0)})(a,a.pointerType)},r.onPointerLeave=n=>{!o&&n.currentTarget.contains(n.target)&&e(n,n.pointerType)}),{hoverProps:r,triggerHoverEnd:e}},[n,t,a,o,s,l,c]);return(0,u8.useEffect)(()=>{o&&u({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:p,isHovered:r}}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 yX=(0,u8.createContext)(!1);function yQ(e){let n=(n,t)=>(0,u8.useContext)(yX)?null:e(n,t);return n.displayName=e.displayName||e.name,(0,u8.forwardRef)(n)}let y0=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),y1=(0,u8.createContext)({}),y2=yQ(function(e,n){var t;[e,n]=gk(e,n,y1);let a=((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}=a,{buttonProps:r,isPressed:i}=function(e,n){let t,{elementType:a="button",isDisabled:o,onPress:r,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:p,allowFocusWhenDisabled:u,onClick:d,href:f,target:m,rel:h,type:g="button"}=e;t="button"===a?{type:g,disabled:o}:{role:"button",href:"a"!==a||o?void 0:f,target:"a"===a?m:void 0,type:"input"===a?g:void 0,disabled:"input"===a?o:void 0,"aria-disabled":o&&"input"!==a?o:void 0,rel:"a"===a?h:void 0};let{pressProps:y,isPressed:b}=yy({onPressStart:i,onPressEnd:s,onPressChange:c,onPress:r,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:p,ref:n}),{focusableProps:v}=yV(e,n);u&&(v.tabIndex=o?-1:v.tabIndex);let $=gb(v,y,gT(e,{labelable:!0}));return{isPressed:b,buttonProps:gb(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}=yq(e),{hoverProps:p,isHovered:u}=yZ({...e,isDisabled:e.isDisabled||o}),d={isHovered:u,isPressed:(a.isPressed||i)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=g$({...e,values:d,defaultClassName:"react-aria-Button"}),m=gh(r.id),h=gh(),g=r["aria-labelledby"];o&&(g?g=`${g} ${h}`:r["aria-label"]&&(g=`${m} ${h}`));let y=(0,u8.useRef)(o);return(0,u8.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?gS(e,"assertive"):y.current&&l&&!o&&gS(e,"assertive"),y.current=o},[o,l,g,m]),u7().createElement("button",{...gT(e,{propNames:y0}),...gb(r,s,p),...f,type:"submit"===r.type&&o?"button":r.type,id:m,ref:n,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":r["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},u7().createElement(gC.Provider,{value:{id:h}},f.children))});(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null),(0,u8.createContext)(null);let y3=(0,u8.createContext)({}),y5=(0,u8.createContext)({}),y4=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,y5);let{elementType:t="span",...a}=e;return u7().createElement(t,{className:"react-aria-Text",...a,ref:n})}),y6=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),y8=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function y7(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 y6.has(n.script)}let n=e.split("-")[0];return y8.has(n)}let y9=Symbol.for("react-aria.i18n.locale");function be(){let e="u">typeof window&&window[y9]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:y7(e)?"rtl":"ltr"}}let bn=be(),bt=new Set;function ba(){for(let e of(bn=be(),bt))e(bn)}function bo(){let e=gd(),[n,t]=(0,u8.useState)(bn);return((0,u8.useEffect)(()=>(0===bt.size&&window.addEventListener("languagechange",ba),bt.add(t),()=>{bt.delete(t),0===bt.size&&window.removeEventListener("languagechange",ba)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let br=u7().createContext(null);function bi(e){let{locale:n,children:t}=e,a=bo(),o=u7().useMemo(()=>n?{locale:n,direction:y7(n)?"rtl":"ltr"}:a,[a,n]);return u7().createElement(br.Provider,{value:o},t)}function bs(){let e=bo();return(0,u8.useContext)(br)||e}var bl={};function bc(e,n){return e-n*Math.floor(e/n)}function bp(e,n,t,a){let o=(n=bd(e,n))-1,r=-2;return t<=2?r=0:bu(n)&&(r=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*t-362)/12+r+a)}function bu(e){return e%4==0&&(e%100!=0||e%400==0)}function bd(e,n){return"BC"===e?1-n:n}function bf(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}bl={"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 bm={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 bh{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),a=bc(n,146097),o=Math.floor(a/36524),r=bc(a,36524),i=Math.floor(r/1461),s=Math.floor(bc(r,1461)/365),[l,c]=bf(400*t+100*o+4*i+s+ +(4!==o&&4!==s)),p=e-bp(l,c,1,1),u=2;e<bp(l,c,3,1)?u=0:bu(c)&&(u=1);let d=Math.floor(((p+u)*12+373)/367),f=e-bp(l,c,d,1)+1;return new bN(l,c,d,f)}toJulianDay(e){return bp(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return bm[bu(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return bu(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 bg(e,n){let t=e.copy(),a="hour"in t?bC(t,n):0;by(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,bb(t),b_(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=a,function(e){for(;e.day<1;)e.month--,bb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,bb(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 r,i;let e=null==(r=(i=t.calendar).isInverseEra)?void 0:r.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 by(e,n){var t,a;(null==(t=(a=e.calendar).isInverseEra)?void 0:t.call(a,e))&&(n=-n),e.year+=n}function bb(e){for(;e.month<1;)by(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,by(e,1)}function b_(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 bv(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),b_(e)}function b$(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function bA(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),bv(t),t}function bk(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),bw(t),t}function bw(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 bx(e,n){let t=e%n;return t<0&&(t+=n),t}function bC(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=bx(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bx(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bx(e.minute,60),t=Math.floor(e.hour/24),e.hour=bx(e.hour,24),t}function bE(e,n){let t=e.copy();return bC(t,n),t}function bS(e,n,t,a){let o=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),r=n.indexOf(e.era);if(r<0)throw Error("Invalid era: "+e.era);r=bM(r,t,0,n.length-1,null==a?void 0:a.round),o.era=n[r],bv(o);break}case"year":var r,i;(null==(r=(i=o.calendar).isInverseEra)?void 0:r.call(i,o))&&(t=-t),o.year=bM(e.year,t,-1/0,9999,null==a?void 0:a.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bM(e.month,t,1,e.calendar.getMonthsInYear(e),null==a?void 0:a.round);break;case"day":o.day=bM(e.day,t,1,e.calendar.getDaysInMonth(e),null==a?void 0:a.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),bv(o),o}function bD(e,n,t,a){let o=e.copy();switch(n){case"hour":{let n=e.hour,r=0,i=23;if((null==a?void 0:a.hourCycle)===12){let e=n>=12;r=12*!!e,i=e?23:11}o.hour=bM(n,t,r,i,null==a?void 0:a.round);break}case"minute":o.minute=bM(e.minute,t,0,59,null==a?void 0:a.round);break;case"second":o.second=bM(e.second,t,0,59,null==a?void 0:a.round);break;case"millisecond":o.millisecond=bM(e.millisecond,t,0,999,null==a?void 0:a.round);break;default:throw Error("Unsupported field "+n)}return o}function bM(e,n,t,a,o=!1){if(o){(e+=Math.sign(n))<t&&(e=a);let o=Math.abs(n);(e=n>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>a&&(e=t)}else(e+=n)<t?e=a-(t-e-1):e>a&&(e=t+(e-a-1));return e}function bz(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?bY(bg(bQ(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):bV(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),b0(bZ(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function bO(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 bP(e){let n,t=b0(e,new bh);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 bT(e){return`${bP(e)}T${bO(e)}`}function bB(e){let n,t="object"==typeof e[0]?e.shift():new bh;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 bI=new WeakMap;class bN{copy(){return this.era?new bN(this.calendar,this.era,this.year,this.month,this.day):new bN(this.calendar,this.year,this.month,this.day)}add(e){return bg(this,e)}subtract(e){return bg(this,b$(e))}set(e){return bA(this,e)}cycle(e,n,t){return bS(this,e,n,t)}toDate(e){return bJ(this,e)}toString(){return bP(this)}compare(e){return b9(this,e)}constructor(...e){yr(this,bI,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e);this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,bv(this)}}var bj=new WeakMap;class bR{copy(){return new bR(this.hour,this.minute,this.second,this.millisecond)}add(e){return bE(this,e)}subtract(e){return bE(this,b$(e))}set(e){return bk(this,e)}cycle(e,n,t){return bD(this,e,n,t)}toString(){return bO(this)}compare(e){var n,t;return n=this,t=e,_e(n)-_e(t)}constructor(e=0,n=0,t=0,a=0){yr(this,bj,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=a,bw(this)}}var bF=new WeakMap;class bL{copy(){return this.era?new bL(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bL(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return bg(this,e)}subtract(e){return bg(this,b$(e))}set(e){return bA(bk(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 bD(this,e,n,t)}}toDate(e,n){return bJ(this,e,n)}toString(){return bT(this)}compare(e){var n,t;let a=b9(this,e);return 0===a?(n=this,t=bQ(e),_e(n)-_e(t)):a}constructor(...e){yr(this,bF,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e);this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bv(this)}}var bW=new WeakMap;class bG{copy(){return this.era?new bG(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bG(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bz(this,e)}subtract(e){return bz(this,b$(e))}set(e,n){let t,a;return 0===(a=bk(bA(t=bQ(this),e),e)).compare(t)?this:b0(bZ(bY(a,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,a){switch(n){case"hour":{let n=0,o=23;if((null==a?void 0:a.hourCycle)===12){let t=e.hour>=12;n=12*!!t,o=t?23:11}let r=bQ(e),i=b0(bk(r,{hour:n}),new bh),s=[bY(i,e.timeZone,"earlier"),bY(i,e.timeZone,"later")].filter(n=>bZ(n,e.timeZone).day===i.day)[0],l=b0(bk(r,{hour:o}),new bh),c=[bY(l,e.timeZone,"earlier"),bY(l,e.timeZone,"later")].filter(n=>bZ(n,e.timeZone).day===l.day).pop(),p=bV(e)-e.offset,u=Math.floor(p/36e5),d=p%36e5;return b0(bZ(p=36e5*bM(u,t,Math.floor(s/36e5),Math.floor(c/36e5),null==a?void 0:a.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bD(e,n,t,a);case"era":case"year":case"month":case"day":return b0(bZ(bY(bS(bQ(e),n,t,a),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){var e;return e=this,new Date(bV(e)-e.offset)}toString(){var e;let n,t,a;return`${bT(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),a=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(a).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n){if(e instanceof bG){var t,a;return e.timeZone===n?e:(t=e,a=n,b0(bZ(bV(t)-t.offset,a),t.calendar))}return bZ(bY(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){yr(this,bW,{writable:!0,value:void 0});let[n,t,a,o,r]=bB(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=a,this.month=o,this.day=r,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,bv(this)}}function bV(e){return bU(bd((e=b0(e,new bh)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bU(e,n,t,a,o,r,i){let s=new Date;return s.setUTCHours(a,o,r,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function bq(e,n){if("UTC"===n)return 0;if(e>0&&n===_t())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:a,day:o,hour:r,minute:i,second:s}=bK(e,n);return bU(t,a,o,r,i,s,0)-1e3*Math.floor(e/1e3)}let bH=new Map;function bK(e,n){let t=bH.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"}),bH.set(n,t));let a=t.formatToParts(new Date(e)),o={};for(let e of a)"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 bY(e,n,t="compatible"){var a,o,r;let i=bQ(e);if("UTC"===n)return bV(i);if(n===_t()&&"compatible"===t){i=b0(i,new bh);let e=new Date,n=bd(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=bV(i),l=bq(s-864e5,n),c=bq(s+864e5,n),p=(a=i,((o=s-l)==(r=s-c)?[o]:[o,r]).filter(e=>{var t;let o;return t=a,o=bK(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 bJ(e,n,t="compatible"){return new Date(bY(e,n,t))}function bZ(e,n){let t=bq(e,n),a=new Date(e+t),o=a.getUTCFullYear();return new bG(o<1?"BC":"AD",o<1?-o+1:o,a.getUTCMonth()+1,a.getUTCDate(),n,t,a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())}function bX(e){return new bN(e.calendar,e.era,e.year,e.month,e.day)}function bQ(e,n){let t=0,a=0,o=0,r=0;if("timeZone"in e)({hour:t,minute:a,second:o,millisecond:r}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:a,second:o,millisecond:r}=n),new bL(e.calendar,e.era,e.year,e.month,e.day,t,a,o,r)}function b0(e,n){if(b5(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),a=e.copy();return a.calendar=n,a.era=t.era,a.year=t.year,a.month=t.month,a.day=t.day,bv(a),a}let b1={"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 b2(e,n){return n=b0(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function b3(e,n){return b5(e.calendar,n.calendar)&&b2(e,n)}function b5(e,n){var t,a,o,r;return null!=(r=null!=(o=null==(t=e.isEqual)?void 0:t.call(e,n))?o:null==(a=n.isEqual)?void 0:a.call(n,e))?r:e.identifier===n.identifier}let b4={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function b6(e,n,t){let a,o=Math.ceil(e.calendar.toJulianDay(e)+1-(t?b4[t]:(a=function(e){if(Intl.Locale){let n=_i.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&_i.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&b1[a]||0))%7;return o<0&&(o+=7),o}function b8(e){return bZ(Date.now(),e)}function b7(e){return bX(b8(e))}function b9(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function _e(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let _n=null;function _t(){return null==_n&&(_n=new Intl.DateTimeFormat().resolvedOptions().timeZone),_n}function _a(e){return e.subtract({days:e.day-1})}function _o(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function _r(e,n,t){let a=b6(e,n,t);return e.subtract({days:a})}let _i=new Map;function _s(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function _l(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}let _c=Symbol.for("react-aria.i18n.locale"),_p=Symbol.for("react-aria.i18n.strings");class _u{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 a;if(n[e])return n[e];let o=(a=e,Intl.Locale?new Intl.Locale(a).language:a.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[_c];if(void 0===f){let e=window[_p];if(!e)return null;for(let t in f={},e)f[t]=new _u({[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 _d=new Map,_f=new Map;class _m{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 a=n["="+e];if(a)return"function"==typeof a?a():a;let o=this.locale+":"+t,r=_d.get(o);return r||(r=new Intl.PluralRules(this.locale,{type:t}),_d.set(o,r)),"function"==typeof(a=n[r.select(e)]||n.other)?a():a}number(e){let n=_f.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),_f.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 _h=new WeakMap;function _g(e,n){let t;return n&&_u.getGlobalDictionaryForPackage(n)||((t=_h.get(e))||(t=new _u(e),_h.set(e,t)),t)}function _y(e,n){let{locale:t}=bs(),a=_g(e,n);return(0,u8.useMemo)(()=>new _m(t,a),[t,a])}let _b=new Map;class __{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),a=this.formatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==_k&&(_k="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_k&&(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.includes("-u-")?"":"-u")+"-nu-latn",{...n,timeZone:void 0}),a=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===a&&23===o)return"h23";if(24===a&&23===o)return"h24";if(0===a&&11===o)return"h11";if(12===a&&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,n),this.options=n}}let _v={true:{ja:"h11"},false:{}};function _$(e,n={}){if("boolean"==typeof n.hour12&&(null==_A&&(_A="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_A)){let t=_v[String((n={...n}).hour12)][e.split("-")[0]],a=n.hour12?"h12":"h23";n.hourCycle=null!=t?t:a,delete n.hour12}let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(_b.has(t))return _b.get(t);let a=new Intl.DateTimeFormat(e,n);return _b.set(t,a),a}let _A=null,_k=null;function _w(e,n){let t=(0,u8.useRef)(null);return e&&t.current&&n(e,t.current)&&(e=t.current),t.current=e,e}function _x(e){e=_w(null!=e?e:{},_C);let{locale:n}=bs();return(0,u8.useMemo)(()=>new __(n,e),[n,e])}function _C(e,n){if(e===n)return!0;let t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;for(let a of t)if(n[a]!==e[a])return!1;return!0}function _E(e){return e&&e.__esModule?e.default:e}let _S=new WeakMap;function _D(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _M(e,n,t,a){let o=_y(_E(bl),"@react-aria/calendar"),r=_D(e)||_D(n),i=_x({month:"long",year:"numeric",era:r,calendar:e.calendar.identifier,timeZone:t}),s=_x({month:"long",year:"numeric",day:"numeric",era:r,calendar:e.calendar.identifier,timeZone:t});return(0,u8.useMemo)(()=>{if(b2(e,_a(e))){let r=e,s=n;if(e.calendar.getFormattableMonth&&(r=e.calendar.getFormattableMonth(e)),n.calendar.getFormattableMonth&&(s=n.calendar.getFormattableMonth(n)),b2(n,_o(e)))return i.format(r.toDate(t));if(b2(n,_o(n)))return a?_z(i,o,r,s,t):i.formatRange(r.toDate(t),s.toDate(t))}return a?_z(s,o,e,n,t):s.formatRange(e.toDate(t),n.toDate(t))},[e,n,i,s,o,t,a])}function _z(e,n,t,a,o){let r=e.formatRangeToParts(t.toDate(o),a.toDate(o)),i=-1;for(let e=0;e<r.length;e++){let n=r[e];if("shared"===n.source&&"literal"===n.type)i=e;else if("endRange"===n.source)break}let s="",l="";for(let e=0;e<r.length;e++)e<i?s+=r[e].value:e>i&&(l+=r[e].value);return n.format("dateRange",{startDate:s,endDate:l})}function _O(e,n){let t=(0,u8.useRef)(!0),a=(0,u8.useRef)(null);(0,u8.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),(0,u8.useEffect)(()=>{let o=a.current;t.current?t.current=!1:(!o||n.some((e,n)=>!Object.is(e,o[n])))&&e(),a.current=n},n)}function _P(e,n){let{id:t,"aria-label":a,"aria-labelledby":o}=e;return t=gh(t),o&&a?o=[...new Set([t,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),a||o||!n||(a=n),{id:t,"aria-label":a,"aria-labelledby":o}}function _T(e,n){var t,a;let o,r,i,s,l,c=_y((t=bl)&&t.__esModule?t.default:t,"@react-aria/calendar"),p=gT(e),u=_M(n.visibleRange.start,n.visibleRange.end,n.timeZone,!1),d=_M(n.visibleRange.start,n.visibleRange.end,n.timeZone,!0);_O(()=>{n.isFocused||gS(d)},[d]);let f=(i=_y(_E(bl),"@react-aria/calendar"),"highlightedRange"in n?{start:o,end:r}=n.highlightedRange||{}:o=r=null!=(a=n.value)?a:void 0,s=_x({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_D(o)||_D(r),timeZone:n.timeZone}),l="anchorDate"in n?n.anchorDate:null,(0,u8.useMemo)(()=>{if(!l&&o&&r)if(b2(o,r)){let e=s.format(o.toDate(n.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=_z(s,i,o,r,n.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,r,l,n.timeZone,i,s]));_O(()=>{f&&gS(f,"polite",4e3)},[f]);let m=gg([!!e.errorMessage,e.isInvalid,e.validationState]);_S.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,u8.useState)(!1),y=e.isDisabled||n.isNextVisibleRangeInvalid();y&&h&&(g(!1),n.setFocused(!0));let[b,v]=(0,u8.useState)(!1),$=e.isDisabled||n.isPreviousVisibleRangeInvalid();return $&&b&&(v(!1),n.setFocused(!0)),{calendarProps:gb(p,_P({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:m},title:u}}let _B={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 _I(e){let{children:n,elementType:t="div",isFocusable:a,style:o,...r}=e,{visuallyHiddenProps:i}=function(e={}){let{style:n,isFocusable:t}=e,[a,o]=(0,u8.useState)(!1),{focusWithinProps:r}=yU({isDisabled:!t,onFocusWithinChange:e=>o(e)}),i=(0,u8.useMemo)(()=>a?n:n?{..._B,...n}:_B,[a]);return{visuallyHiddenProps:{...r,style:i}}}(e);return u7().createElement(t,gb(r,i),n)}function _N(e,n,t,a){let o=ga(t),r=null==t;(0,u8.useEffect)(()=>{if(r||!e.current)return;let t=e.current;return t.addEventListener(n,o,a),()=>{t.removeEventListener(n,o,a)}},[e,n,a,r,o])}let _j=0,_R=new Map;function _F(e){let[n,t]=(0,u8.useState)();return gt(()=>{if(!e)return;let n=_R.get(e);if(n)t(n.element.id);else{let a=`react-aria-description-${_j++}`;t(a);let o=document.createElement("div");o.id=a,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},_R.set(e,n)}return n.refCount++,()=>{n&&0==--n.refCount&&(n.element.remove(),_R.delete(e))}},[e]),{"aria-describedby":e?n:void 0}}function _L(e,n){if(!e)return!1;let t=window.getComputedStyle(e),a=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return a&&n&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function _W(e,n,t){let a="left"===t?"offsetLeft":"offsetTop",o=0;for(;n.offsetParent&&(o+=n[a],n.offsetParent!==e);){if(n.offsetParent.contains(e)){o-=e[a];break}n=n.offsetParent}return o}function _G(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;)_L(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,n){let t=_W(e,n,"left"),a=_W(e,n,"top"),o=n.offsetWidth,r=n.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:p,scrollPaddingRight:u,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),m=i+parseInt(c,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+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+$),a<=h+b?s=a-parseInt(l,10)-b:a+r>y-v&&(s+=a+r-y+v),e.scrollLeft=i,e.scrollTop=s}(n,e);else{var t,a,o,r;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==(a=o.scrollIntoView)||a.call(o,{block:"center",inline:"center"}),null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"}))}}}function _V(e,n){let t=e;for(_L(t,n)&&(t=t.parentElement);t&&!_L(t,n);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}class _U extends bh{fromJulianDay(e){let n=super.fromJulianDay(e);return new bN(this,bd(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(_q(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(_q(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function _q(e){let[n,t]=bf(e.year+-543);return new bN(n,t,e.month,e.day)}function _H(e,n,t,a){return e+365*n+Math.floor(n/4)+30*(t-1)+a-1}function _K(e,n){let t=Math.floor(4*(n-e)/1461),a=1+Math.floor((n-_H(e,t,1,1))/30),o=n+1-_H(e,t,a,1);return[t,a,o]}function _Y(e){return Math.floor(e%4/3)}function _J(e,n){return n%13!=0?30:_Y(e)+5}class _Z{fromJulianDay(e){let[n,t,a]=_K(1723856,e),o="AM";return n<=0&&(o="AA",n+=5500),new bN(this,o,n,t,a)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),_H(1723856,n,e.month,e.day)}getDaysInMonth(e){return _J(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+_Y(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class _X extends _Z{fromJulianDay(e){let[n,t,a]=_K(1723856,e);return new bN(this,"AA",n+=5500,t,a)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class _Q extends _Z{fromJulianDay(e){let[n,t,a]=_K(1824665,e),o="CE";return n<=0&&(o="BCE",n=1-n),new bN(this,o,n,t,a)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_H(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_J(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 _0=765433;function _1(e){return 7>bc(7*e+1,19)}function _2(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>bc(3*(t+1),7)&&(t+=1),t}function _3(e){let n,t;return _2(e)+(n=_2(e-1),t=_2(e),_2(e+1)-t==356?2:+(t-n==382))}function _5(e){return _3(e+1)-_3(e)}function _4(e,n){if(n>=6&&!_1(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=_5(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*!!_1(e):30}class _6{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/_0*19+234)/235)+1,a=_3(t),o=Math.floor(n-a);for(;o<1;)o=Math.floor(n-(a=_3(--t)));let r=1,i=0;for(;i<o;)i+=_4(t,r),r++;let s=o-(i-=_4(t,--r));return new bN(this,t,r,s)}toJulianDay(e){let n=_3(e.year);for(let t=1;t<e.month;t++)n+=_4(e.year,t);return n+e.day+347997}getDaysInMonth(e){return _4(e.year,e.month)}getMonthsInYear(e){return _1(e.year)?13:12}getDaysInYear(e){return _5(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(_1(n.year)&&!_1(e.year)&&n.month>6?e.month--:!_1(n.year)&&_1(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class _8 extends bh{fromJulianDay(e){let n,t,a,o=super.fromJulianDay(e),r=o.year-78,i=e-bp(o.era,o.year,1,1);if(i<80?(r--,i+=(n=bu(o.year-1)?31:30)+155+90+10):(n=bu(o.year)?31:30,i-=80),i<n)t=1,a=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,a=e%31+1):(e-=155,t=Math.floor(e/30)+7,a=e%30+1)}return new bN(this,r,t,a)}toJulianDay(e){let n,t,[a,o]=bf(e.year+78);return(bu(o)?(n=31,t=bp(a,o,3,21)):(n=30,t=bp(a,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&&bu(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 _7(e,n,t,a){return a+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function _9(e,n,t){let a=Math.floor((30*(t-n)+10646)/10631),o=Math.min(12,Math.ceil((t-(29+_7(n,a,1,1)))/29.5)+1),r=t-_7(n,a,o,1)+1;return new bN(e,a,o,r)}function ve(e){return(14+11*e)%30<11}class vn{fromJulianDay(e){return _9(this,1948440,e)}toJulianDay(e){return _7(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&ve(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return ve(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vt extends vn{fromJulianDay(e){return _9(this,1948439,e)}toJulianDay(e){return _7(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function va(e){return 460322+c[e-1300]}function vo(e,n){return(l[e-1300]&1<<11-(n-1))==0?29:30}function vr(e,n){let t=va(e);for(let a=1;a<n;a++)t+=vo(e,a);return t}function vi(e){return c[e+1-1300]-c[e-1300]}class vs extends vn{fromJulianDay(e){let n=e-1948440,t=va(1300),a=va(1600);if(n<t||n>a)return super.fromJulianDay(e);{let e=1299,t=1,a=1;for(;a>0;){a=n-va(++e)+1;let o=vi(e);if(a===o){t=12;break}if(a<o){let n=vo(e,t);for(t=1;a>n;)a-=n,n=vo(e,++t);break}}return new bN(this,e,t,n-vr(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vr(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vo(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vi(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+=vo(n,t)}}}}let vl=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vc=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vp=[1867,1911,1925,1988,2018],vu=["meiji","taisho","showa","heisei","reiwa"];function vd(e){let n=vl.findIndex(([n,t,a])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<a));return -1===n?vl.length-1:0===n?0:n-1}function vf(e){let n=vp[vu.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new bN(e.year+n,e.month,e.day)}class vm extends bh{fromJulianDay(e){let n=super.fromJulianDay(e),t=vd(n);return new bN(this,vu[t],n.year-vp[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(vf(e))}balanceDate(e){let n=vf(e),t=vd(n);vu[t]!==e.era&&(e.era=vu[t],e.year=n.year-vp[t]),this.constrainDate(e)}constrainDate(e){let n=vu.indexOf(e.era),t=vc[n];if(null!=t){let[a,o,r]=t,i=a-vp[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(r,e.day)))}if(1===e.year&&n>=0){let[,t,a]=vl[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(a,e.day))}}getEras(){return vu}getYearsInEra(e){let n=vu.indexOf(e.era),t=vl[n],a=vl[n+1];if(null==a)return 9999-t[0]+1;let o=a[0]-t[0];return(e.month<a[1]||e.month===a[1]&&e.day<a[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vf(e))}getMinimumMonthInYear(e){let n=vh(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=vh(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vh(e){if(1===e.year)return vl[vu.indexOf(e.era)]}let vg=[0,31,62,93,124,155,186,216,246,276,306,336];class vy{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),a=n-(365*(t-1)+Math.floor((8*t+21)/33)),o=a<216?Math.floor(a/31):Math.floor((a-6)/30),r=a-vg[o]+1;return new bN(this,t,o+1,r)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=vg[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>bc(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vb(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function v_(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class vv extends bh{fromJulianDay(e){let n=super.fromJulianDay(e),[t,a]=v_(bd(n.era,n.year));return new bN(this,t,a,n.month,n.day)}toJulianDay(e){return super.toJulianDay(v$(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=v_(vb(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(v$(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function v$(e){let[n,t]=bf(vb(e));return new bN(n,t,e.month,e.day)}function vA(e){switch(e){case"buddhist":return new _U;case"ethiopic":return new _Z;case"ethioaa":return new _X;case"coptic":return new _Q;case"hebrew":return new _6;case"indian":return new _8;case"islamic-civil":return new vn;case"islamic-tbla":return new vt;case"islamic-umalqura":return new vs;case"japanese":return new vm;case"persian":return new vy;case"roc":return new vv;default:return new bh}}function vk(e,n,t){return null!=n&&0>e.compare(n)||null!=t&&e.compare(t)>0}function vw(e,n,t,a,o){let r={};for(let e in n)r[e]=Math.floor(n[e]/2),r[e]>0&&n[e]%2==0&&r[e]--;let i=vx(e,n,t).subtract(r);return vE(e,i,n,t,a,o)}function vx(e,n,t,a,o){let r=e;if(n.years)r=_a(e.subtract({months:e.month-1}));else n.months?r=_a(e):n.weeks&&(r=_r(e,t));return vE(e,r,n,t,a,o)}function vC(e,n,t,a,o){let r={...n};r.days?r.days--:r.weeks?r.weeks--:r.months?r.months--:r.years&&r.years--;let i=vx(e,n,t).subtract(r);return vE(e,i,n,t,a,o)}function vE(e,n,t,a,o,r){if(o&&e.compare(o)>=0){let e=_l(n,vx(bX(o),t,a));e&&(n=e)}if(r&&0>=e.compare(r)){let e=_s(n,vC(bX(r),t,a));e&&(n=e)}return n}function vS(e,n,t){if(n){let t=_l(e,bX(n));t&&(e=t)}if(t){let n=_s(e,bX(t));n&&(e=n)}return e}function vD(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 vM(e,n,t){let[a,o]=(0,u8.useState)(e||n),r=(0,u8.useRef)(void 0!==e),i=void 0!==e;(0,u8.useEffect)(()=>{r.current,r.current=i},[i]);let s=i?e:a,l=(0,u8.useCallback)((e,...n)=>{let a=(e,...n)=>{t&&!Object.is(s,e)&&t(e,...n),i||(s=e)};"function"==typeof e?o((t,...o)=>{let r=e(i?s:t,...o);return(a(r,...n),i)?t:r}):(i||o(e),a(e,...n))},[i,s,t]);return[s,l]}function vz(e){var n,t,a;let o=(0,u8.useMemo)(()=>new __(e.locale),[e.locale]),r=(0,u8.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:p,selectionAlignment:u,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,u8.useMemo)(()=>s(r.calendar),[s,r.calendar]),[g,y]=vM(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),b=(0,u8.useMemo)(()=>g?b0(bX(g),h):null,[g,h]),v=(0,u8.useMemo)(()=>g&&"timeZone"in g?g.timeZone:r.timeZone,[g,r.timeZone]),[$,A]=vM((0,u8.useMemo)(()=>e.focusedValue?vS(b0(bX(e.focusedValue),h),c,p):void 0,[e.focusedValue,h,c,p]),(0,u8.useMemo)(()=>vS(e.defaultFocusedValue?b0(bX(e.defaultFocusedValue),h):b||b0(b7(v),h),c,p),[e.defaultFocusedValue,b,v,h,c,p]),e.onFocusChange),[k,w]=(0,u8.useState)(()=>{switch(u){case"start":return vx($,l,i,c,p);case"end":return vC($,l,i,c,p);default:return vw($,l,i,c,p)}}),[x,C]=(0,u8.useState)(e.autoFocus||!1),E=(0,u8.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,k.add(e)},[k,l]),[S,D]=(0,u8.useState)(h);if(!b5(h,S)){let e=b0($,h);w(vw(e,l,i,c,p)),A(e),D(h)}function M(e){A(e=vS(e,c,p))}function z(n){if(!e.isDisabled&&!e.isReadOnly){let e=n;if(null===e)return void y(null);(e=vD(e=vS(e,c,p),k,d))&&(e=b0(e,(null==g?void 0:g.calendar)||new bh),g&&"hour"in g?y(g.set(e)):y(e))}}vk($,c,p)?A(vS($,c,p)):0>$.compare(k)?w(vC($,l,i,c,p)):$.compare(E)>0&&w(vx($,l,i,c,p));let O=(0,u8.useMemo)(()=>!!b&&(!!(d&&d(b))||vk(b,c,p)),[b,d,c,p]),P=e.isInvalid||"invalid"===e.validationState||O,T=(0,u8.useMemo)(()=>"visible"===f?l:vO(l),[f,l]);return{isDisabled:null!=(t=e.isDisabled)&&t,isReadOnly:null!=(a=e.isReadOnly)&&a,value:b,setValue:z,visibleRange:{start:k,end:E},minValue:c,maxValue:p,focusedDate:$,timeZone:v,validationState:P?"invalid":null,isValueInvalid:P,setFocusedDate(e){M(e),C(!0)},focusNextDay(){M($.add({days:1}))},focusPreviousDay(){M($.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&M($.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&M($.subtract({weeks:1}))},focusNextPage(){let e=k.add(T);A(vS($.add(T),c,p)),w(vx(vE($,e,T,i,c,p),T,i))},focusPreviousPage(){let e=k.subtract(T);A(vS($.subtract(T),c,p)),w(vx(vE($,e,T,i,c,p),T,i))},focusSectionStart(){l.days?M(k):l.weeks?M(_r($,i)):(l.months||l.years)&&M(_a($))},focusSectionEnd(){l.days?M(E):l.weeks?M(_r($,i,void 0).add({days:6})):(l.months||l.years)&&M(_o($))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?M($.add({months:1})):(l.months||l.years)&&M($.add({years:1})):M($.add(vO(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?M($.subtract({months:1})):(l.months||l.years)&&M($.subtract({years:1})):M($.subtract(vO(l)))},selectFocusedDate(){d&&d($)||z($)},selectDate(e){z(e)},isFocused:x,setFocused:C,isInvalid:e=>vk(e,c,p),isSelected(e){return null!=b&&b2(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&$&&b2(e,$),isCellDisabled(n){return e.isDisabled||0>n.compare(k)||n.compare(E)>0||this.isInvalid(n)},isCellUnavailable:n=>!!e.isDateUnavailable&&e.isDateUnavailable(n),isPreviousVisibleRangeInvalid(){let e=k.subtract({days:1});return b2(e,k)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return b2(e,E)||this.isInvalid(e)},getDatesInWeek(e,n=k){let t=n.add({weeks:e}),a=[],o=b6(t=_r(t,i,m),i,m);for(let e=0;e<o;e++)a.push(null);for(;a.length<7;){a.push(t);let e=t.add({days:1});if(b2(t,e))break;t=e}for(;a.length<7;)a.push(null);return a}}}function vO(e){let n={...e};for(let t in e)n[t]=1;return n}function vP(e,n){return e&&n?(0>n.compare(e)&&([e,n]=[n,e]),{start:bX(e),end:bX(n)}):null}function vT(e,n){return(e=b0(e,(null==n?void 0:n.calendar)||new bh),n&&"hour"in n)?n.set(e):e}function vB(e,n,t){let a=e.add({days:t});for(;(t<0?a.compare(n.visibleRange.start)>=0:0>=a.compare(n.visibleRange.end))&&!n.isCellUnavailable(a);)a=a.add({days:t});if(n.isCellUnavailable(a))return a.add({days:-t})}let vI=(0,u8.createContext)(null),vN=(0,u8.createContext)(null),vj=(0,u8.createContext)(null),vR=(0,u8.createContext)(null),vF=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,vI);let{locale:t}=bs(),a=vz({...e,locale:t,createCalendar:e.createCalendar||vA}),{calendarProps:o,prevButtonProps:r,nextButtonProps:i,errorMessageProps:s,title:l}=_T(e,a),c=g$({...e,values:{state:a,isDisabled:e.isDisabled||!1,isInvalid:a.isValueInvalid},defaultClassName:"react-aria-Calendar"});return u7().createElement("div",{...c,...o,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":a.isValueInvalid||void 0},u7().createElement(gv,{values:[[y1,{slots:{previous:r,next:i}}],[y3,{"aria-hidden":!0,level:2,children:l}],[vj,a],[vI,e],[y5,{slots:{errorMessage:s}}]]},u7().createElement(_I,null,u7().createElement("h2",null,o["aria-label"])),c.children,u7().createElement(_I,null,u7().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>a.focusNextPage(),tabIndex:-1}))))}),vL=(0,u8.forwardRef)(function(e,n){var t,a;let o,r,i;[e,n]=gk(e,n,vN);let{locale:s}=bs(),l=function(e){let{value:n,defaultValue:t,onChange:a,createCalendar:o,locale:r,visibleDuration:i={months:1},minValue:s,maxValue:l,...c}=e,[p,u]=vM(n,t||null,a),[d,f]=(0,u8.useState)(null),m="center";if(p&&p.start&&p.end){let e=vw(bX(p.start),i,r,s,l).add(i).subtract({days:1});p.end.compare(e)>0&&(m="start")}let h=(0,u8.useRef)(null),[g,y]=(0,u8.useState)(null),b=(0,u8.useMemo)(()=>_l(s,null==g?void 0:g.start),[s,g]),v=(0,u8.useMemo)(()=>_s(l,null==g?void 0:g.end),[l,g]),$=vz({...c,value:p&&p.start,createCalendar:o,locale:r,visibleDuration:i,minValue:b,maxValue:v,selectionAlignment:m}),A=n=>{n&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vB(n,$,-1),end:vB(n,$,1)},y(h.current)):(h.current=null,y(null))},[k,w]=(0,u8.useState)($.visibleRange);b3($.visibleRange.start,k.start)&&b3($.visibleRange.end,k.end)||(A(d),w($.visibleRange));let x=e=>{e?(f(e),A(e)):(f(null),A(null))},C=d?vP(d,$.focusedDate):p&&vP(p.start,p.end),E=n=>{if(e.isReadOnly)return;let t=vD(vS(n,b,v),$.visibleRange.start,e.isDateUnavailable);if(t)if(d){let e=vP(d,t);e&&u({start:vT(e.start,null==p?void 0:p.start),end:vT(e.end,null==p?void 0:p.end)}),x(null)}else x(t)},[S,D]=(0,u8.useState)(!1),{isDateUnavailable:M}=e,z=(0,u8.useMemo)(()=>!!p&&!d&&(!!(M&&(M(p.start)||M(p.end)))||vk(p.start,s,l)||vk(p.end,s,l)),[M,p,d,s,l]),O=e.isInvalid||"invalid"===e.validationState||z;return{...$,value:p,setValue:u,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:O?"invalid":null,isValueInvalid:O,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)||vk(e,null==(n=h.current)?void 0:n.start,null==(t=h.current)?void 0:t.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||vA}),{calendarProps:c,prevButtonProps:p,nextButtonProps:u,errorMessageProps:d,title:f}=(t=e,a=n,o=_T(t,l),r=(0,u8.useRef)(!1),_N(i=(0,u8.useRef)("u">typeof window?window:null),"pointerdown",e=>{r.current=0===e.width&&0===e.height}),_N(i,"pointerup",e=>{if(r.current){r.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let n=e.target;a.current&&a.current.contains(document.activeElement)&&(!a.current.contains(n)||!n.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{a.current&&(e.relatedTarget&&a.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},_N(a,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=g$({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return u7().createElement("div",{...m,...c,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},u7().createElement(gv,{values:[[y1,{slots:{previous:p,next:u}}],[y3,{"aria-hidden":!0,level:2,children:f}],[vR,l],[vN,e],[y5,{slots:{errorMessage:d}}]]},u7().createElement(_I,null,u7().createElement("h2",null,c["aria-label"])),m.children,u7().createElement(_I,null,u7().createElement("button",{"aria-label":u["aria-label"],disabled:u.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),vW=(0,u8.createContext)(null),vG=(0,u8.forwardRef)(function(e,n){var t,a;let o=(0,u8.useContext)(vj),r=(0,u8.useContext)(vR),i=gA(vI),s=gA(vN),l=null!=o?o:r,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:m}=function(e,n){let t,{startDate:a=n.visibleRange.start,endDate:o=n.visibleRange.end,firstDayOfWeek:r}=e,{direction:i}=bs(),s=_M(a,o,n.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=_S.get(n),p=_P({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),u=_x({weekday:e.weekdayStyle||"narrow",timeZone:n.timeZone}),{locale:d}=bs(),f=(0,u8.useMemo)(()=>{let e=_r(b7(n.timeZone),d,r);return[...Array(7).keys()].map(t=>{let a=e.add({days:t}).toDate(n.timeZone);return u.format(a)})},[d,n.timeZone,u,r]),m=(t=a.calendar.getDaysInMonth(a),Math.ceil((b6(_a(a),d,r)+t)/7));return{gridProps:gb(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:m}}({startDate:c,endDate:_o(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:p},l);return u7().createElement(vW.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:m}},u7().createElement("table",{...gT(e),...u,ref:n,style:e.style,className:null!=(a=e.className)?a:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:u7().createElement(u7().Fragment,null,u7().createElement(vV,null,e=>u7().createElement(vU,null,e)),u7().createElement(vq,null,e.children))))}),vV=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e,{headerProps:r,weekDays:i}=(0,u8.useContext)(vW);return u7().createElement("thead",{...gT(e),...r,ref:n,style:a,className:o||"react-aria-CalendarGridHeader"},u7().createElement("tr",null,i.map((e,n)=>u7().cloneElement(t(e),{key:n}))))}),vU=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e;return u7().createElement("th",{...gT(e),ref:n,style:a,className:o||"react-aria-CalendarHeaderCell"},t)}),vq=(0,u8.forwardRef)(function(e,n){let{children:t,style:a,className:o}=e,r=(0,u8.useContext)(vj),i=(0,u8.useContext)(vR),s=null!=r?r:i,{startDate:l,weeksInMonth:c}=(0,u8.useContext)(vW);return u7().createElement("tbody",{...gT(e),ref:n,style:a,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>u7().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,n)=>e?u7().cloneElement(t(e),{key:n}):u7().createElement("td",{key:n})))))}),vH=(0,u8.forwardRef)(function({date:e,...n},t){var a,o,r;let i=(0,u8.useContext)(vj),s=(0,u8.useContext)(vR),l=null!=i?i:s,{startDate:c}=null!=(a=(0,u8.useContext)(vW))?a:{startDate:l.visibleRange.start},p=(0,u8.useRef)(null),{cellProps:u,buttonProps:d,...f}=function(e,n,t){var a;let o,{date:r,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=_S.get(n),c=_y((a=bl)&&a.__esModule?a.default:a,"@react-aria/calendar"),p=_x({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_D(r),timeZone:n.timeZone}),u=n.isSelected(r),d=n.isCellFocused(r);i=i||n.isCellDisabled(r);let f=n.isCellUnavailable(r),m=!i&&!f,h=n.isValueInvalid&&!!("highlightedRange"in n?!n.anchorDate&&n.highlightedRange&&r.compare(n.highlightedRange.start)>=0&&0>=r.compare(n.highlightedRange.end):n.value&&b2(n.value,r));h&&(u=!0),r=_w(r,b3);let g=(0,u8.useMemo)(()=>r.toDate(n.timeZone),[r,n.timeZone]),y=b2(r,b7(n.timeZone)),b=(0,u8.useMemo)(()=>{let e="";return"highlightedRange"in n&&n.value&&!n.anchorDate&&(b2(r,n.value.start)||b2(r,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&&b2(r,n.minValue)?e+=", "+c.format("minimumDate"):n.maxValue&&b2(r,n.maxValue)&&(e+=", "+c.format("maximumDate")),e},[p,g,c,u,y,r,n,l]),v="";"anchorDate"in n&&d&&!n.isReadOnly&&m&&(v=n.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let $=_F(v),A=(0,u8.useRef)(!1),k=(0,u8.useRef)(!1),w=(0,u8.useRef)(void 0),{pressProps:x,isPressed:C}=yy({shouldCancelOnPointerExit:"anchorDate"in n&&!!n.anchorDate,preventFocusOnPress:!0,isDisabled:!m||n.isReadOnly,onPressStart(e){if(n.isReadOnly)return void n.setFocusedDate(r);if("highlightedRange"in n&&!n.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(n.highlightedRange&&!h){if(b2(r,n.highlightedRange.start)){n.setAnchorDate(n.highlightedRange.end),n.setFocusedDate(r),n.setDragging(!0),k.current=!0;return}else if(b2(r,n.highlightedRange.end)){n.setAnchorDate(n.highlightedRange.start),n.setFocusedDate(r),n.setDragging(!0),k.current=!0;return}}let t=()=>{n.setDragging(!0),w.current=void 0,n.selectDate(r),n.setFocusedDate(r),A.current=!0};"touch"===e.pointerType?w.current=setTimeout(t,200):t()}},onPressEnd(){k.current=!1,A.current=!1,clearTimeout(w.current),w.current=void 0},onPress(){"anchorDate"in n||n.isReadOnly||(n.selectDate(r),n.setFocusedDate(r))},onPressUp(e){if(!n.isReadOnly&&("anchorDate"in n&&w.current&&(n.selectDate(r),n.setFocusedDate(r)),"anchorDate"in n))if(k.current)n.setAnchorDate(r);else if(n.anchorDate&&!A.current)n.selectDate(r),n.setFocusedDate(r);else if("keyboard"!==e.pointerType||n.anchorDate)"virtual"===e.pointerType&&(n.selectDate(r),n.setFocusedDate(r));else{n.selectDate(r);let e=r.add({days:1});n.isInvalid(e)&&(e=r.subtract({days:1})),n.isInvalid(e)||n.setFocusedDate(e)}}});i||(o=b2(r,n.focusedDate)?0:-1),(0,u8.useEffect)(()=>{d&&t.current&&(gW(t.current),"pointer"!==yw&&document.activeElement===t.current&&_G(t.current,{containingElement:_V(t.current)}))},[d,t]);let E=_x({day:"numeric",timeZone:n.timeZone,calendar:r.calendar.identifier}),S=(0,u8.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":u||void 0,"aria-invalid":h||void 0},buttonProps:gb(x,{onFocus(){i||n.setFocusedDate(r)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":b,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,$["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in n&&("touch"!==e.pointerType||n.isDragging)&&m&&n.highlightDate(r)},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>r.compare(n.visibleRange.start)||r.compare(n.visibleRange.end)>0,isInvalid:h,formattedDate:S}}({date:e},l,p),{hoverProps:m,isHovered:h}=yZ({...n,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=yq();y&&(y=f.isFocused);let b=(o=c,r=b0(r=e,o.calendar),o=_a(o),r=_a(r),o.era!==r.era||o.year!==r.year||o.month!==r.month),v=!1,$=!1;"highlightedRange"in l&&l.highlightedRange&&(v=b2(e,l.highlightedRange.start),$=b2(e,l.highlightedRange.end));let A=g$({...n,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:b,isFocusVisible:y,isSelectionStart:v,isSelectionEnd:$,...f}}),k={"data-focused":f.isFocused||void 0,"data-hovered":h||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 u7().createElement("td",{...u,ref:t},u7().createElement("div",{...gb(gT(n),d,g,m,k,A),ref:p}))}),vK=(0,u8.createContext)({}),vY=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,vK);let{isDisabled:o,isInvalid:r,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:m}=yq({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=r||(r=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=g$({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:r},defaultClassName:"react-aria-Group"});return u7().createElement("div",{...gb(c,m,p),...h,ref:n,role:null!=(t=e.role)?t:"group",slot:null!=(a=e.slot)?a: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":r||void 0},h.children)}),vJ=(0,u8.createContext)({}),vZ=yQ(function(e,n){[e,n]=gk(e,n,vJ);let{hoverProps:t,isHovered:a}=yZ(e),{isFocused:o,isFocusVisible:r,focusProps:i}=yq({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=g$({...e,values:{isHovered:a,isFocused:o,isFocusVisible:r,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return u7().createElement("input",{...gb((e=>{let{onHoverStart:n,onHoverChange:t,onHoverEnd:a,...o}=e;return o})(e),i,t),...l,ref:n,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":a||void 0,"data-focus-visible":r||void 0,"data-invalid":s||void 0})});var vX={};vX={"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 vQ=u7().createContext(null),v0="react-aria-focus-scope-restore",v1=null;function v2(e){var n,t,a,o,r,i,s,l,c,p;let u,d,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:b}=e,v=(0,u8.useRef)(null),$=(0,u8.useRef)(null),A=(0,u8.useRef)([]),{parentNode:k}=(0,u8.useContext)(vQ)||{},w=(0,u8.useMemo)(()=>new $s({scopeRef:A}),[A]);gt(()=>{let e=k||$l.root;if($l.getTreeNode(e.scopeRef)&&v1&&!v8(v1,e.scopeRef)){let n=$l.getTreeNode(v1);n&&(e=n)}e.addChild(w),$l.addNode(w)},[w,k]),gt(()=>{let e=$l.getTreeNode(A);e&&(e.contain=!!g)},[g]),gt(()=>{var e;let n=null==(e=v.current)?void 0:e.nextSibling,t=[],a=e=>e.stopPropagation();for(;n&&n!==$.current;)t.push(n),n.addEventListener(v0,a),n=n.nextSibling;return A.current=t,()=>{for(let e of t)e.removeEventListener(v0,a)}},[h]),gt(()=>{if(t||a)return;let e=n.current,o=gF(e?e[0]:void 0),r=e=>{let t=yp(e);v4(t,n.current)?v1=n:v6(t)||(v1=null)};return o.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{o.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[n=A,t=y,a=g]),o=A,r=g,u=(0,u8.useRef)(void 0),d=(0,u8.useRef)(void 0),gt(()=>{let e=o.current;if(!r){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let n=gF(e?e[0]:void 0),t=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!v5(o)||e.isComposing)return;let t=((e=document)=>e.activeElement)(n),a=o.current;if(!a||!v4(t,a))return;let r=$a(v3(a),{tabbable:!0},a);if(!t)return;r.currentNode=t;let i=e.shiftKey?r.previousNode():r.nextNode();i||(r.currentNode=e.shiftKey?a[a.length-1].nextElementSibling:a[0].previousElementSibling,i=e.shiftKey?r.previousNode():r.nextNode()),e.preventDefault(),i&&v7(i,!0)},a=e=>{(!v1||v8(v1,o))&&v4(yp(e),o.current)?(v1=o,u.current=yp(e)):v5(o)&&!v6(yp(e),o)?u.current?u.current.focus():v1&&v1.current&&$e(v1.current):v5(o)&&(u.current=yp(e))},i=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let t=yw,a=("virtual"===t||null===t)&&g3()&&g2(),r=((e=document)=>e.activeElement)(n);if(!a&&r&&v5(o)&&!v6(r,o)){v1=o;let n=yp(e);if(n&&n.isConnected){var i;u.current=n,null==(i=u.current)||i.focus()}else v1.current&&$e(v1.current)}})};return n.addEventListener("keydown",t,!1),n.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{n.removeEventListener("keydown",t,!1),n.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,r]),gt(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),i=A,s=y,l=g,f=(0,u8.useRef)("u">typeof document?((e=document)=>e.activeElement)(gF(i.current?i.current[0]:void 0)):null),gt(()=>{let e=i.current,n=gF(e?e[0]:void 0);if(!s||l)return;let t=()=>{(!v1||v8(v1,i))&&v4(((e=document)=>e.activeElement)(n),i.current)&&(v1=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]),gt(()=>{let e=gF(i.current?i.current[0]:void 0);if(!s)return;let n=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey||!v5(i)||n.isComposing)return;let t=e.activeElement;if(!v6(t,i)||!$n(i))return;let a=$l.getTreeNode(i);if(!a)return;let o=a.nodeToRestore,r=$a(e.body,{tabbable:!0});r.currentNode=t;let s=n.shiftKey?r.previousNode():r.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,a.nodeToRestore=void 0),(!s||!v6(s,i))&&o){r.currentNode=o;do s=n.shiftKey?r.previousNode():r.nextNode();while(v6(s,i));(n.preventDefault(),n.stopPropagation(),s)?v7(s,!0):v6(o)?v7(o,!0):t.blur()}};return l||e.addEventListener("keydown",n,!0),()=>{l||e.removeEventListener("keydown",n,!0)}},[i,s,l]),gt(()=>{var e;let n=gF(i.current?i.current[0]:void 0);if(!s)return;let t=$l.getTreeNode(i);if(t)return t.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=$l.getTreeNode(i);if(!e)return;let t=e.nodeToRestore,a=((e=document)=>e.activeElement)(n);if(s&&t&&(a&&v6(a,i)||a===n.body&&$n(i))){let e=$l.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=e.getTreeNode(i);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected)return void $t(n.nodeToRestore);n=n.parent}for(n=e.getTreeNode(i);n;){if(n.scopeRef&&n.scopeRef.current&&$l.getTreeNode(n.scopeRef))return void $t(v9(n.scopeRef.current,!0));n=n.parent}}})}}},[i,s]),c=A,p=b,m=u7().useRef(p),(0,u8.useEffect)(()=>{m.current&&(v1=c,!v4(((e=document)=>e.activeElement)(gF(c.current?c.current[0]:void 0)),v1.current)&&c.current&&$e(c.current)),m.current=!1},[c]),(0,u8.useEffect)(()=>{let e=((e=document)=>e.activeElement)(gF(A.current?A.current[0]:void 0)),n=null;if(v4(e,A.current)){for(let t of $l.traverse())t.scopeRef&&v4(e,t.scopeRef.current)&&(n=t);n===$l.getTreeNode(A)&&(v1=n.scopeRef)}},[A]),gt(()=>()=>{var e,n,t;let a=null!=(t=null==(n=$l.getTreeNode(A))||null==(e=n.parent)?void 0:e.scopeRef)?t:null;(A===v1||v8(A,v1))&&(!a||$l.getTreeNode(a))&&(v1=a),$l.removeTreeNode(A)},[A]);let x=(0,u8.useMemo)(()=>{var e;return e=A,{focusNext(n={}){var t;let a=e.current,{from:o,tabbable:r,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(gF(null!=(t=a[0])?t:void 0)),c=a[0].previousElementSibling,p=$a(v3(a),{tabbable:r,accept:s},a);p.currentNode=v4(l,a)?l:c;let u=p.nextNode();return!u&&i&&(p.currentNode=c,u=p.nextNode()),u&&v7(u,!0),u},focusPrevious(n={}){var t;let a=e.current,{from:o,tabbable:r,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(gF(null!=(t=a[0])?t:void 0)),c=a[a.length-1].nextElementSibling,p=$a(v3(a),{tabbable:r,accept:s},a);p.currentNode=v4(l,a)?l:c;let u=p.previousNode();return!u&&i&&(p.currentNode=c,u=p.previousNode()),u&&v7(u,!0),u},focusFirst(n={}){let t=e.current,{tabbable:a,accept:o}=n,r=$a(v3(t),{tabbable:a,accept:o},t);r.currentNode=t[0].previousElementSibling;let i=r.nextNode();return i&&v7(i,!0),i},focusLast(n={}){let t=e.current,{tabbable:a,accept:o}=n,r=$a(v3(t),{tabbable:a,accept:o},t);r.currentNode=t[t.length-1].nextElementSibling;let i=r.previousNode();return i&&v7(i,!0),i}}},[]),C=(0,u8.useMemo)(()=>({focusManager:x,parentNode:w}),[w,x]);return u7().createElement(vQ.Provider,{value:C},u7().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),h,u7().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))}function v3(e){return e[0].parentElement}function v5(e){let n=$l.getTreeNode(v1);for(;n&&n.scopeRef!==e;){if(n.contain)return!1;n=n.parent}return!0}function v4(e,n){return!!e&&!!n&&n.some(n=>n.contains(e))}function v6(e,n=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of $l.traverse($l.getTreeNode(n)))if(t&&v4(e,t.current))return!0;return!1}function v8(e,n){var t;let a=null==(t=$l.getTreeNode(n))?void 0:t.parent;for(;a;){if(a.scopeRef===e)return!0;a=a.parent}return!1}function v7(e,n=!1){if(null==e||n){if(null!=e)try{e.focus()}catch{}}else try{yF(e)}catch{}}function v9(e,n=!0){let t=e[0].previousElementSibling,a=v3(e),o=$a(a,{tabbable:n},e);o.currentNode=t;let r=o.nextNode();return n&&!r&&((o=$a(a=v3(e),{tabbable:!1},e)).currentNode=t,r=o.nextNode()),r}function $e(e,n=!0){v7(v9(e,n))}function $n(e){let n=$l.getTreeNode(v1);for(;n&&n.scopeRef!==e;){if(n.nodeToRestore)return!1;n=n.parent}return(null==n?void 0:n.scopeRef)===e}function $t(e){e.dispatchEvent(new CustomEvent(v0,{bubbles:!0,cancelable:!0}))&&v7(e)}function $a(e,n,t){var a,o,r;let i=(null==n?void 0:n.tabbable)?gR:gj,s=gF((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(a=e||s,o=NodeFilter.SHOW_ELEMENT,r={acceptNode(e){var a;return(null==n||null==(a=n.from)?void 0:a.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(n,t){return"#comment"!==n.nodeName&&function(e){let n=gL(e);if(!(e instanceof n.HTMLElement)&&!(e instanceof n.SVGElement))return!1;let{display:t,visibility:a}=e.style,o="none"!==t&&"hidden"!==a&&"collapse"!==a;if(o){let{getComputedStyle:n}=e.ownerDocument.defaultView,{display:t,visibility:a}=n(e);o="none"!==t&&"hidden"!==a&&"collapse"!==a}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||v4(e,t))&&(!(null==n?void 0:n.accept)||n.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(a,o,r));return(null==n?void 0:n.from)&&(l.currentNode=n.from),l}function $o(e,n={}){return{focusNext(t={}){let a=e.current;if(!a)return null;let{from:o,tabbable:r=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(gF(a)),c=$a(a,{tabbable:r,accept:s});a.contains(l)&&(c.currentNode=l);let p=c.nextNode();return!p&&i&&(c.currentNode=a,p=c.nextNode()),p&&v7(p,!0),p},focusPrevious(t=n){let a=e.current;if(!a)return null;let{from:o,tabbable:r=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(gF(a)),c=$a(a,{tabbable:r,accept:s});if(a.contains(l))c.currentNode=l;else{let e=$r(c);return e&&v7(e,!0),null!=e?e:null}let p=c.previousNode();if(!p&&i){c.currentNode=a;let e=$r(c);if(!e)return null;p=e}return p&&v7(p,!0),null!=p?p:null},focusFirst(t=n){let a=e.current;if(!a)return null;let{tabbable:o=n.tabbable,accept:r=n.accept}=t,i=$a(a,{tabbable:o,accept:r}).nextNode();return i&&v7(i,!0),i},focusLast(t=n){let a=e.current;if(!a)return null;let{tabbable:o=n.tabbable,accept:r=n.accept}=t,i=$r($a(a,{tabbable:o,accept:r}));return i&&v7(i,!0),null!=i?i:null}}}function $r(e){let n,t;do(n=e.lastChild())&&(t=n);while(n);return t}class $i{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,t){let a=this.fastMap.get(null!=n?n:null);if(!a)return;let o=new $s({scopeRef:e});a.addChild(o),o.parent=a,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&&v4(e.nodeToRestore,n.scopeRef.current)&&(e.nodeToRestore=n.nodeToRestore);let a=n.children;t&&(t.removeChild(n),a.size>0&&a.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 $i;for(let a of this.traverse())t.addTreeNode(a.scopeRef,null!=(n=null==(e=a.parent)?void 0:e.scopeRef)?n:null,a.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new $s({scopeRef:null}),this.fastMap.set(null,this.root)}}class $s{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 $l=new $i;function $c(e,n,t){let{direction:a}=bs(),o=(0,u8.useMemo)(()=>$o(n),[n]),r=()=>{var e;if(!n.current)return;let t=null==(e=window.event)?void 0:e.target,a=$a(n.current,{tabbable:!0});if(t&&(a.currentNode=t,t=a.previousNode()),!t){let e;do(e=a.lastChild())&&(t=e);while(e)}for(;null==t?void 0:t.hasAttribute("data-placeholder");){let e=a.previousNode();if(e&&e.hasAttribute("data-placeholder"))t=e;else break}t&&t.focus()},{pressProps:i}=yy({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&r()},onPress(e){"mouse"!==e.pointerType&&r()}});return gb(i,{onKeyDown:r=>{if(r.currentTarget.contains(r.target)&&(r.altKey&&("ArrowDown"===r.key||"ArrowUp"===r.key)&&"setOpen"in e&&(r.preventDefault(),r.stopPropagation(),e.setOpen(!0)),!t))switch(r.key){case"ArrowLeft":if(r.preventDefault(),r.stopPropagation(),"rtl"===a){if(n.current){let e=r.target,t=$p(n.current,e.getBoundingClientRect().left,-1);t&&t.focus()}}else o.focusPrevious();break;case"ArrowRight":if(r.preventDefault(),r.stopPropagation(),"rtl"===a){if(n.current){let e=r.target,t=$p(n.current,e.getBoundingClientRect().left,1);t&&t.focus()}}else o.focusNext()}}})}function $p(e,n,t){let a=$a(e,{tabbable:!0}),o=a.nextNode(),r=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-n,s=Math.abs(e);Math.sign(e)===t&&s<i&&(r=o,i=s),o=a.nextNode()}return r}function $u(e,n,t){let a=(0,u8.useRef)(n),o=ga(()=>{t&&t(a.current)});(0,u8.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 $d(e){let{description:n,errorMessage:t,isInvalid:a,validationState:o}=e,{labelProps:r,fieldProps:i}=function(e){let{id:n,label:t,"aria-labelledby":a,"aria-label":o,labelElementType:r="label"}=e;n=gh(n);let i=gh(),s={};return t&&(a=a?`${i} ${a}`:i,s={id:i,htmlFor:"label"===r?n:void 0}),{labelProps:s,fieldProps:_P({id:n,"aria-label":o,"aria-labelledby":a})}}(e),s=gg([!!n,!!t,a,o]),l=gg([!!n,!!t,a,o]);return{labelProps:r,fieldProps:i=gb(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function $f(e,n,t){let{validationBehavior:a,focus:o}=e;gt(()=>{if("native"===a&&(null==t?void 0:t.current)&&!t.current.disabled){var e;let a,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:(a=e.validity).badInput,customError:a.customError,patternMismatch:a.patternMismatch,rangeOverflow:a.rangeOverflow,rangeUnderflow:a.rangeUnderflow,stepMismatch:a.stepMismatch,tooLong:a.tooLong,tooShort:a.tooShort,typeMismatch:a.typeMismatch,valueMissing:a.valueMissing,valid:a.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let r=ga(()=>{n.resetValidation()}),i=ga(e=>{var a,r;n.displayValidation.isInvalid||n.commitValidation();let i=null==t||null==(a=t.current)?void 0:a.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==(r=t.current)||r.focus(),yw="keyboard",yM("keyboard",null)),e.preventDefault()}),s=ga(()=>{n.commitValidation()});(0,u8.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",r),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==n||n.removeEventListener("reset",r)}},[t,i,s,r,a])}let $m=new WeakMap,$h="__role_"+Date.now(),$g="__focusManager_"+Date.now();function $y(e,n,t){var a,o;let r,{isInvalid:i,validationErrors:s,validationDetails:l}=n.displayValidation,{labelProps:c,fieldProps:p,descriptionProps:u,errorMessageProps:d}=$d({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,u8.useRef)(null),{focusWithinProps:m}=yU({...e,onFocusWithin(t){var a;f.current=n.value,null==(a=e.onFocus)||a.call(e,t)},onBlurWithin:t=>{var a;n.confirmPlaceholder(),n.value!==f.current&&n.commitValidation(),null==(a=e.onBlur)||a.call(e,t)},onFocusWithinChange:e.onFocusChange}),h=_y((o=vX)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===n.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===n.maxGranularity?"time":"date",b=_F(n.value?h.format(g,{[y]:n.formatValue({month:"long"})}):""),v="presentation"===e[$h]?p["aria-describedby"]:[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[$g],A=(0,u8.useMemo)(()=>$||$o(t),[$,t]),k=$c(n,t,"presentation"===e[$h]);$m.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:A});let w=(0,u8.useRef)(e.autoFocus);r="presentation"===e[$h]?{role:"presentation"}:gb(p,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,u8.useEffect)(()=>{w.current&&A.focusFirst(),w.current=!1},[A]),$u(e.inputRef,n.value,n.setValue),$f({...e,focus(){A.focusFirst()}},n,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(a=n.value)?void 0:a.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=gT(e);return{labelProps:{...c,onClick:()=>{A.focusFirst()}},fieldProps:gb(C,r,k,m,{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 $b={};$b={"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 $_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$v={...$_,customError:!0,valid:!1},$$={isInvalid:!1,validationDetails:$_,validationErrors:[]},$A=(0,u8.createContext)({}),$k="__formValidationState"+Date.now();function $w(e){if(e[$k]){let{realtimeValidation:n,displayValidation:t,updateValidation:a,resetValidation:o,commitValidation:r}=e[$k];return{realtimeValidation:n,displayValidation:t,updateValidation:a,resetValidation:o,commitValidation:r}}return function(e){let{isInvalid:n,validationState:t,name:a,value:o,builtinValidation:r,validate:i,validationBehavior:s="aria"}=e;t&&(n||(n="invalid"===t));let l=void 0!==n?{isInvalid:n,validationErrors:[],validationDetails:$v}:null,c=(0,u8.useMemo)(()=>i&&null!=o?$C(function(e,n){if("function"==typeof e){let t=e(n);if(t&&"boolean"!=typeof t)return $x(t)}return[]}(i,o)):null,[i,o]);(null==r?void 0:r.validationDetails.valid)&&(r=void 0);let p=(0,u8.useContext)($A),u=(0,u8.useMemo)(()=>a?Array.isArray(a)?a.flatMap(e=>$x(p[e])):$x(p[a]):[],[p,a]),[d,f]=(0,u8.useState)(p),[m,h]=(0,u8.useState)(!1);p!==d&&(f(p),h(!1));let g=(0,u8.useMemo)(()=>$C(m?[]:u),[m,u]),y=(0,u8.useRef)($$),[b,v]=(0,u8.useState)($$),$=(0,u8.useRef)($$),[A,k]=(0,u8.useState)(!1);return(0,u8.useEffect)(()=>{if(!A)return;k(!1);let e=c||r||y.current;$E(e,$.current)||($.current=e,v(e))}),{realtimeValidation:l||g||c||r||$$,displayValidation:"native"===s?l||g||b:l||g||c||r||b,updateValidation(e){"aria"!==s||$E(b,e)?y.current=e:v(e)},resetValidation(){$E($$,$.current)||($.current=$$,v($$)),"native"===s&&k(!1),h(!0)},commitValidation(){"native"===s&&k(!0),h(!0)}}}(e)}function $x(e){return e?Array.isArray(e)?e:[e]:[]}function $C(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:$v}:null}function $E(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,a={...$_};for(let o of e){for(let e of o.validationErrors)n.add(e);for(let e in t||(t=o.isInvalid),a)a[e]||(a[e]=o.validationDetails[e])}return a.valid=!t,{isInvalid:t,validationErrors:[...n],validationDetails:a}}let $D=new _u((et=$b)&&et.__esModule?et.default:et);function $M(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function $z(e,n,t,a,o){let r=null!=e&&null!=t&&e.compare(t)>0,i=null!=e&&null!=n&&0>e.compare(n),s=null!=e&&(null==a?void 0:a(e))||!1,l=r||i||s,c=[];if(l){let e=$M(),a=new _m(e,_u.getGlobalDictionaryForPackage("@react-stately/datepicker")||$D),l=new __(e,$T({},o)),p=l.resolvedOptions().timeZone;i&&null!=n&&c.push(a.format("rangeUnderflow",{minValue:l.format(n.toDate(p))})),r&&null!=t&&c.push(a.format("rangeOverflow",{maxValue:l.format(t.toDate(p))})),s&&c.push(a.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:r,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let $O={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},$P={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function $T(e,n){var t;e={...n.shouldForceLeadingZeros?$P:$O,...e};let a=n.granularity||"minute",o=Object.keys(e),r=o.indexOf(null!=(t=n.maxGranularity)?t:"year");r<0&&(r=0);let i=o.indexOf(a);if(i<0&&(i=2),r>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(r,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"===a||"minute"===a||"second"===a)&&n.timeZone&&!n.hideTimeZone&&(s.timeZoneName="short"),n.showEra&&0===r&&(s.era="short"),s}function $B(e){return e&&"hour"in e?e:new bR}function $I(e,n){return null===e?null:e?b0(e,n):void 0}function $N(e,n,t,a){if(e)return $I(e,t);let o=b0(b8(null!=a?a:_t()).set({hour:0,minute:0,second:0,millisecond:0}),t);return"year"===n||"month"===n||"day"===n?bX(o):a?o:bQ(o)}function $j(e,n){let t=e&&"timeZone"in e?e.timeZone:void 0,a=e&&"minute"in e?"minute":"day";if(e&&n&&!(n in e))throw Error("Invalid granularity "+n+" for value "+e.toString());let[o,r]=(0,u8.useState)([a,t]);return e&&(o[0]!==a||o[1]!==t)&&r([a,t]),n||(n=e?a:o[0]),[n,e?t:o[1]]}let $R=new _u({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"),$F={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$L={year:5,month:2,day:7,hour:2,minute:15,second:15},$W={dayperiod:"dayPeriod"};function $G(e){var n,t;let{locale:a,createCalendar:o,hideTimeZone:r,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,m]=$j(d,e.granularity),h=m||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,u8.useMemo)(()=>new __(a),[a]),y=(0,u8.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[b,v]=vM(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),$=(0,u8.useMemo)(()=>{var e;return null!=(e=$I(b,y))?e:null},[b,y]),[A,k]=(0,u8.useState)(()=>$N(e.placeholderValue,f,y,m)),w="gregory"===y.identifier&&"BC"===($||A).era,x=(0,u8.useMemo)(()=>{var n;return{granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",timeZone:m,hideTimeZone:r,hourCycle:e.hourCycle,showEra:w,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,m,r,w]),C=(0,u8.useMemo)(()=>$T({},x),[x]),E=(0,u8.useMemo)(()=>new __(a,C),[a,C]),S=(0,u8.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,u8.useMemo)(()=>E.formatToParts(new Date).filter(e=>$F[e.type]).reduce((e,n)=>(e[n.type]=!0,e),{}),[E]),[M,z]=(0,u8.useState)(()=>e.value||e.defaultValue?{...D}:{}),O=(0,u8.useRef)(null),P=(0,u8.useRef)(y);(0,u8.useEffect)(()=>{b5(y,P.current)||(P.current=y,k(n=>Object.keys(M).length>0?b0(n,y):$N(e.placeholderValue,f,y,m)))},[y,f,M,m,e.placeholderValue]),b&&Object.keys(M).length<Object.keys(D).length&&z(M={...D}),null==b&&Object.keys(M).length===Object.keys(D).length&&(z(M={}),k($N(e.placeholderValue,f,y,m)));let T=$&&Object.keys(M).length>=Object.keys(D).length?$:A,B=n=>{if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(M),a=Object.keys(D);null==n?(v(null),k($N(e.placeholderValue,f,y,m)),z({})):t.length>=a.length||t.length===a.length-1&&D.dayPeriod&&!M.dayPeriod&&"dayPeriod"!==O.current?v(n=b0(n,(null==d?void 0:d.calendar)||new bh)):k(n),O.current=null},I=(0,u8.useMemo)(()=>T.toDate(h),[T,h]),N=(0,u8.useMemo)(()=>(function(e,n,t,a,o,r,i,s){let l=["hour","minute","second"],c=t.formatToParts(e),p=[];for(let e of c){var u,d;let t=$F[e.type];"era"===e.type&&1===r.getEras().length&&(t=!1);let c=$F[e.type]&&!n[e.type],f=$F[e.type]?(u=e.type,d=e.value,"era"===u||"dayPeriod"===u?d:"year"===u||"month"===u||"day"===u?$R.getStringForLocale(u,i):"––"):null,m={type:$W[e.type]||e.type,text:c?f:e.value,...$V(o,e.type,a),isPlaceholder:c,placeholder:f,isEditable:t};"hour"===e.type?(p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1}),p.push(m),e.type===s&&p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(p.push(m),p.push({type:"literal",text:"",...$V(o,"literal",a),isPlaceholder:!1,placeholder:"",isEditable:!1})):p.push(m)}return p})(I,M,E,S,T,y,a,f),[I,M,E,S,T,y,a,f]);D.era&&M.year&&!M.era?(M.era=!0,z({...M})):!D.era&&M.era&&(delete M.era,z({...M}));let j=e=>{M[e]=!0,"year"===e&&D.era&&(M.era=!0),z({...M})},R=(e,n)=>{if(M[e])B(function(e,n,t,a){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:a.hour12?12:24})}throw Error("Unknown segment: "+n)}(T,e,n,S));else{j(e);let n=Object.keys(M),t=Object.keys(D);(n.length>=t.length||n.length===t.length-1&&D.dayPeriod&&!M.dayPeriod)&&B(T)}},F=(0,u8.useMemo)(()=>$z(b,c,p,u,x),[b,c,p,u,x]),L=$w({...e,value:b,builtinValidation:F}),W=L.displayValidation.isInvalid,G=e.validationState||(W?"invalid":null);return{...L,value:$,dateValue:I,calendar:y,setValue:B,segments:N,dateFormatter:E,validationState:G,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,$L[e]||1)},decrementPage(e){R(e,-($L[e]||1))},setSegment(e,n){j(e),B(function(e,n,t,a){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,a=n>=12;if(t>=12===a)return e;return e.set({hour:a?n-12:n+12})}case"hour":if(a.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)}(T,e,n,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(M),t=Object.keys(D);n.length===t.length-1&&D.dayPeriod&&!M.dayPeriod&&(z(M={...D}),B(T.copy()))},clearSegment(n){delete M[n],O.current=n,z({...M});let t=$N(e.placeholderValue,f,y,m),a=T;if("dayPeriod"===n&&"hour"in T&&"hour"in t){let e=T.hour>=12,n=t.hour>=12;e&&!n?a=T.set({hour:T.hour-12}):!e&&n&&(a=T.set({hour:T.hour+12}))}else"hour"===n&&"hour"in T&&T.hour>=12&&M.dayPeriod?a=T.set({hour:t.hour+12}):n in T&&(a=T.set({[n]:t[n]}));v(null),B(a)},formatValue:e=>$?new __(a,$T(e,x)).format(I):"",getDateFormatter:(e,n)=>new __(e,$T({},{...x,...n}))}}function $V(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 $U=(0,u8.createContext)(null),$q=(0,u8.createContext)(null),$H=(0,u8.createContext)(null),$K=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)($q),a=(0,u8.useContext)($H);return t||a?u7().createElement($J,{...e,ref:n}):u7().createElement($Y,{...e,ref:n})}),$Y=(0,u8.forwardRef)((e,n)=>{let[t,a]=gk({slot:e.slot},n,$U),{locale:o}=bs(),r=$G({...t,locale:o,createCalendar:vA}),i=(0,u8.useRef)(null),{fieldProps:s,inputProps:l}=$y({...t,inputRef:i},r,a);return u7().createElement(gv,{values:[[$q,r],[vJ,{...l,ref:i}],[vK,{...s,ref:a,isInvalid:r.isInvalid,isDisabled:r.isDisabled}]]},u7().createElement($J,e))}),$J=(0,u8.forwardRef)((e,n)=>{let{className:t,children:a}=e,o=(0,u8.useContext)($q),r=(0,u8.useContext)($H),i=null!=o?o:r;return u7().createElement(u7().Fragment,null,u7().createElement(vY,{...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,u8.cloneElement)(a(e),{key:n}))),u7().createElement(vZ,null))}),$Z=(0,u8.createContext)({});function $X({children:e}){let n=(0,u8.useMemo)(()=>({register:()=>{}}),[]);return u7().createElement(ya.Provider,{value:n},e)}u7().forwardRef(({children:e,...n},t)=>{let a=(0,u8.useRef)(!1),o=(0,u8.useContext)(ya);t=ge(t||(null==o?void 0:o.ref));let r=gb(o||{},{...n,ref:t,register(){a.current=!0,o&&o.register()}});return ys(o,t),(0,u8.useEffect)(()=>{a.current||(a.current=!0)},[]),u7().createElement(ya.Provider,{value:r},e)});let $Q=u7().createContext(null);function $0(e){var n;let t=gd(),{portalContainer:a=t?null:document.body,isExiting:o}=e,[r,i]=(0,u8.useState)(!1),s=(0,u8.useMemo)(()=>({contain:r,setContain:i}),[r,i]),{getContainer:l}=null!=(n=(0,u8.useContext)($Z))?n:{};if(!e.portalContainer&&l&&(a=l()),!a)return null;let c=e.children;return e.disableFocusManagement||(c=u7().createElement(v2,{restoreFocus:!0,contain:(e.shouldContainFocus||r)&&!o},c)),c=u7().createElement($Q.Provider,{value:s},u7().createElement($X,null,c)),yf.createPortal(c,a)}let $1=(0,u8.createContext)(null),$2=(0,u8.createContext)(null),$3=(0,u8.forwardRef)(function(e,n){let t=e["aria-labelledby"];[e,n]=gk(e,n,$1);let{dialogProps:a,titleProps:o}=function(e,n){let t,a,{role:o="dialog"}=e,r=gg();r=e["aria-label"]?void 0:r;let i=(0,u8.useRef)(!1);return(0,u8.useEffect)(()=>{if(n.current&&!n.current.contains(document.activeElement)){yF(n.current);let e=setTimeout(()=>{document.activeElement===n.current&&(i.current=!0,n.current&&(n.current.blur(),yF(n.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[n]),gt(()=>{null==a||a(!0)},[a=null==(t=(0,u8.useContext)($Q))?void 0:t.setContain]),{dialogProps:{...gT(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}({...e,"aria-labelledby":t},n),r=(0,u8.useContext)($2);a["aria-label"]||a["aria-labelledby"]||e["aria-labelledby"]&&(a["aria-labelledby"]=e["aria-labelledby"]);let i=g$({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==r?void 0:r.close)||(()=>{})}});return u7().createElement("section",{...gT(e),...a,...i,ref:n,slot:e.slot||void 0},u7().createElement(gv,{values:[[y3,{slots:{[g_]:{},title:{...o,level:2}}}],[y1,{slots:{[g_]:{},close:{onPress:()=>null==r?void 0:r.close()}}}]]},i.children))}),$5=(0,u8.createContext)(null),$4=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)($5);return(null==t?void 0:t.isInvalid)?u7().createElement($6,{...e,ref:n}):null}),$6=(0,u8.forwardRef)((e,n)=>{let t=(0,u8.useContext)($5),a=gT(e),o=g$({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===t.validationErrors.length?void 0:t.validationErrors.join(" "),values:t});return null==o.children?null:u7().createElement(y4,{slot:"errorMessage",...a,...o,ref:n})}),$8=(0,u8.createContext)(null),$7=(0,u8.createContext)({}),$9=yQ(function(e,n){[e,n]=gk(e,n,$7);let{elementType:t="label",...a}=e;return u7().createElement(t,{className:"react-aria-Label",...a,ref:n})}),Ae=(0,u8.createContext)({placement:"bottom"}),An=new WeakMap,At=[];function Aa(e,n=-1/0,t=1/0){return Math.min(Math.max(e,n),t)}function Ao(e,n){let t=e,a=n.toString(),o=a.indexOf("."),r=o>=0?a.length-o:0;if(r>0){let e=Math.pow(10,r);t=Math.round(t*e)/e}return t}function Ar(e,n,t,a){n=Number(n),t=Number(t);let o=(e-(isNaN(n)?0:n))%a,r=Ao(2*Math.abs(o)>=a?e+Math.sign(o)*(a-Math.abs(o)):e-o,a);return isNaN(n)?!isNaN(t)&&r>t&&(r=Math.floor(Ao(t/a,a))*a):r<n?r=n:!isNaN(t)&&r>t&&(r=n+Math.floor(Ao((t-n)/a,a))*a),r=Ao(r,a)}let Ai={top:"top",bottom:"top",left:"left",right:"left"},As={top:"bottom",bottom:"top",left:"right",right:"left"},Al={top:"left",left:"top"},Ac={top:"height",left:"width"},Ap={width:"totalWidth",height:"totalHeight"},Au={},Ad="u">typeof document?window.visualViewport:null;function Af(e){var n,t,a,o,r;let i=0,s=0,l=0,c=0,p=0,u=0,d={},f=(null!=(n=null==Ad?void 0:Ad.scale)?n:1)>1;if("BODY"===e.tagName){let n=document.documentElement;l=n.clientWidth,c=n.clientHeight,i=null!=(t=null==Ad?void 0:Ad.width)?t:l,s=null!=(a=null==Ad?void 0:Ad.height)?a:c,d.top=n.scrollTop||e.scrollTop,d.left=n.scrollLeft||e.scrollLeft,Ad&&(p=Ad.offsetTop,u=Ad.offsetLeft)}else({width:i,height:s,top:p,left:u}=Ab(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=i,c=s;return g1()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,p=null!=(o=null==Ad?void 0:Ad.pageTop)?o:0,u=null!=(r=null==Ad?void 0:Ad.pageLeft)?r:0),{width:i,height:s,totalWidth:l,totalHeight:c,scroll:d,top:p,left:u}}function Am(e,n,t,a,o,r,i){var s;let l=null!=(s=o.scroll[e])?s:0,c=a[Ac[e]],p=a.scroll[Ai[e]]+r,u=c+a.scroll[Ai[e]]-r,d=n-l+i[e]-a[Ai[e]],f=n-l+t+i[e]-a[Ai[e]];return d<p?p-d:f>u?Math.max(u-f,p-d):0}function Ah(e){if(Au[e])return Au[e];let[n,t]=e.split(" "),a=Ai[n]||"right",o=Al[a];Ai[t]||(t="center");let r=Ac[a],i=Ac[o];return Au[e]={placement:n,crossPlacement:t,axis:a,crossAxis:o,size:r,crossSize:i},Au[e]}function Ag(e,n,t,a,o,r,i,s,l,c){var p,u,d,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:$}=a,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!=(m=t[$])?m:0)),A[b]+=r;let k=e[b]-t[$]+l+c,w=e[b]+e[$]-l-c;if(A[b]=Aa(A[b],k,w),h===y){let t=s?i[v]:n[Ap[v]];A[As[y]]=Math.floor(t-e[y]+o)}else A[y]=Math.floor(e[y]+e[v]+o);return A}function Ay(e,n,t,a,o,r){var i,s,l;let{placement:c,axis:p,size:u}=r;return c===p?Math.max(0,t[p]-e[p]-(null!=(i=e.scroll[p])?i:0)+n[p]-(null!=(s=a[p])?s:0)-a[As[p]]-o):Math.max(0,e[u]+e[p]+e.scroll[p]-n[p]-t[p]-t[u]-(null!=(l=a[p])?l:0)-a[As[p]]-o)}function Ab(e){let{top:n,left:t,width:a,height:o}=e.getBoundingClientRect(),{scrollTop:r,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:n+r-s,left:t+i-l,width:a,height:o}}function A_(e,n){let t,a=window.getComputedStyle(e);if("fixed"===a.position){let{top:n,left:a,width:o,height:r}=e.getBoundingClientRect();t={top:n,left:a,width:o,height:r}}else{t=Ab(e);let a=Ab(n),o=window.getComputedStyle(n);a.top+=(parseInt(o.borderTopWidth,10)||0)-n.scrollTop,a.left+=(parseInt(o.borderLeftWidth,10)||0)-n.scrollLeft,t.top-=a.top,t.left-=a.left}return t.top-=parseInt(a.marginTop,10)||0,t.left-=parseInt(a.marginLeft,10)||0,t}function Av(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 A$=new WeakMap;function AA(e){let{ref:n,box:t,onResize:a}=e;(0,u8.useEffect)(()=>{let e=null==n?void 0:n.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)};else{let n=new window.ResizeObserver(e=>{e.length&&a()});return n.observe(e,{box:t}),()=>{e&&n.unobserve(e)}}},[a,n,t])}let Ak="u">typeof document?window.visualViewport:null;function Aw(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 Ax=[],AC="u">typeof document&&window.visualViewport,AE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),AS=0;function AD(e,n,t){let a=e.style[n];return e.style[n]=t,()=>{e.style[n]=a}}function AM(e,n,t,a){return e.addEventListener(n,t,a),()=>{e.removeEventListener(n,t,a)}}function Az(e){let n=document.scrollingElement||document.documentElement,t=e;for(;t&&t!==n;){let e=_V(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let n=e.getBoundingClientRect().top,a=t.getBoundingClientRect().top;a>n+t.clientHeight&&(e.scrollTop+=a-n)}t=e.parentElement}}var AO={};function AP(e){var n;let{onDismiss:t,...a}=e,o=_P(a,_y((n=AO)&&n.__esModule?n.default:n,"@react-aria/overlays").format("dismiss"));return u7().createElement(_I,null,u7().createElement("button",{...o,tabIndex:-1,onClick:()=>{t&&t()},style:{width:1,height:1}}))}function AT(e,n,t){gt(()=>{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 a=!1;return Promise.all(n.map(e=>e.finished)).then(()=>{a||(0,yf.flushSync)(()=>{t()})}).catch(()=>{}),()=>{a=!0}}},[e,n,t])}function AB(e){let[n,t]=vM(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=(0,u8.useCallback)(()=>{t(!0)},[t]),o=(0,u8.useCallback)(()=>{t(!1)},[t]),r=(0,u8.useCallback)(()=>{t(!n)},[t,n]);return{isOpen:n,setOpen:t,open:a,close:o,toggle:r}}AO={"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 AI=(0,u8.createContext)(null),AN=(0,u8.createContext)(null),Aj=(0,u8.forwardRef)(function(e,n){[e,n]=gk(e,n,AI);let t=(0,u8.useContext)($2),a=AB(e),o=null==e.isOpen&&null==e.defaultOpen&&t?t:a,r=function(e,n){let[t,a]=(0,u8.useState)(n?"open":"closed");switch(t){case"open":n||a("exiting");break;case"closed":case"exiting":n&&a("open")}let o="exiting"===t;return AT(e,o,(0,u8.useCallback)(()=>{a(e=>"exiting"===e?"closed":e)},[])),o}(n,o.isOpen)||e.isExiting||!1,i=(0,u8.useContext)(yX),{direction:s}=bs();if(i){let n=e.children;return"function"==typeof n&&(n=n({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),u7().createElement(u7().Fragment,null,n)}return!o||o.isOpen||r?u7().createElement(AR,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:r,dir:s}):null});function AR({state:e,isExiting:n,UNSTABLE_portalContainer:t,...a}){var o,r;let i=(0,u8.useRef)(null),[s,l]=(0,u8.useState)(0),c=(0,u8.useRef)(null),u=(0,u8.useContext)(AN),d=u&&"SubmenuTrigger"===a.trigger;gt(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:m,arrowProps:h,placement:g}=function(e,n){let{triggerRef:t,popoverRef:a,groupRef:o,isNonModal:r,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:u,underlayProps:d}=function(e,n){let{onClose:t,shouldCloseOnBlur:a,isOpen:o,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,u8.useEffect)(()=>{if(o&&!Ax.includes(n))return Ax.push(n),()=>{let e=Ax.indexOf(n);e>=0&&Ax.splice(e,1)}},[o,n]);let l=()=>{Ax[Ax.length-1]===n&&t&&t()};!function(e){let{ref:n,onInteractOutside:t,isDisabled:a,onInteractOutsideStart:o}=e,r=(0,u8.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=ga(e=>{t&&Aw(e,n)&&(o&&o(e),r.current.isPointerDown=!0)}),s=ga(e=>{t&&t(e)});(0,u8.useEffect)(()=>{let e=r.current;if(a)return;let t=gF(n.current);if("u">typeof PointerEvent){let a=t=>{e.isPointerDown&&Aw(t,n)&&s(t),e.isPointerDown=!1};return t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerup",a,!0),()=>{t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerup",a,!0)}}},[n,a,i,s])}({ref:n,onInteractOutside:r&&o?e=>{(!s||s(e.target))&&(Ax[Ax.length-1]===n&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&Ax[Ax.length-1]===n&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=yU({isDisabled:!a,onBlurWithin:e=>{!(!e.relatedTarget||v6(e.relatedTarget,v1))&&(!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:!r||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:a),{overlayProps:f,arrowProps:m,placement:h}=function(e){var n,t,a;let{direction:o}=bs(),{arrowSize:r=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:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:b,arrowBoundaryOffset:v=0}=e,[$,A]=(0,u8.useState)(null),k=[h,c,s.current,i.current,l.current,p,u,d,f,m,g,o,b,v,r],w=(0,u8.useRef)(null==Ak?void 0:Ak.scale);(0,u8.useEffect)(()=>{g&&(w.current=null==Ak?void 0:Ak.scale)},[g]);let x=(0,u8.useCallback)(()=>{var e,n,t,a,y,$;if(!1===h||!g||!s.current||!i.current||!d||(null==Ak?void 0:Ak.scale)!==w.current)return;let k=null;if(l.current&&l.current.contains(document.activeElement)){let a=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(k={type:"top",offset:(null!=(n=null==a?void 0:a.top)?n:0)-o.top}).offset>o.height/2&&(k.type="bottom",k.offset=(null!=(t=null==a?void 0:a.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==(a=window.visualViewport)?void 0:a.height)?y:window.innerHeight)+"px");let C=function(e){var n,t,a,o;let r,{placement:i,targetNode:s,overlayNode:l,scrollNode:c,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:m,maxHeight:h,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&&!Av(n)&&(n=document.documentElement),null==n)for(n=e.parentElement;n&&!Av(n);)n=n.parentElement;return n||document.documentElement}(l):document.documentElement,v=b===document.documentElement,$=window.getComputedStyle(b).position,A=v?Ab(s):A_(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 k=Ab(l),w={top:parseInt((r=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(r.marginBottom,10)||0,left:parseInt(r.marginLeft,10)||0,right:parseInt(r.marginRight,10)||0};k.width+=(null!=(n=w.left)?n:0)+(null!=(t=w.right)?t:0),k.height+=(null!=(a=w.top)?a:0)+(null!=(o=w.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=Af(d),E=Af(b),S="BODY"===d.tagName?Ab(b):A_(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,n,t,a,o,r,i,s,l,c,p,u,d,f,m,h){var g,y,b,v,$,A,k,w,x,C,E,S,D,M;let z,O,P,T=Ah(e),{size:B,crossAxis:I,crossSize:N,placement:j,crossPlacement:R}=T,F=Ag(n,s,t,T,p,u,c,d,m,h),L=p,W=Ay(s,c,n,o,r+p,T);if(i&&a[B]>W){let e=Ah(`${As[j]} ${R}`),a=Ag(n,s,t,e,p,u,c,d,m,h);Ay(s,c,n,o,r+p,e)>W&&(T=e,F=a,L=p)}let G="bottom";"top"===T.axis?"top"===T.placement?G="top":"bottom"===T.placement&&(G="bottom"):"top"===T.crossAxis&&("top"===T.crossPlacement?G="bottom":"bottom"===T.crossPlacement&&(G="top"));let V=Am(I,F[I],t[N],s,l,r,c);F[I]+=V;let U=($=F,A=t.height,k=G,z=d?c.height:s[Ap.height],O=null!=$.top?c.top+$.top:c.top+(z-(null!=(w=$.bottom)?w:0)-A),P="top"!==k?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-O-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+r)):Math.max(0,O+A-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(M=o.bottom)?M:0)+r)),Math.min(s.height-2*r,P));f&&f<U&&(U=f),t.height=Math.min(t.height,U),V=Am(I,(F=Ag(n,s,t,T,L,u,c,d,m,h))[I],t[N],s,l,r,c),F[I]+=V;let q={},H=n[I]+.5*n[N]-F[I]-o[Ai[I]],K=m/2+h,Y="left"===Ai[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),J=t[N]-Y-m/2-h,Z=Aa(H,n[I]+m/2-(F[I]+o[Ai[I]]),n[I]+n[N]-m/2-(F[I]+o[Ai[I]]));return q[I]=Aa(Z,K,J),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:T.placement}}(i,A,k,x,w,p,u,C,E,S,f,m,!!$&&"static"!==$,h,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:m,maxHeight:b,arrowSize:r,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":"",k&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),n=l.current.getBoundingClientRect(),t=e[k.type]-n[k.type];l.current.scrollTop+=t-k.offset}A(C)}},k);gt(x,k),gt(()=>(window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}),[a=x]),AA({ref:s,onResize:x}),AA({ref:i,onResize:x});let C=(0,u8.useRef)(!1);gt(()=>{let e,n=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},t=()=>{C.current&&n()};return null==Ak||Ak.addEventListener("resize",n),null==Ak||Ak.addEventListener("scroll",t),()=>{null==Ak||Ak.removeEventListener("resize",n),null==Ak||Ak.removeEventListener("scroll",t)}},[x]);let E=(0,u8.useCallback)(()=>{C.current||null==y||y()},[y,C]);return!function(e){let{triggerRef:n,isOpen:t,onClose:a}=e;(0,u8.useEffect)(()=>{if(!t||null===a)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=a||A$.get(n.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[t,a,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:a,isOpen:n.isOpen,onClose:r&&!c?n.close:null});return!function(e={}){let{isDisabled:n}=e;gt(()=>{if(!n){let e,n,t,a;return 1==++AS&&(p=g0()?(t=null,a=gn(AM(document,"touchstart",t=>{((e=_V(t.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(n=AD(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),AM(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}),AM(document,"touchend",()=>{n&&n()},{passive:!1,capture:!0}),AM(document,"focus",e=>{var n;let a=e.target;((n=a)instanceof HTMLInputElement&&!AE.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable)&&((()=>{if(t)return;let e=window.pageXOffset,n=window.pageYOffset;t=gn(AM(window,"scroll",()=>{window.scrollTo(0,0)}),AD(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),AD(document.documentElement,"overflow","hidden"),AD(document.body,"marginTop",`-${n}px`),()=>{window.scrollTo(e,n)}),window.scrollTo(0,0)})(),a.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{a.style.transform="",AC&&(AC.height<window.innerHeight?requestAnimationFrame(()=>{Az(a)}):AC.addEventListener("resize",()=>Az(a),{once:!0}))}))},!0)),()=>{null==n||n(),null==t||t(),a()}):gn(AD(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),AD(document.documentElement,"overflow","hidden"))),()=>{0==--AS&&p()}}},[n])}({isDisabled:r||!n.isOpen}),gt(()=>{if(n.isOpen&&a.current){if(!r)return function(e,n=document.body){let t=new Set(e),a=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&&a.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&&r(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)r(e),e=o.nextNode()}},r=e=>{var n;let t=null!=(n=An.get(e))?n:0;("true"!==e.getAttribute("aria-hidden")||0!==t)&&(0===t&&e.setAttribute("aria-hidden","true"),a.add(e),An.set(e,t+1))};At.length&&At[At.length-1].disconnect(),o(n);let i=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&0!==n.addedNodes.length&&![...t,...a].some(e=>e.contains(n.target))){for(let e of n.removedNodes)e instanceof Element&&(t.delete(e),a.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:a,observe(){i.observe(n,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return At.push(s),()=>{for(let e of(i.disconnect(),a)){let n=An.get(e);null!=n&&(1===n?(e.removeAttribute("aria-hidden"),An.delete(e)):An.set(e,n-1))}s===At[At.length-1]?(At.pop(),At.length&&At[At.length-1].observe()):At.splice(At.indexOf(s),1)}}([null!=(t=null==o?void 0:o.current)?t:a.current]);var e,t,i=null!=(e=null==o?void 0:o.current)?e:a.current;let n=At[At.length-1];return n&&!n.visibleNodes.has(i)?(n.visibleNodes.add(i),()=>{n.visibleNodes.delete(i)}):void 0}},[r,n.isOpen,a,o]),{popoverProps:gb(u,f),arrowProps:m,underlayProps:d,placement:h}}({...a,offset:null!=(o=a.offset)?o:8,arrowSize:s,groupRef:d?u:c},e),y=a.popoverRef,b=function(e,n=!0){let[t,a]=(0,u8.useState)(!0),o=t&&n;return gt(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let n of e.current.getAnimations())n instanceof CSSTransition&&n.cancel()},[e,o]),AT(e,o,(0,u8.useCallback)(()=>a(!1),[])),o}(y,!!g)||a.isEntering||!1,v=g$({...a,defaultClassName:"react-aria-Popover",values:{trigger:a.trigger||null,placement:g,isEntering:b,isExiting:n}}),$=!a.isNonModal||"SubmenuTrigger"===a.trigger,[A,k]=(0,u8.useState)(!1);gt(()=>{y.current&&k($&&!y.current.querySelector("[role=dialog]"))},[y,$]),(0,u8.useEffect)(()=>{A&&y.current&&!y.current.contains(document.activeElement)&&yF(y.current)},[A,y]);let w={...f.style,...v.style},x=u7().createElement("div",{...gb(gT(a),f),...v,role:A?"dialog":void 0,tabIndex:A?-1:void 0,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],ref:y,slot:a.slot||void 0,style:w,dir:a.dir,"data-trigger":a.trigger,"data-placement":g,"data-entering":b||void 0,"data-exiting":n||void 0},!a.isNonModal&&u7().createElement(AP,{onDismiss:e.close}),u7().createElement(Ae.Provider,{value:{...h,placement:g,ref:i}},v.children),u7().createElement(AP,{onDismiss:e.close}));return d?u7().createElement($0,{...a,shouldContainFocus:A,isExiting:n,portalContainer:null!=(r=null!=t?t:null==u?void 0:u.current)?r:void 0},x):u7().createElement($0,{...a,shouldContainFocus:A,isExiting:n,portalContainer:t},!a.isNonModal&&e.isOpen&&u7().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),u7().createElement("div",{ref:c,style:{display:"contents"}},u7().createElement(AN.Provider,{value:c},x)))}function AF(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let AL=(0,u8.createContext)(null),AW=(0,u8.createContext)(null),AG=(0,u8.createContext)(null),AV=(0,u8.createContext)(null),AU=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,AL);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",i=function(e){var n;let t=AB(e),[a,o]=vM(e.value,e.defaultValue||null,e.onChange),r=a||e.placeholderValue||null,[i,s]=$j(r,e.granularity),l=null!=a?a.toDate(null!=s?s:"UTC"):null,c="hour"===i||"minute"===i||"second"===i,p=null==(n=e.shouldCloseOnSelect)||n,[u,d]=(0,u8.useState)(null),[f,m]=(0,u8.useState)(null);if(a&&(u=a,"hour"in a&&(f=a)),r&&!(i in r))throw Error("Invalid granularity "+i+" for value "+r.toString());let h=(null==a?void 0:a.calendar.identifier)==="gregory"&&"BC"===a.era,g=(0,u8.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:b,isDateUnavailable:v}=e,$=(0,u8.useMemo)(()=>$z(a,y,b,v,g),[a,y,b,v,g]),A=$w({...e,value:a,builtinValidation:$}),k=A.displayValidation.isInvalid,w=e.validationState||(k?"invalid":null),x=(e,n)=>{o("timeZone"in n?n.set(bX(e)):bQ(e,n)),d(null),m(null),A.commitValidation()};return{...A,value:a,setValue:o,dateValue:u,timeValue:f,setDateValue:n=>{let a="function"==typeof p?p():p;c?f||a?x(n,f||$B(e.defaultValue||e.placeholderValue)):d(n):(o(n),A.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{u&&e?x(u,e):m(e)},granularity:i,hasTime:c,...t,setOpen(n){!n&&!a&&u&&c&&x(u,f||$B(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:w,isInvalid:k,formatValue:(e,n)=>l?new __(e,$T(n,g)).format(l):"",getDateFormatter:(e,n)=>new __(e,$T({},{...g,...n}))}}({...e,validationBehavior:r}),s=(0,u8.useRef)(null),[l,c]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,fieldProps:d,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var a;let o=gh(),r=gh(),i=gh(),s=_y((a=vX)&&a.__esModule?a.default:a,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:p}=n.displayValidation,{labelProps:u,fieldProps:d,descriptionProps:f,errorMessageProps:m}=$d({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),h=$c(n,t),g=d["aria-labelledby"]||d.id,{locale:y}=bs(),b=n.formatValue(y,{month:"long"}),v=_F(b?s.format("selectedDateDescription",{date:b}):""),$=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=gT(e),k=(0,u8.useMemo)(()=>$o(t),[t]),w=(0,u8.useRef)(!1),{focusWithinProps:x}=yU({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(r);if(!(null==t?void 0:t.contains(n.relatedTarget))){var a,o;w.current=!1,null==(a=e.onBlur)||a.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!w.current){var t,a;w.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(a=e.onFocusChange)||a.call(e,!0)}}});return{groupProps:gb(A,h,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:()=>{k.focusFirst()}},fieldProps:{...d,id:i,[$h]:"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,[$k]:n,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:m,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:r,"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}}({...gx(e),label:c,validationBehavior:r},i,s),[v,$]=(0,u8.useState)(null),A=(0,u8.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);AA({ref:s,onResize:A});let{focusProps:k,isFocused:w,isFocusVisible:x}=yq({within:!0}),C=g$({...e,values:{state:i,isFocusWithin:w,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),E=gT(e);return delete E.id,u7().createElement(gv,{values:[[AG,i],[vK,{...p,ref:s,isInvalid:i.isInvalid}],[$U,d],[y1,{...f,isPressed:i.isOpen}],[$7,{...u,ref:l,elementType:"span"}],[vI,h],[$2,i],[AI,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[$1,m],[y5,{slots:{description:g,errorMessage:y}}],[$5,b]]},u7().createElement("div",{...k,...E,...C,ref:n,slot:e.slot||void 0,"data-focus-within":w||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}))}),Aq=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,AW);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",i=function(e){var n,t,a;let o=AB(e),[r,i]=vM(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,u8.useState)(()=>r||{start:null,end:null});null==r&&s.start&&s.end&&l(s={start:null,end:null});let c=r||s,p=e=>{l(e||{start:null,end:null}),AF(e)?i(e):i(null)},[u,d]=$j((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===u||"minute"===u||"second"===u,m=null==(a=e.shouldCloseOnSelect)||a,[h,g]=(0,u8.useState)(null),[y,b]=(0,u8.useState)(null);c&&AF(c)&&(h=c,"hour"in c.start&&(y=c));let v=(e,n)=>{p({start:"timeZone"in n.start?n.start.set(bX(e.start)):bQ(e.start,n.start),end:"timeZone"in n.end?n.end.set(bX(e.end)):bQ(e.end,n.end)}),g(null),b(null),D.commitValidation()},$=n=>{let t="function"==typeof m?m():m;f?AF(n)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?v(n,{start:(null==y?void 0:y.start)||$B(e.placeholderValue),end:(null==y?void 0:y.end)||$B(e.placeholderValue)}):g(n):AF(n)?(p(n),D.commitValidation()):g(n),t&&o.setOpen(!1)},A=e=>{AF(h)&&AF(e)?v(h,e):b(e)},k=(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,w=(0,u8.useMemo)(()=>({granularity:u,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:k}),[u,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,k]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,u8.useMemo)(()=>{var e,n;let t;return t=$S($z(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,w),$z(null!=(n=null==c?void 0:c.end)?n:null,x,C,E,w)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(t=$S(t,{isInvalid:!0,validationErrors:[(_u.getGlobalDictionaryForPackage("@react-stately/datepicker")||$D).getStringForLocale("rangeReversed",$M())],validationDetails:{...$_,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[c,x,C,E,w]),D=$w({...e,value:r,name:(0,u8.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),M=D.displayValidation.isInvalid,z=e.validationState||(M?"invalid":null);return{...D,value:c,setValue:p,dateRange:h,timeRange:y,granularity:u,hasTime:f,setDate(e,n){var t,a;"start"===e?$({start:n,end:null!=(t=null==h?void 0:h.end)?t:null}):$({start:null!=(a=null==h?void 0:h.start)?a:null,end:n})},setTime(e,n){var t,a;"start"===e?A({start:n,end:null!=(t=null==y?void 0:y.end)?t:null}):A({start:null!=(a=null==y?void 0:y.start)?a:null,end:n})},setDateTime(e,n){var t,a;"start"===e?p({start:n,end:null!=(t=null==c?void 0:c.end)?t:null}):p({start:null!=(a=null==c?void 0:c.start)?a:null,end:n})},setDateRange:$,setTimeRange:A,...o,setOpen(n){!n&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&AF(h)&&f&&v(h,{start:(null==y?void 0:y.start)||$B(e.placeholderValue),end:(null==y?void 0:y.end)||$B(e.placeholderValue)}),o.setOpen(n)},validationState:z,isInvalid:M,formatValue(n,t){let a;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,r=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=$T(t,{granularity:r,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 __(n,l);if(o===i&&r===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 a=e[t];if("shared"===a.source&&"literal"===a.type)n=t;else if("endRange"===a.source)break}let t="",a="";for(let o=0;o<e.length;o++)o<n?t+=e[o].value:o>n&&(a+=e[o].value);return{start:t,end:a}}catch{}a=d}else a=new __(n,$T(t,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(p),end:a.format(u)}},getDateFormatter:(e,n)=>new __(e,$T({},{...w,...n}))}}({...e,validationBehavior:r}),s=(0,u8.useRef)(null),[l,c]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,startFieldProps:d,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:b,...v}=function(e,n,t){var a,o,r,i,s,l;let c=_y((l=vX)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:p,validationErrors:u,validationDetails:d}=n.displayValidation,{labelProps:f,fieldProps:m,descriptionProps:h,errorMessageProps:g}=$d({...e,labelElementType:"span",isInvalid:p,errorMessage:e.errorMessage||u}),y=m["aria-labelledby"]||m.id,{locale:b}=bs(),v=n.formatValue(b,{month:"long"}),$=_F(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),A={"aria-label":c.format("startDate"),"aria-labelledby":y},k={"aria-label":c.format("endDate"),"aria-labelledby":y},w=gh(),x=gh(),C=$c(n,t),E=[$["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,u8.useMemo)(()=>$o(t,{accept:e=>e.id!==w}),[t,w]),D={[$g]:S,[$h]:"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},M=gT(e),z=(0,u8.useRef)(!1),{focusWithinProps:O}=yU({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(x);if(!(null==t?void 0:t.contains(n.relatedTarget))){var a,o;z.current=!1,null==(a=e.onBlur)||a.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!z.current){var t,a;z.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(a=e.onFocusChange)||a.call(e,!0)}}}),P=(0,u8.useRef)($$),T=(0,u8.useRef)($$);return{groupProps:gb(M,C,m,$,O,{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:w,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${w} ${y}`,"aria-describedby":E,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${w} ${y}`},startFieldProps:{...A,...D,value:null!=(i=null==(a=n.value)?void 0:a.start)?i:null,onChange:e=>n.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[$k]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){P.current=e,n.updateValidation($S(e,T.current))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},endFieldProps:{...k,...D,value:null!=(s=null==(o=n.value)?void 0:o.end)?s:null,onChange:e=>n.setDateTime("end",e),name:e.endName,[$k]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){T.current=e,n.updateValidation($S(P.current,e))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(r=n.dateRange)?void 0:r.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}}({...gx(e),label:c,validationBehavior:r},i,s),[$,A]=(0,u8.useState)(null),k=(0,u8.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);AA({ref:s,onResize:k});let{focusProps:w,isFocused:x,isFocusVisible:C}=yq({within:!0}),E=g$({...e,values:{state:i,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=gT(e);return delete S.id,u7().createElement(gv,{values:[[AV,i],[vK,{...p,ref:s,isInvalid:i.isInvalid}],[y1,{...m,isPressed:i.isOpen}],[$7,{...u,ref:l,elementType:"span"}],[vN,g],[$2,i],[AI,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":$}}],[$1,h],[$U,{slots:{start:d,end:f}}],[y5,{slots:{description:y,errorMessage:b}}],[$5,v]]},u7().createElement("div",{...w,...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 AH(e){return u7().createElement(bi,e)}function AK(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 bN||e instanceof bL||e instanceof bG)return n?b0(e,n):e;{let t=fB()(e).toDate(),a=new bN(t.getFullYear(),t.getMonth()+1,t.getDate());return n?b0(a,n):a}}function AY(e){if(e)return e.toDate(_t())}function AJ(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ea=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ea=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(e){return"en-US"}}(ea||"en-US"),AX=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},AQ={};for(let e=1;e<100;e++)AQ[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var A0={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},A1="[1234567890一二三四五六七八九〇\\d]",A2={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},A3={},A5={"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},A4={zone:A5,year:AQ,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:{}},A6={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(A5).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,}"},A8={...A6,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}"},A7={},A9=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(n=AZ){return A7[n.toLowerCase()]||(A7[n.toLowerCase()]=new e(n)),A7[n.toLowerCase()]}constructor(e=AZ){this.locale=e,this.lookups={...A4},this.vars={...A6};const 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,a=this.toInt(e);return a<12&&12===t&&(a+=12),12===a&&0===t&&(a=0),a}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,a]=n;return("-"===e||"−"===e?-1:1)*(60*this.toInt(t)+this.toInt(a||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=A2: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(A3[e])return A3[e];if("fullwide"===e||"hanidec"===e)return{group:A1,lookup:{...A2}};let n=A0[e];if(!n)return{group:"\\d",lookup:{...A2}};let t=String.fromCharCode(n),a=String.fromCharCode(n+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(n+e)]=e;return A3[e]={group:`[${t}-${a}]`,lookup:o},A3[e]}(this.numberingSystem);for(let t in this.lookups.digit=n,A8)A8.hasOwnProperty(t)&&(this.vars[t]=A8[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,a)=>{["","k","kuu","kuuta"].forEach((o,r)=>{e[t+o+(r<2?"\\.?":"")]=!0,n[t+o]=a+1})});else{let t=[],a=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 r=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=r.formatToParts(t[i]).find(a).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 r=0;r<12;r++){let i=o.formatToParts(t[r]).find(a).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,n[i]=r+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=[],a={};for(let o of["long","short"]){let r=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=r.formatToParts(e[i]).find(n).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),t.push(`${s}\\.?`)):t.push(s),a[s]=i}}this.vars.DAYNAME=t.join("|"),this.lookups.dayname=a}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],n=e=>"dayPeriod"===e.type,t=[],a={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let r=0;r<2;r++){let i=o.formatToParts(e[r]).find(n);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);t.push(s),a[s]=12*r}this.vars.MERIDIEM=t.join("|"),this.lookups.meridiem=a}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")}},ke=["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"],kn={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},kt=()=>new Date;function ka(e){return function(n){let t={};for(let a=0,o=e.length;a<o;a++){let o=e[a];o&&(t[o]=n[a])}return t}}var ko=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:n,patterns:t,formatter:a}){this.doneChecker=e,this.fallback=n,this.patterns=t,this.formatter=a}attempt(e){if("string"!=typeof e)return this.fallback(e);let n=e.trim(),t={},a=!1;for(let e of this.patterns){let o=n.match(e.regex);if(!o)continue;a=!0;let r=e.handler(o);if(r){for(let[e,n]of Object.entries(r))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 a?this.formatter(t):this.fallback(e)}},kr=["year","month","day","hour","minute","second","millisecond","offset"],ki={};function ks(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 kl=[[/([^\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"]],kc={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," "],...kl],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:kl,id:kl,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function kp(e,n=AZ){let t=function(e){if(!ki[e]){var n,t;let a,o,r=A9.factory(e);ki[e]=new ko({doneChecker:ks,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:(a=[{name:"timestampWithOffset",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:r.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:ka(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:r.compile(`^(${A1}{2,4})\\s*\u5E74\\s*(${A1}{1,2})\\s*\u6708\\s*(${A1}{1,2})\\s*\u65E5$`),handler:ka(["","year","month","day"])},{name:"korean",regex:r.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:ka(["","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:ka(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let n=kt(),t=e[0].toLowerCase(),a={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[t];0!==a&&n.setTime(n.getTime()+a);let o={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};return"now"===t?{...o,hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),millisecond:n.getMilliseconds()}:o}},{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,a]){n=parseFloat(n),"week"===(t=t.length<=2?kn[t]:(t=t.replace(/s$/,"")).toLowerCase())&&(t="day",n*=7),("-"===e||a)&&(n*=-1);let o=kt();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:r.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:ka(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:r.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:ka(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:r.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:ka(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:r.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","minute","second","meridiem"])},{name:"hms24",regex:r.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:ka(["","hour","minute","second","millisecond"])},{name:"hm12",regex:r.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","minute","meridiem"])},{name:"hm24",regex:r.compile("(_H24_):(_MIN_)"),handler:ka(["","hour","minute"])},{name:"h12",regex:r.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:ka(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:ka(["","year","month","day"])},{name:"yearMonthnameDay",regex:r.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:ka(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:r.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:ka(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:r.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:ka(["","monthname","day","","year"])},{name:"dayMonthname",regex:r.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:ka(["","day","","monthname"])},{name:"monthnameDay",regex:r.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:ka(["","monthname","day"])},{name:"hmsNoMeridiem",regex:r.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:ka(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:r.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:ka(["","hour","minute"])},{name:"ymd",regex:r.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:ka(["","year","","month","day"])},{name:"mdy",regex:r.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:ka(["","month","","day","year"])},{name:"dmy",regex:r.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:ka(["","day","month","year"])},{name:"yearLoose",regex:r.compile("_YEAR4_"),handler:ka(["year"])},{name:"dayMonthnameLoose",regex:r.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:ka(["","day","monthname"])},{name:"monthnameDayLoose",regex:r.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:ka(["","monthname","day"])},{name:"monthname",regex:r.compile("_MONTHNAME_"),handler:ka(["monthname"])},{name:"year4",regex:r.compile("_YEAR4_"),handler:ka(["year"])},{name:"md",regex:r.compile("(_MONTH_)[/-](_DAY_)"),handler:ka(["","month","day"])},{name:"dm",regex:r.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:ka(["","day","month"])},{name:"day",regex:r.compile("_DAY_"),handler:ka(["day"])},{name:"year2",regex:r.compile("_YEAR2_"),handler:ka(["year"])},{name:"onlyZone",regex:r.compile("_ZONE_"),handler:ka(["zone"])},{name:"onlyOffset",regex:r.compile("_OFFSET_"),handler:ka(["offset"])}],o=r.baseName.slice(0,5),ke.includes(o)?a:a.filter(e=>!["mdy","md"].includes(e.name))),formatter:(t=r,function(e){let n={};for(let[a,o]of Object.entries(e))if("monthname"===a){if(o){let e=t.monthNameToInt(o);void 0!==e&&(n.month=e)}}else if("hour"===a&&e.meridiem){let a=t.h12ToInt(o,e.meridiem);void 0!==a&&(n.hour=a)}else if("zone"===a){if(o){let e=t.zoneToOffset(o);void 0!==e&&(n.offset=e)}}else if("offset"===a){let e=t.offsetToMinutes(o);void 0!==e&&(n.offset=e)}else if("millisecond"===a){let e=t.millisecondToInt(o);"number"==typeof e&&(n.millisecond=e)}else if(kr.includes(a)){let e=t.toInt(o);"number"==typeof e&&(n[a]=e)}return n.year<100&&(n.year=AQ[n.year]),n.year&&"buddhist"===t.dateOptions.calendar&&(n.year-=543),n})})}return ki[e]}(n),a=function(e,n){let t=kc[n.slice(0,2).toLowerCase()];if(!t)return e;for(let[n,a]of t)e=e.replace(n,a);return e}(e,n);return t.attempt(a)}function ku(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let n=new AX(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 AX(n.valueOf()-60*e.offset*1e3):n}function kd(e,n=AZ){let t=kp(e,n),a=t.invalid?new AX(NaN):ku(t);return a.isValid()||(a.invalid=`Unable to parse date "${e}"`),a}function kf(e,n=AZ){return e instanceof Date?new AX(e.valueOf()):"number"==typeof e?new AX(e):kd(e,n)}Date.fromString=AX.fromString=kd,Date.fromAny=AX.fromAny=kf,"u">typeof window&&(window.anyDateParser={fromString:kd,fromAny:kf,fromObject:ku,attempt:kp});var km=t(5238),kh=t(83826);let kg=function(e){return null==e};function ky(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}fB().extend(fI),fB().extend(kh),fB().extend(km);let kb="YYYY-MM-DDTHH:mm:ss.SSSZZ";function k_(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fB()(e,kb).isValid()}function kv(e){return fB()(e).isToday()}function k$(e){return k_(e)?fB()(e,kb).toDate():null}function kA(e,n=!1){let t=fB()(e);return n&&(t=t.utc()),t.format(kb)}function kk(e){return fB()(e).toDate()}var kw=new WeakMap;let kx=new class{register(e,n){ky(this,kw).set(e,n)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let n=`${e.language}-${e.region}`;if(ky(this,kw).has(n))return ky(this,kw).get(n)}if(e.language&&ky(this,kw).has(e.language))return ky(this,kw).get(e.language);let n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return ky(this,kw).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,kw,{writable:!0,value:new Map})}};function kC(e,n){kx.register(e,n)}function kE(e){let n=e??AJ();return kx.getCalendar(n instanceof Intl.Locale?n:new Intl.Locale(n))}let kS={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function kD(e,n={}){let t=kp(e,AJ());if(t.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!kg(t.day)&&kg(t.month)&&(t=Object.assign({},nW(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},nW(t,"day"),{date:t.day}));let a=fB()().set(t).toDate();return kg(t.year)&&(n.year=!1),kg(t.month)&&(n.month=!1),kg(t.date)&&(n.day=!1),kM(a,n)}function kM(e,n){let t,a=n?.locale??AJ(),o=new Intl.Locale(a),{calendar:r,mode:i,time:s,day:l,month:c,year:p,noToday:u,numberingSystem:d}={...kS,...{noToday:"am"===o.language},...n},f={calendar:r??kE(o),year:p?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},m=fB()(e).isToday();if(m&&!u)t=(t=new Intl.RelativeTimeFormat(a,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(a)+t.slice(1);else{"en"===o.language&&(a="en-GB");let n=new Intl.DateTimeFormat(a,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&p&&l&&(n=n.map(kz("-"))),"wide"==i&&(n=n.map(kz(" — "))),"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||m&&"for today"===s)&&(t+=`, ${kO(e)}`),t}let kz=e=>(n,t,a)=>"literal"!==n.type||" "!==n.value||t<a.length-1&&"era"===a[t+1].type?n:{type:"literal",value:e};function kO(e){return e.toLocaleTimeString(AJ(),{hour:"2-digit",minute:"2-digit"})}function kP(e,n){return kM(e,{...n,time:!0})}function kT(e,n){let t=kE("string"==typeof n?new Intl.Locale(n):n);return t?b0(e,vA(t)):e}function kB(e,n){return new Intl.DurationFormat(AJ(),n).format(e)}function kI(e,n){if(null==e)return null;if("string"==typeof e){let t=kp(e,AJ());return t.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(t.day&&!t.month&&(t={...nW(t,"day"),...{month:t.day}}),t.month&&(t.month-=1),t.day&&(t={...nW(t,"day"),...{date:t.day}}),fB()(n).set(t))}return fB()(e)}let kN=["years","months","days","hours","minutes","seconds"],kj={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},kR={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function kF(e,n=fB()(),t){let a,o=fB()(n),r=kI(e,o);if(null==r)return null;if("string"==typeof t){let e=kj[t]??t;return{[e]:o.diff(r,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=t??{};if(void 0!==s||void 0!==l){let e,n=l?kj[l]??l:void 0;return e="auto"===s||void 0===s?function(e,n,t){let a=kN.indexOf(t);for(let o=0;o<kN.length;o++){let r=kN[o];if(n.diff(e,r)>0)return o<=a?r:t}return t}(r,o,n??"seconds"):kj[s]??s,function(e,n,t,a){let o=kN.indexOf(t),r=kN.indexOf(a),i=kN.slice(o,r+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}(r,o,e,n??e)}let c=(a=function(e){let n={...kR};if(e)for(let[t,a]of Object.entries(e))void 0!==a&&(n[kj[t]??t]=a);return n}(i),o.diff(r,"seconds")<a.seconds?"seconds":o.diff(r,"minutes")<a.minutes?"minutes":o.diff(r,"hours")<a.hours?"hours":o.diff(r,"days")<a.days?"days":o.diff(r,"months")<a.months?"months":"years");return{[c]:o.diff(r,c)}}let kL={style:"short",localeMatcher:"lookup"};function kW(e,n=fB()(),t){let a=kF(e,n,t);return null==a?null:kB(a,"object"==typeof t&&t.formatOptions?{...kL,...t.formatOptions}:kL)}let kG=(0,u8.createContext)(null);function kV(){let e=d1({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,n=(0,u8.useMemo)(()=>{let n=AJ();return e[n]&&(n=e[n]),n},[window.i18next.language]),t=(0,u8.useMemo)(()=>{let e=kE(n);return void 0!==e?vA(e):void 0},[n]),a=(0,u8.useMemo)(()=>new Intl.Locale(n,{calendar:t?.identifier}),[n,t]),o=(0,u8.useMemo)(()=>t?b0(b7(_t()),t):b7(_t()),[t]);return{calendar:t,intlLocale:a,today_:o}}let kU=new bN(1793,1,1);var kq={};function kH(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}kq={"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:"數字欄位"}};var kK=t(80137);function kY(e={}){let{locale:n}=bs();return(0,u8.useMemo)(()=>new(0,kK.K)(n,e),[n,e])}var kJ={};function kZ(e){var n;let t=(0,u8.useRef)(void 0),{value:a,textValue:o,minValue:r,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:p,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=_y((n=kJ)&&n.__esModule?n.default:n,"@react-aria/spinbutton");(0,u8.useEffect)(()=>()=>clearTimeout(t.current),[]);let y=(0,u8.useRef)(!1),b=()=>{y.current=!0},v=()=>{y.current=!1},$=""===o?g.format("Empty"):(o||`${a}`).replace("-","−");(0,u8.useEffect)(()=>{y.current&&(gE&&gE.clear("assertive"),gS($,"assertive"))},[$]);let A=ga(e=>{clearTimeout(t.current),null==p||p(),t.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===a||isNaN(a)||a<i)&&A(60)},e)}),k=ga(e=>{clearTimeout(t.current),null==d||d(),t.current=window.setTimeout(()=>{(void 0===r||isNaN(r)||void 0===a||isNaN(a)||a>r)&&k(60)},e)}),w=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=yl();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===a||isNaN(a)?void 0:a,"aria-valuetext":$,"aria-valuemin":r,"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":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{A(400),x(window,"contextmenu",w)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{k(400),x(window,"contextmenu",w)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v}}}kJ={"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:"空白"}};var kX=t(37120);function kQ(e,n,t){let a="+"===e?n+t:n-t;if(n%1!=0||t%1!=0){let o=n.toString().split("."),r=t.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,r[1]&&r[1].length||0));n=Math.round(n*i),t=Math.round(t*i),a=("+"===e?n+t:n-t)/i}return a}let k0=(0,u8.createContext)(null),k1=(0,u8.createContext)(null),k2=(0,u8.forwardRef)(function(e,n){var t,a;[e,n]=gk(e,n,k0);let{validationBehavior:o}=gA($8)||{},r=null!=(a=null!=(t=e.validationBehavior)?t:o)?a:"native",{locale:i}=bs(),s=function(e){let{minValue:n,maxValue:t,step:a,formatOptions:o,value:r,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:p}=e;null===r&&(r=NaN),void 0===r||isNaN(r)||(r=void 0===a||isNaN(a)?Aa(r,n,t):Ar(r,n,t,a)),isNaN(i)||(i=void 0===a||isNaN(a)?Aa(i,n,t):Ar(i,n,t,a));let[u,d]=vM(r,isNaN(i)?NaN:i,s),[f,m]=(0,u8.useState)(()=>isNaN(u)?"":new(0,kK.K)(l,o).format(u)),h=(0,u8.useMemo)(()=>new(0,kX.d)(l,o),[l,o]),g=(0,u8.useMemo)(()=>h.getNumberingSystem(f),[h,f]),y=(0,u8.useMemo)(()=>new(0,kK.K)(l,{...o,numberingSystem:g}),[l,o,g]),b=(0,u8.useMemo)(()=>y.resolvedOptions(),[y]),v=(0,u8.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),$=$w({...e,value:u}),A=void 0===a||isNaN(a)?1:a;"percent"===b.style&&(void 0===a||isNaN(a))&&(A=.01);let[k,w]=(0,u8.useState)(u),[x,C]=(0,u8.useState)(l),[E,S]=(0,u8.useState)(o);Object.is(u,k)&&l===x&&o===E||(m(v(u)),w(u),C(l),S(o));let D=(0,u8.useMemo)(()=>h.parse(f),[h,f]),M=(e,a=0)=>{if(isNaN(D))return Ar(isNaN(a)?0:a,n,t,A);{let a=Ar(D,n,t,A);return"+"===e&&a>D||"-"===e&&a<D?a:Ar(kQ(e,D,A),n,t,A)}},z=(0,u8.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===t||isNaN(t)||Ar(D,n,t,A)>D||kQ("+",D,A)<=t),[c,p,n,t,A,D]),O=(0,u8.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===n||isNaN(n)||Ar(D,n,t,A)<D||kQ("-",D,A)>=n),[c,p,n,t,A,D]);return{...$,validate:e=>h.isValidPartialNumber(e,n,t),increment:()=>{let e=M("+",n);e===u&&m(v(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=t&&(d(Ar(t,n,t,A)),$.commitValidation())},decrement:()=>{let e=M("-",t);e===u&&m(v(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=n&&(d(n),$.commitValidation())},canIncrement:z,canDecrement:O,minValue:n,maxValue:t,numberValue:D,setNumberValue:d,setInputValue:m,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),m(void 0===r?"":v(u));return}isNaN(D)?m(v(u)):(e=void 0===a||isNaN(a)?Aa(D,n,t):Ar(D,n,t,a),d(e=h.parse(v(e))),m(v(void 0===r?e:u)))}}}({...e,locale:i,validationBehavior:r}),l=(0,u8.useRef)(null),[c,p]=gw(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:u,groupProps:d,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var a,o;let r,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:p,isRequired:u,minValue:d,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:v,onKeyDown:$,onKeyUp:A,description:k,errorMessage:w,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:M,numberValue:z,inputValue:O,commit:P,commitValidation:T}=n,B=_y((o=kq)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=gh(i),{focusProps:N}=yL({onBlur(){P()}}),j=kY(g),R=(0,u8.useMemo)(()=>j.resolvedOptions(),[j]),F=kY({...g,currencySign:void 0}),L=(0,u8.useMemo)(()=>isNaN(z)?"":F.format(z),[F,z]),{spinButtonProps:W,incrementButtonProps:G,decrementButtonProps:V}=kZ({isDisabled:c,isReadOnly:p,isRequired:u,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:M,value:z,textValue:L}),[U,q]=(0,u8.useState)(!1),{focusWithinProps:H}=yU({isDisabled:c,onFocusWithinChange:q});!function(e,n){let{onScroll:t,isDisabled:a}=e,o=(0,u8.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t&&t({deltaX:e.deltaX,deltaY:e.deltaY}))},[t]);_N(n,"wheel",a?void 0:o)}({onScroll:(0,u8.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!=(a=R.maximumFractionDigits)?a:0)>0,Y=void 0===n.minValue||isNaN(n.minValue)||n.minValue<0,J="numeric";gX()?Y?J="text":K&&(J="decimal"):g3()&&(Y?J="numeric":K&&(J="decimal"));let Z=gT(e),X=(0,u8.useCallback)(e=>{"Enter"===e.key?(P(),T()):e.continuePropagation()},[P,T]),{isInvalid:Q,validationErrors:ee,validationDetails:en}=n.displayValidation,{labelProps:et,inputProps:ea,descriptionProps:eo,errorMessageProps:er}=function(e,n,t){let a=ga(e=>{let a=t.current;if(!a)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteContentForward":o=a.selectionEnd===a.selectionStart?a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd+1):a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteContentBackward":o=a.selectionEnd===a.selectionStart?a.value.slice(0,a.selectionStart-1)+a.value.slice(a.selectionStart):a.value.slice(0,a.selectionStart)+a.value.slice(a.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=a.value.slice(a.selectionStart);break;default:null!=e.data&&(o=a.value.slice(0,a.selectionStart)+e.data+a.value.slice(a.selectionEnd))}null!=o&&n.validate(o)||e.preventDefault()});(0,u8.useEffect)(()=>{if(!kH()||!t.current)return;let e=t.current;return e.addEventListener("beforeinput",a,!1),()=>{e.removeEventListener("beforeinput",a,!1)}},[t,a]);let o=kH()?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:r,inputProps:i,descriptionProps:s,errorMessageProps:l,...c}=function(e,n){let{inputElementType:t="input",isDisabled:a=!1,isRequired:o=!1,isReadOnly:r=!1,type:i="text",validationBehavior:s="aria"}=e,[l,c]=vM(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=yV(e,n),u=$w({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:m}=u.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:b}=$d({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=gT(e,{labelable:!0}),$={type:i,pattern:e.pattern};return $u(n,l,c),$f(e,u,n),(0,u8.useEffect)(()=>{if(n.current instanceof gL(n.current).HTMLTextAreaElement){let e=n.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[n]),{labelProps:h,inputProps:gb(v,"input"===t?$:void 0,{disabled:a,readOnly:r,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(u7().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:m}}(e,t),p=(0,u8.useRef)(null);return{inputProps:gb(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:n,selectionEnd:a}=t.current;p.current={value:e,selectionStart:n,selectionEnd:a}},onCompositionEnd(){if(t.current&&!n.validate(t.current.value)){let{value:e,selectionStart:a,selectionEnd:o}=p.current;t.current.value=e,t.current.setSelectionRange(a,o),n.setInputValue(e)}}}),labelProps:r,descriptionProps:s,errorMessageProps:l,...c}}({...C,...Z,name:void 0,label:h,autoFocus:m,isDisabled:c,isReadOnly:p,isRequired:u,validate:void 0,[$k]:n,value:O,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:J,onChange:e=>{n.validate(e)&&n.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:v,onKeyDown:(0,u8.useMemo)(()=>gn(X,$),[X,$]),onKeyUp:A,description:k,errorMessage:w},n,t);$u(t,n.numberValue,n.setNumberValue);let ei=gb(W,N,ea,{role:null,"aria-roledescription":g0()?null:B.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||(r=null!=e.label?et.id:e["aria-labelledby"]);let ec=gh(),ep=gh(),eu=gb(G,{"aria-label":l||B.format("increase",{fieldLabel:el}).trim(),id:r&&!l?ec:null,"aria-labelledby":r&&!l?`${ec} ${r}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canIncrement,onPressStart:es}),ed=gb(V,{"aria-label":s||B.format("decrease",{fieldLabel:el}).trim(),id:r&&!s?ep:null,"aria-labelledby":r&&!s?`${ep} ${r}`: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:er,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:en}}({...gx(e),label:p,validationBehavior:r},s,l),v=g$({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),$=gT(e);return delete $.id,u7().createElement(gv,{values:[[k1,s],[vK,d],[vJ,{...f,ref:l}],[$7,{...u,ref:c}],[y1,{slots:{increment:m,decrement:h}}],[y5,{slots:{description:g,errorMessage:y}}],[$5,b]]},u7().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&&u7().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function k3(e,n){return Number.parseInt(kM(e,{calendar:n.calendar,locale:n.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let k5=(0,u8.forwardRef)(function(e,n){let{className:t}=e,a=(0,u8.useContext)(vj),o=(0,u8.useContext)(vR),r=a??o,i=(0,u8.useContext)(kG),s=_t(),l=kM(r.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),c=k3(r.visibleRange.start.toDate(s),i),p=r.maxValue?k3(r.maxValue.toDate(s),i):void 0,u=r.minValue?k3(r.minValue.toDate(s),i):void 0,d=(0,u8.useCallback)(e=>{r.setFocusedDate(r.focusedDate.cycle("year",e-r.focusedDate.year))},[]);return r&&(0,fQ.jsxs)("span",{ref:n,className:t,children:[(0,fQ.jsx)("span",{children:l}),(0,fQ.jsxs)(k2,{formatOptions:{useGrouping:!1},maxValue:p,minValue:u,onChange:d,value:c,children:[(0,fQ.jsx)(vZ,{}),(0,fQ.jsxs)(vY,{children:[(0,fQ.jsx)(y2,{slot:"increment",children:(0,fQ.jsx)(mj,{size:8})}),(0,fQ.jsx)(y2,{slot:"decrement",children:(0,fQ.jsx)(mB,{size:8})})]})]})]})});var k4=t(74782),k6={};k6.styleTagTransform=ma(),k6.setAttributes=f9(),k6.insert=f8().bind(null,"head"),k6.domAPI=f4(),k6.insertStyleElement=mn(),f3()(k4.A,k6);let k8=k4.A&&k4.A.locals?k4.A.locals:void 0;function k7({children:e}){let n=(0,u8.useContext)(AG),t=(0,u8.useContext)(AV),a=n??t,o=fk(()=>a?.close());return(0,fQ.jsx)($3,{className:k8.dialog,ref:o,children:e})}let k9=(0,u8.forwardRef)(function({variant:e,today_:n,minDate:t,maxDate:a},o){let r="range"===e;return(0,fQ.jsx)(Aj,{ref:o,className:k8.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,fQ.jsx)(k7,{children:(0,fQ.jsxs)(r?vL:vF,{...r?{minValue:t,maxValue:a,className:"cds--date-picker__calendar"}:{},children:[(0,fQ.jsxs)("header",{className:k8.header,children:[(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,k8.flatButtonMd),slot:"previous",children:(0,fQ.jsx)(mU,{size:16})}),(0,fQ.jsx)(k5,{className:k8.monthYear}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,k8.flatButtonMd),slot:"next",children:(0,fQ.jsx)(mq,{size:16})})]}),(0,fQ.jsx)(vG,{className:k8.calendarGrid,children:e=>(0,fQ.jsx)(vH,{className:f1()("cds--date-picker__day",{[k8.today]:0===n.compare(e)}),date:e},e.toString())})]})})})}),we=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)(AG),[a,o]=gk({slot:e.slot},n,$U),{locale:r}=bs(),i=$G({...a,locale:r,createCalendar:vA}),s=(0,u8.useRef)(null),{fieldProps:l,inputProps:c}=$y({...a,inputRef:s},i,o),p=(0,u8.useCallback)(()=>{i.isDisabled||t.toggle()},[]);return(0,fQ.jsxs)(gv,{values:[[$q,i],[vJ,{...c,ref:s}],[vK,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fQ.jsx)(vY,{...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,u8.cloneElement)(e.children(n),{key:t}))}),(0,fQ.jsx)(vZ,{})]})}),wn=(0,u8.forwardRef)(function(e,n){let t=(0,u8.useContext)(AG),a=(0,u8.useContext)(AV);return(t??a).isInvalid?(0,fQ.jsx)(hZ,{ref:n,size:16,...e}):(0,fQ.jsx)(mT,{ref:n,size:16,...e})});class wt{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,n){this.locale=e,this.dictionary=n}}let wa=new Map,wo=(0,u8.forwardRef)(function({segment:e,...n},t){let a=(0,u8.useContext)($q),o=ge(t),{segmentProps:r}=function(e,n,t){let a,o,r,i,s=(0,u8.useRef)(""),{locale:l,direction:c}=bs(),p=function(){var e;let{locale:n}=bs(),t=_g((e=vX)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,u8.useMemo)(()=>{try{return new Intl.DisplayNames(n,{type:"dateTimeField"})}catch{return new wt(n,t)}},[n,t])}(),{ariaLabel:u,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:m}=$m.get(n),h=e.isPlaceholder?"":e.text,g=(0,u8.useMemo)(()=>n.dateFormatter.resolvedOptions(),[n.dateFormatter]),y=_x({month:"long",timeZone:g.timeZone}),b=_x({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=b.format(n.dateValue));else{let e=y.format(n.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:v}=kZ({value:e.value,textValue:h,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,u8.useMemo)(()=>new(0,kX.d)(l,{maximumFractionDigits:0}),[l]),A=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!$.isValidPartialNumber(e.text)||n.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&n.clearSegment(e.type);else{let t=e.text.slice(0,-1),a=$.parse(t);0===(t=0===a?"":t).length||0===a?n.clearSegment(e.type):n.setSegment(e.type,a),s.current=t}},{startsWith:k}=(a=function(e){let{locale:n}=bs(),t=n+(e?Object.entries(e).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(wa.has(t))return wa.get(t);let a=new Intl.Collator(n,e);return wa.set(t,a),a}({usage:"search",sensitivity:"base"}),o=(0,u8.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===a.compare(e.slice(0,n.length),n)),[a]),r=(0,u8.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===a.compare(e.slice(-n.length),n)),[a]),i=(0,u8.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 r=e.slice(t,t+o);if(0===a.compare(n,r))return!0}return!1},[a]),(0,u8.useMemo)(()=>({startsWith:o,endsWith:r,contains:i}),[o,r,i])),w=_x({hour:"numeric",hour12:!0}),x=(0,u8.useMemo)(()=>{let e=new Date;return e.setHours(0),w.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[w]),C=(0,u8.useMemo)(()=>{let e=new Date;return e.setHours(12),w.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[w]),E=_x({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,u8.useMemo)(()=>{if("era"!==e.type)return[];let t=b0(new bN(1,1,1),n.calendar),a=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}(a.map(e=>e.formatted));if(o)for(let e of a)e.formatted=e.formatted.slice(o);return a},[E,n.calendar,e.type]),D=t=>{if(n.isDisabled||n.isReadOnly)return;let a=s.current+t;switch(e.type){case"dayPeriod":if(k(x,t))n.setSegment("dayPeriod",0);else if(k(C,t))n.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=S.find(e=>k(e.formatted,t));e&&(n.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!$.isValidPartialNumber(a))return;let o=$.parse(a),r=o,i=0===e.minValue;if("hour"===e.type&&n.dateFormatter.resolvedOptions().hour12){switch(n.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(r=$.parse(t));break;case"h12":i=!1,o>12&&(r=$.parse(t))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(r=$.parse(t));if(isNaN(o))return;let l=0!==r||i;l&&n.setSegment(e.type,r),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||a.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=a}}};_N((0,u8.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 M=(0,u8.useRef)("");_N(t,"beforeinput",a=>{if(t.current)switch(a.preventDefault(),a.inputType){case"deleteContentBackward":case"deleteContentForward":$.isValidPartialNumber(e.text)&&!n.isReadOnly&&A();break;case"insertCompositionText":M.current=t.current.textContent,t.current.textContent=t.current.textContent;break;default:null!=a.data&&D(a.data)}}),_N(t,"input",e=>{let{inputType:n,data:a}=e;"insertCompositionText"===n&&(t.current&&(t.current.textContent=M.current),null!=a&&(k(x,a)||k(C,a))&&D(a))}),gt(()=>{let e=t.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[t,m]);let z=g0()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,u8.useMemo)(()=>n.segments.find(e=>e.isEditable),[n.segments])||n.isInvalid||(f=void 0);let O=gh(),P=!n.isDisabled&&!n.isReadOnly&&e.isEditable,T="literal"===e.type?"":p.of(e.type),B=_P({"aria-label":`${T}${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:gb(v,B,{id:O,...z,"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:P,suppressContentEditableWarning:P,spellCheck:P?"false":void 0,autoCorrect:P?"off":void 0,[parseInt(u7().version,10)>=17?"enterKeyHint":"enterkeyhint"]:P?"next":void 0,inputMode:n.isDisabled||"dayPeriod"===e.type||"era"===e.type||!P?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&&_G(t.current,{containingElement:_V(t.current)});let e=window.getSelection();null==e||e.collapse(t.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,a,o),{focusProps:i,isFocused:s,isFocusVisible:l}=yq(),{hoverProps:c,isHovered:p}=yZ({...n,isDisabled:a.isDisabled||"literal"===e.type}),u=function(e){let{className:n,style:t,children:a,defaultClassName:o,defaultChildren:r,defaultStyle:i,values:s}=e;return(0,u8.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 a?a({...s,defaultChildren:r}):null==a?r:a,{className:e??o,style:l||i?{...i,...l}:void 0,children:c??r,"data-rac":""}},[n,t,a,o,r,i,s])}({...n,values:{...e,isReadOnly:!e.isEditable,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isHovered:p,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,u8.useCallback)(e=>{e.stopPropagation()},[]);return(0,fQ.jsx)("span",{...gb(gT(n),r,i,c),...u,ref:o,style:r.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":a.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":a.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})}),wr={short:!1,size:"md"},wi=(0,u8.forwardRef)(function(e,n){let{className:t,defaultValue:a,isDisabled:o,invalid:r,invalidText:i,isInvalid:s,label:l,labelText:c,light:p,maxDate:u,minDate:d,onChange:f,onChangeRaw:m,short:h,size:g,value:y,...b}={...wr,...e},{calendar:v,intlLocale:$,today_:A}=kV(),k=(0,u8.useId)(),w=!!(c??l),x=(0,u8.useMemo)(()=>AK(a,v),[a,v]),C=(0,u8.useMemo)(()=>AK(y,v,!0),[y,v]),E=(0,u8.useMemo)(()=>AK(u,v),[u,v]),S=(0,u8.useMemo)(()=>AK(d??kU,v),[d,v]),D=(0,u8.useMemo)(()=>r||s,[r,s]),M=(0,u8.useMemo)(()=>(m&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>f?.(AY(e)))),[m,f]);return(0,fQ.jsx)(AH,{locale:$.toString(),children:(0,fQ.jsx)("div",{className:f1()("cds--form-item",t),children:(0,fQ.jsx)(gv,{values:[[kG,$]],children:(0,fQ.jsxs)(AU,{className:f1()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":p}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===$.language||void 0,...b,onChange:M,children:[(0,fQ.jsxs)("div",{className:"cds--date-picker-container",children:[w&&(0,fQ.jsx)($9,{className:f1()("cds--label",{"cds--label--disabled":o}),htmlFor:k,children:c??l}),(0,fQ.jsxs)(vY,{className:k8.inputGroup,children:[(0,fQ.jsx)(we,{id:w?k:void 0,ref:n,className:f1()("cds--date-picker-input__wrapper",k8.inputWrapper,{[k8.inputWrapperSm]:"sm"===g,[k8.inputWrapperMd]:"md"===g||!g||0===g.length,[k8.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e}):(0,fQ.jsx)(u7().Fragment,{})}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,{[k8.flatButtonSm]:"sm"===g,[k8.flatButtonMd]:"md"===g||!g||0===g.length,[k8.flatButtonLg]:"lg"===g}),children:(0,fQ.jsx)(wn,{})})]}),(0,fQ.jsx)($4,{className:k8.invalidText,children:i})]}),(0,fQ.jsx)(k9,{variant:"single",today_:A})]})})})})}),ws=(0,u8.forwardRef)(function({className:e,defaultValue:n,invalid:t,invalidText:a,isDisabled:o,isInvalid:r,label:i,labelText:s,light:l,maxDate:c,minDate:p,onChange:u,onChangeRaw:d,size:f="md",value:m,...h},g){let{calendar:y,intlLocale:b,today_:v}=kV(),$=(0,u8.useId)(),A=!!(s??i),k=(0,u8.useMemo)(()=>{if(m)return{start:AK(m[0],y,!1),end:AK(m[1],y,!1)}},[m,y]),w=(0,u8.useMemo)(()=>{if(n)return{start:AK(n[0],y,!1),end:AK(n[1],y,!1)}},[n,y]),x=(0,u8.useMemo)(()=>AK(p??kU,y,!0),[p,y]),C=(0,u8.useMemo)(()=>AK(c,y,!0),[c,y]),E=(0,u8.useMemo)(()=>t||r,[t,r]),S=(0,u8.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?.([AY(e.start),AY(e.end)]))),[d,u]);return(0,fQ.jsx)(AH,{locale:b.toString(),children:(0,fQ.jsx)("div",{className:f1()("cds--form-item",e),children:(0,fQ.jsx)(gv,{values:[[kG,b]],children:(0,fQ.jsx)(Aq,{id:A?$:void 0,className:f1()("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:k,defaultValue:w,ref:g,isDisabled:o,...h,onChange:S,children:(0,fQ.jsxs)("div",{className:"cds--date-picker-container",children:[A&&(0,fQ.jsx)($9,{className:f1()("cds--label",{"cds--label--disabled":o}),htmlFor:$,children:s??i}),(0,fQ.jsxs)(vY,{className:k8.inputGroup,children:[(0,fQ.jsxs)("div",{className:f1()(k8.inputsWrapper,{[k8.inputsWrapperSm]:"sm"===f,[k8.inputsWrapperMd]:"md"===f||!f||0===f.length,[k8.inputsWrapperLg]:"lg"===f}),children:[(0,fQ.jsx)($K,{className:f1()("cds--date-picker-input__wrapper",k8.startInput,k8.dateInputWrapper),slot:"start",children:e=>(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e})}),(0,fQ.jsx)("div",{className:k8.separator,children:(0,fQ.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fQ.jsx)($K,{className:f1()("cds--date-picker-input__wrapper",k8.endInput,k8.dateInputWrapper),slot:"end",children:e=>(0,fQ.jsx)(wo,{className:k8.inputSegment,segment:e})})]}),(0,fQ.jsx)(y2,{className:f1()(k8.flatButton,{[k8.flatButtonSm]:"sm"===f,[k8.flatButtonMd]:"md"===f||!f||0===f.length,[k8.flatButtonLg]:"lg"===f}),children:(0,fQ.jsx)(wn,{})})]}),(0,fQ.jsx)($4,{className:k8.invalidText,children:a}),(0,fQ.jsx)(k9,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var wl=t(89124),wc={};wc.styleTagTransform=ma(),wc.setAttributes=f9(),wc.insert=f8().bind(null,"head"),wc.domAPI=f4(),wc.insertStyleElement=mn(),f3()(wl.A,wc);let wp=wl.A&&wl.A.locals?wl.A.locals:void 0,wu=({diagnoses:e})=>{let{diagnosisTags:n}=d1({externalModuleName:"@openmrs/esm-styleguide"});return(0,fQ.jsx)("div",{className:wp.container,children:e.map(e=>{let{rank:t,uuid:a,display:o}=e,r=n[1===t?"primaryColor":"secondaryColor"];return(0,fQ.jsx)(mu.vwO,{type:r,children:o},a)})})};var wd=t(87770),wf={};wf.styleTagTransform=ma(),wf.setAttributes=f9(),wf.insert=f8().bind(null,"head"),wf.domAPI=f4(),wf.insertStyleElement=mn(),f3()(wd.A,wf);let wm=wd.A&&wd.A.locals?wd.A.locals:void 0,wh=({width:e="64",height:n="64"})=>(0,fQ.jsx)("svg",{width:e,height:n,viewBox:"0 0 64 64",children:(0,fQ.jsx)("use",{href:"#omrs-empty-data-illustration"})}),wg=e=>{let n="tablet"===fb(),t=e.launchForm;return(0,fQ.jsx)(mu.Wdr,{className:wm.layer,children:(0,fQ.jsxs)(mu.FAs,{className:wm.tile,children:[(0,fQ.jsx)("div",{className:n?wm.tabletHeading:wm.desktopHeading,children:(0,fQ.jsx)("h4",{children:e.headerTitle})}),(0,fQ.jsx)(wh,{}),(0,fQ.jsx)("p",{className:wm.content,children:r_("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fQ.jsx)("p",{className:wm.action,children:t&&(0,fQ.jsx)(mu.$nd,{onClick:()=>t(),kind:"ghost",size:n?"lg":"sm",children:r_("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var wy=t(88480),wb={};wb.styleTagTransform=ma(),wb.setAttributes=f9(),wb.insert=f8().bind(null,"head"),wb.domAPI=f4(),wb.insertStyleElement=mn(),f3()(wy.A,wb);let w_=wy.A&&wy.A.locals?wy.A.locals:void 0,wv=({error:e,headerTitle:n})=>{let t="tablet"===fb();return(0,fQ.jsx)(mu.Wdr,{children:(0,fQ.jsxs)(mu.FAs,{className:w_.tile,children:[(0,fQ.jsx)("div",{className:t?w_.tabletHeading:w_.desktopHeading,children:(0,fQ.jsx)("h4",{children:n})}),(0,fQ.jsxs)("p",{className:w_.errorMessage,children:[r_("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fQ.jsx)("p",{className:w_.errorCopy,children:r_("errorCopy")})]})})},w$=wv;var wA=t(15764),wk={};wk.styleTagTransform=ma(),wk.setAttributes=f9(),wk.insert=f8().bind(null,"head"),wk.domAPI=f4(),wk.insertStyleElement=mn(),f3()(wA.A,wk);let ww=wA.A&&wA.A.locals?wA.A.locals:void 0,wx=u7().forwardRef((e,n)=>{let{slotName:t,basePath:a,componentContext:o,state:r}=f$(),i=window.location??{pathname:""},s=dc(t??"");return e.isChildOfHeader&&t&&s.length>0?(0,fQ.jsxs)(mu.f8J,{"aria-label":r_("leftNavigation","Left navigation"),className:ww.leftNav,expanded:!0,isFixedNav:!0,ref:n,...e,children:[(0,fQ.jsx)(dd,{name:"global-nav-menu-slot"}),t?(0,fQ.jsx)(dq,{value:o,fallback:(0,fQ.jsx)(dd,{name:t,state:{basePath:a,currentPath:i,...r}}),children:(0,fQ.jsx)(u9.Provider,{value:o,children:(0,fQ.jsx)(dd,{name:t,state:{basePath:a,currentPath:i,...r}})})}):null]}):null});var wC=t(48500),wE={};wE.styleTagTransform=ma(),wE.setAttributes=f9(),wE.insert=f8().bind(null,"head"),wE.domAPI=f4(),wE.insertStyleElement=mn(),f3()(wC.A,wE);let wS=wC.A&&wC.A.locals?wC.A.locals:void 0,wD=({selectedLocationUuid:e,defaultLocationUuid:n,locationTag:t,locationsPerRequest:a=50,onChange:o})=>{let[r,i]=(0,u8.useState)(""),s=(0,u8.useId)(),{location:l}=function(e){let n=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:t,error:a,isLoading:o}=d6()(n,o_,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,u8.useMemo)(()=>({location:t?.data?.entry?t.data.entry[0]:null,error:n?a:null,isLoading:!!n&&o}),[t,o,a,n])}(n),{locations:c,isLoading:p,hasMore:u,loadingNewData:d,error:f,setPage:m}=function(e,n=0,t=""){let a=d5(t),{data:o,isLoading:r,isValidating:i,setSize:s,error:l}=fp()(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 r=`${og}/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 a&&""!==a&&i.append("name:contains",a),r+i.toString()},o_);return(0,u8.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:r,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}),[r,o,i,s,l])}(t,a,r),h=(0,u8.useMemo)(()=>l&&!r&&n?[l,...c.filter(({resource:e})=>e.id!==n)]:c??[],[l,c,n,r]),g=(0,u8.useCallback)(e=>{o(),i(e.trim())},[o]),y=fw((0,u8.useCallback)(()=>{!d&&u&&m(e=>e+1)},[d,u,m])),b=u?Math.max(0,Math.floor(h.length-a/2)):-1;return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)(mu.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:r_("searchForLocation"),id:s,placeholder:r_("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,fQ.jsx)("div",{className:wS.errorNotification,id:`${s}-error`,children:(0,fQ.jsx)(mu.jeF,{kind:"error",subtitle:r_("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:r_("error","Error")})}),(0,fQ.jsx)("div",{className:wS.searchResults,children:p?(0,fQ.jsx)("div",{className:wS.loadingContainer,children:Array.from({length:5}).map((e,n)=>(0,fQ.jsx)(mu.Psq,{className:wS.radioButtonSkeleton,role:"progressbar"},n))}):(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("div",{className:wS.locationResultsContainer,children:h.length>0?(0,fQ.jsx)(mu.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,n)=>(0,fQ.jsx)(mu.aaP,{className:wS.locationRadioButton,id:e.resource.id,labelText:(0,fQ.jsx)("span",{ref:n===b?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fQ.jsx)("div",{className:wS.emptyState,children:(0,fQ.jsx)("p",{className:wS.locationNotFound,children:r_("noResultsToDisplay")})})}),d&&(0,fQ.jsx)("div",{className:wS.loadingIcon,children:(0,fQ.jsx)(mu.OuH,{description:r_("loading")})})]})})]})},wM=V("modalState",{modalContainer:null,modalStack:[]}),wz=0;async function wO(e,n,t={}){let a=uV(n),o=null;if(e){if(!a)throw Error(`No modal named '${n}' has been registered.`);let{load:r}=a,i=await r(),s=wz++;o=ay({...i,name:`${n}-${s}`},{...t,domElement:e})}else T(`Failed to launch modal. Please notify your administrator. Modal name: ${n}`);return o}let wP=window.getComputedStyle(document.body).overflow;function wT({modalStack:e,modalContainer:n}){n&&(e.length?(n.style.visibility||(addEventListener("keydown",wI),document.body.style.overflow="hidden",n.style.visibility="unset"),e.forEach((t,a)=>{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,wO(e,t.modalName,t.props).then(a=>{t.parcel=a,t.state="MOUNTED",n.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":t.container&&(t.container.style.visibility=a?"hidden":"unset");break;case"TO_BE_DELETED":t.onClose(),t.parcel?.unmount?.(),t.container?.remove(),setTimeout(()=>{wM.setState({modalContainer:n,modalStack:e.filter(e=>e!==t)})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=wP,removeEventListener("keydown",wI)))}function wB(e){let n=wM.getState(),t=n.modalStack.map(n=>n===e?{...n,state:"TO_BE_DELETED"}:n);wM.setState({...n,modalStack:t})}function wI(e){"Escape"===e.key&&function(){let[e]=wM.getState().modalStack;e&&wB(e)}()}function wN(e){wM.subscribe(wT),wM.setState({...wM.getState(),modalContainer:e})}function wj(e,n={},t=()=>{}){let a=()=>{let e=wM.getState().modalStack.find(e=>e.onClose===t);e&&wB(e)};if(uV(e)){var o;let r,i;o={state:"NEW",onClose:t,modalName:e,props:{close:a,...n}},i=[o,...(r=wM.getState()).modalStack],wM.setState({...r,modalStack:i})}else T(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return a}let wR=({notification:e})=>{let{description:n,action:t,kind:a,critical:o,title:r,onAction:i}=e;return(0,fQ.jsx)(mu.kZS,{actionButtonLabel:t,kind:a||"info",lowContrast:o,subtitle:n,title:r||"",inline:!0,onActionButtonClick:i})},wF=({subject:e})=>{let[n,t]=(0,u8.useState)([]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(wR,{notification:e},e.id))})},wL=({notification:e})=>{let{actionButtonLabel:n,onActionButtonClick:t=()=>{},subtitle:a,kind:o,title:r,critical:i,progressActionLabel:s,id:l,...c}=e,[p,u]=(0,u8.useState)(n);return(0,fQ.jsx)(mu.kZS,{kind:o||"info",actionButtonLabel:p,ariaLabel:r_("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{t(),s&&u(s)},statusIconDescription:r_("actionableNotification","Actionable notification"),subtitle:a,title:r,lowContrast:i,inline:!0,...c})},wW=({subject:e})=>{let[n,t]=(0,u8.useState)([]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(wL,{notification:e},e.id))})};var wG=t(66401);let wV=new eo.Subject,wU=0,wq=new eo.Subject,wH=0;function wK(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(wF,{subject:wV}))}function wY(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&(n instanceof Error||!(0,wG.A)(n)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{wV.next({...e,id:wU++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function wJ(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(wW,{subject:wq}))}function wZ(e){var n;e&&("string"==typeof(n=e.actionButtonLabel)?n.trim().length>0:"object"==typeof n&&!(0,wG.A)(n))?setTimeout(()=>{wq.next({...e,id:wH++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let wX=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],wQ=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var w0=t(4112),w1={};w1.styleTagTransform=ma(),w1.setAttributes=f9(),w1.insert=f8().bind(null,"head"),w1.domAPI=f4(),w1.insertStyleElement=mn(),f3()(w0.A,w1);let w2=w0.A&&w0.A.locals?w0.A.locals:void 0,w3=({value:e,unit:n,label:t,interpretation:a,referenceRange:o,conceptUuid:r,variant:i="card",patientUuid:s})=>{let l=(0,u8.useId)(),{referenceRange:c,isLoading:p}=function(e,n){let t=null;e&&(t=n?`${oh}/conceptreferencerange/?patient=${n}&concept=${e}&v=full`:`${oh}/conceptreferencerange/?concept=${e}&v=full`);let{data:a,error:o,isLoading:r}=d6()(t,o_),i=a?.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:r}}(o||a?void 0:r,s),u=o??c,d=(0,u8.useMemo)(()=>{if(a)return a?"--"===a?"normal":wX.includes(a)?a.toLowerCase():wQ.includes(a)?a:"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"},[a,u,e,p])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,m="normal"!==d,h=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:r_("notAvailable","Not available"),$=f1()({[w2["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[w2["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[w2.low]:"low"===d,[w2.high]:"high"===d,[w2["off-scale-low"]]:"off_scale_low"===d,[w2["off-scale-high"]]:"off_scale_high"===d}),A=f1()({[w2.container]:!0,[w2.card]:!0,[w2["critical-value"]]:f,[w2["abnormal-value"]]:m&&!f}),k=f1()({[w2.cell]:!0,[$]:!0});return"cell"===i?(0,fQ.jsxs)("div",{className:k,children:[v,b&&n?` ${n}`:""]}):(0,fQ.jsxs)("section",{className:A,"data-testid":"numeric-observation-card",children:[t&&(0,fQ.jsxs)("div",{className:w2["label-container"],children:[(0,fQ.jsx)("span",{id:h,className:w2.label,children:t}),m&&(0,fQ.jsx)("span",{className:w2[d.replace("_","-")],title:r_("abnormalValue","Abnormal value")})]}),(0,fQ.jsxs)("div",{className:w2["value-container"],children:[(0,fQ.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:w2.value,children:v}),b&&n&&(0,fQ.jsx)("span",{id:y,className:w2.units,children:n})]})]})};var w5=t(292),w4={};w4.styleTagTransform=ma(),w4.setAttributes=f9(),w4.insert=f8().bind(null,"head"),w4.domAPI=f4(),w4.insertStyleElement=mn(),f3()(w5.A,w4);let w6=w5.A&&w5.A.locals?w5.A.locals:void 0,w8=e=>{if("children"in e){let{children:n,className:t,...a}=e;return(0,fQ.jsx)("div",{className:f1()(w6.pageHeader,t),...a,children:n})}{let{title:n,illustration:t,className:a,...o}=e;return(0,fQ.jsx)("div",{className:f1()(w6.pageHeader,a),...o,children:(0,fQ.jsx)(w7,{title:n,illustration:t})})}},w7=({title:e,illustration:n,className:t})=>{let[a,o]=(0,u8.useState)(null);return(0,u8.useEffect)(()=>{tc("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fQ.jsxs)("div",{className:f1()(w6.pageHeaderContent,t),children:[n,(0,fQ.jsxs)("div",{className:w6.pageLabels,children:[a?.implementationName&&(0,fQ.jsx)("p",{children:r_(a.implementationName)}),(0,fQ.jsx)("p",{className:w6.pageName,children:e})]})]})};var w9=t(72886),xe={};xe.styleTagTransform=ma(),xe.setAttributes=f9(),xe.insert=f8().bind(null,"head"),xe.domAPI=f4(),xe.insertStyleElement=mn(),f3()(w9.A,xe);let xn=w9.A&&w9.A.locals?w9.A.locals:void 0,xt=({totalItems:e,pageSize:n,onPageNumberChange:t,pageNumber:a,dashboardLinkUrl:o,currentItems:r,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=fE(n,e,a,r),c="tablet"===fb(),p=r_("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fQ.jsx)(fQ.Fragment,{children:e>0&&(0,fQ.jsxs)("div",{className:f1()({[xn.tablet]:c,[xn.desktop]:!c}),children:[(0,fQ.jsxs)("div",{children:[p,o&&(0,fQ.jsx)(de,{to:o,className:xn.configurableLink,children:i??r_("seeAll","See all")})]}),(0,fQ.jsx)(mu.dKS,{className:xn.pagination,page:a,pageSize:n,pageSizes:s,totalItems:e,onChange:t,pageRangeText:(e,n)=>r_("paginationOfPages","of {{count}} pages",{count:n}),size:c?"lg":"sm"})]})})};function xa(e){return xr(xs(e,"usual","official"))}function xo(e){return xa(e)}function xr(e){var n;let t;return e?e.text??(t=(n=e).given??[],(n.family?t.concat(n.family):t).join(" ")):""}function xi(e){return xr(e)}function xs(e,...n){for(let t of(0==n.length&&(n=["usual"]),n)){let n=e.name?.find(e=>{var n,a;return n=e,a=t,n.use?n.use===a:"usual"===a});if(n)return n}}function xl(e,n=fB()()){let t=fB()(n),a=kI(e,t);if(null==a)return null;let o=t.diff(a,"hours"),r=t.diff(a,"days"),i=t.diff(a,"weeks"),s=t.diff(a,"months"),l=t.diff(a,"years"),c={};if(o<2)c.minutes=t.diff(a,"minutes");else if(r<2)c.hours=o;else if(i<4)c.days=r;else if(l<1){let e=t.subtract(i,"weeks").diff(a,"days");c.weeks=i,c.days=e}else if(l<2){let e=t.subtract(s,"months").diff(a,"days");c.months=s,c.days=e}else if(l<18){let e=t.subtract(l,"year").diff(a,"months");c.years=l,c.months=e}else c.years=l;return c}function xc(e,n=fB()()){let t=xl(e,n);if(null==t)return null;let a={style:"short",localeMatcher:"lookup"};return"minutes"in t&&0===t.minutes&&(a.minutesDisplay="always"),kB(t,a)}var xp=t(46010),xu={};xu.styleTagTransform=ma(),xu.setAttributes=f9(),xu.insert=f8().bind(null,"head"),xu.domAPI=f4(),xu.insertStyleElement=mn(),f3()(xp.A,xu);let xd=xp.A&&xp.A.locals?xp.A.locals:void 0;function xf({showIdentifierLabel:e,type:n,value:t}){return(0,fQ.jsx)("span",{className:xd.primaryIdentifier,children:(0,fQ.jsxs)(mu.vwO,{className:xd.tag,type:"gray",children:[e&&n?.text&&(0,fQ.jsxs)("span",{className:xd.label,children:[n.text,": "]}),(0,fQ.jsx)("span",{className:xd.value,children:t})]})})}function xm({showIdentifierLabel:e,type:n,value:t}){return(0,fQ.jsxs)(mu.lRv,{className:xd.secondaryIdentifier,id:`patient-banner-identifier-${t}`,children:[e&&(0,fQ.jsxs)("span",{className:xd.label,children:[n?.text,": "]}),(0,fQ.jsx)("span",{className:xd.value,children:t})]})}function xh({identifiers:e,showIdentifierLabel:n}){let{excludePatientIdentifierCodeTypes:t}=d1(),{primaryIdentifierCode:a}=fM(),o=e?.filter(e=>{let n=e.type?.coding?.[0]?.code;return n&&!t?.uuids.includes(n)})??[];return(0,fQ.jsx)(fQ.Fragment,{children:o?.length?o.map(({value:e,type:t},r)=>(0,fQ.jsxs)(u7().Fragment,{children:[(0,fQ.jsx)("span",{className:xd.identifier,children:t?.coding?.[0]?.code===a?(0,fQ.jsx)(xf,{showIdentifierLabel:n,type:t,value:e}):(0,fQ.jsx)(xm,{showIdentifierLabel:n,type:t,value:e})}),r<o.length-1&&(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"})]},e)):""})}let xg={Female:m5,Male:m4,Other:m6,Unknown:m8},xy=({gender:e})=>{let n=xg[e];return n?(0,fQ.jsx)(n,{fill:"#525252"}):null},xb={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function x_({patient:e,renderedFrom:n}){var t;let a,o,r=xa(e),i=e?.gender&&(o=xb[a=(t=e.gender).toLowerCase()]??"Unknown",{displayText:r_(a,t),iconKey:o}),s=(0,u8.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:n}),[e.id,e,n]);return(0,fQ.jsxs)("div",{className:xd.patientInfo,children:[(0,fQ.jsx)("div",{className:f1()(xd.row,xd.patientNameRow),children:(0,fQ.jsxs)("div",{className:xd.flexRow,children:[(0,fQ.jsx)("span",{className:xd.patientName,children:r}),i&&(0,fQ.jsxs)("div",{className:xd.gender,children:[(0,fQ.jsx)(xy,{gender:i.iconKey}),(0,fQ.jsx)("span",{children:i.displayText})]}),(0,fQ.jsx)(dd,{className:xd.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fQ.jsxs)("div",{className:xd.demographics,children:[e.birthDate&&(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("span",{children:xc(e.birthDate)}),(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"}),(0,fQ.jsx)("span",{children:kD(e.birthDate,{time:!1})}),(0,fQ.jsx)("span",{className:xd.separator,children:"\xb7"})]}),(0,fQ.jsx)(xh,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fQ.jsx)(dd,{className:xd.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xv=t(81673),x$=t(9102),xA={};xA.styleTagTransform=ma(),xA.setAttributes=f9(),xA.insert=f8().bind(null,"head"),xA.domAPI=f4(),xA.insertStyleElement=mn(),f3()(x$.A,xA);let xk=x$.A&&x$.A.locals?x$.A.locals:void 0;function xw({patient:e,patientUuid:n,actionsSlotName:t,additionalActionsSlotState:a}){let[o,r]=(0,u8.useState)(!1),{extensions:i}=dp(t),s="tablet"===fb(),l=fk(()=>r(!1),o),c=(0,u8.useRef)(null),p=(0,u8.useRef)(null),u=(0,u8.useId)(),d=`patient-actions-menu-trigger-${u}`,f=`patient-actions-menu-${u}`,m=(0,u8.useCallback)(()=>r(e=>!e),[]),h=(0,u8.useCallback)(()=>{r(!1),c.current?.focus()},[]),g=(0,u8.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();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,a=Array.from(n).indexOf(t);if(-1===a)return void n["ArrowDown"===e.key?0:n.length-1]?.focus();let o=a+("ArrowDown"===e.key?1:-1),r=o<0?n.length-1:o>=n.length?0:o;n[r]?.focus()}},[h,o]);(0,u8.useEffect)(()=>{if(o&&p.current){let e=p.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,u8.useMemo)(()=>({patientUuid:n,patient:e,closeMenu:h,...a}),[n,e,h,a]);return 0===i.length?null:(0,fQ.jsx)("div",{className:xk.overflowMenuContainer,children:(0,fQ.jsxs)("div",{"data-overflow-menu":!0,className:f1()("cds--overflow-menu",mg.container),ref:l,children:[(0,fQ.jsxs)("button",{className:f1()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},mg.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:m,onKeyDown:g,ref:c,children:[(0,fQ.jsx)("span",{className:xk.actionsButtonText,children:r_("actions","Actions")})," ",(0,fQ.jsx)(xv.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fQ.jsxs)("div",{className:f1()("cds--overflow-menu-options","cds--overflow-menu--flip",mg.menu,{[mg.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:p,role:"menu",tabIndex:-1,children:[(0,fQ.jsx)("ul",{className:f1()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fQ.jsx)(dd,{name:t,state:y},t)}),(0,fQ.jsx)("span",{})]})]})})}var xx=t(16767),xC=t.n(xx);function xE(e){let{patientPhotoConceptUuid:n}=d1({externalModuleName:"@openmrs/esm-styleguide"}),t=n?`${oh}/obs?patient=${e}&concept=${n}&v=full`:null,{data:a,error:o,isLoading:r}=(0,dS.Ay)(e?t:null,o_),i=a?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:r}}let xS=({width:e=56,height:n=56,"aria-label":t})=>{let{t:a}=(0,dE.useTranslation)();return(0,fQ.jsxs)("svg",{"aria-label":t??a("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fQ.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fQ.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 xD=t(27268),xM={};xM.styleTagTransform=ma(),xM.setAttributes=f9(),xM.insert=f8().bind(null,"head"),xM.domAPI=f4(),xM.insertStyleElement=mn(),f3()(xD.A,xM);let xz=xD.A&&xD.A.locals?xD.A.locals:void 0;function xO({patientUuid:e,patientName:n,alt:t}){let{data:a,isLoading:o}=xE(e),[r,i]=(0,u8.useState)(null),[s,l]=(0,u8.useState)(!1),c=(0,u8.useMemo)(()=>xC().generate(e),[e]);(0,u8.useEffect)(()=>{if(a?.imageSrc){let e=new URL(a.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)},[a?.imageSrc]);let p=(0,u8.useMemo)(()=>t||(r?r_("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:n}):r_("patientAvatarAlt","Avatar for {{patientName}}",{patientName:n})),[t,r,n]);return o||s?(0,fQ.jsx)(mu.ryE,{className:xz.skeleton,"data-testid":"skeleton-icon"}):a?.imageSrc&&!r?(0,fQ.jsx)(xS,{"aria-label":r_("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:n})}):r?(0,fQ.jsx)("div",{"aria-label":p,children:(0,fQ.jsx)("img",{className:xz.avatar,src:r,alt:p,title:n})}):(0,fQ.jsx)("div",{"aria-label":p,children:(0,fQ.jsx)("div",{className:xz.avatar,title:n,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fQ.jsx)("span",{className:xz.initials,children:function(e,n=3){return e.split(/\s+/).filter(Boolean).slice(0,n).map(e=>e[0]).join("")}(n)})})})}var xP=t(1636),xT={};xT.styleTagTransform=ma(),xT.setAttributes=f9(),xT.insert=f8().bind(null,"head"),xT.domAPI=f4(),xT.insertStyleElement=mn(),f3()(xP.A,xT);let xB=xP.A&&xP.A.locals?xP.A.locals:void 0,xI=["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"],xN=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-appointments",pictogramProps:e})})),xj=xN,xR=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),xF=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),xL=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),xW=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),xG=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),xV=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),xU=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),xq=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-facility",pictogramProps:e})})),xH=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),xK=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),xY=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),xJ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),xZ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),xX=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),xQ=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),x0=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-patients",pictogramProps:e})})),x1=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),x2=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),x3=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),x5=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-registration",pictogramProps:e})})),x4=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),x6=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),x8=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-transfer",pictogramProps:e})})),x7=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-triage",pictogramProps:e})})),x9=(0,u8.memo)((0,u8.forwardRef)(function(e,n){return(0,fQ.jsx)(Ca,{ref:n,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Ce=xq,Cn=x0,Ct=(0,u8.memo)((0,u8.forwardRef)(function({pictogram:e,fallback:n,...t},a){let o=(0,u8.useRef)(document.getElementById(e));return(0,u8.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,fQ.jsx)(dq,{value:o.current,fallback:n,children:(0,fQ.jsx)(Ca,{ref:a,pictogram:e,pictogramProps:t})})})),Ca=(0,u8.memo)((0,u8.forwardRef)(function({pictogram:e,pictogramProps:n},t){let{className:a,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,fQ.jsx)("svg",{ref:t,className:f1()(xB.pictogram,a),height:o,width:o,children:(0,fQ.jsx)("use",{href:`#${e}`})})})),Co=({children:e})=>"tablet"===fb()?(0,fQ.jsx)(mu.Wdr,{children:e}):(0,fQ.jsx)(fQ.Fragment,{children:e});var Cr=t(85925),Ci={};Ci.styleTagTransform=ma(),Ci.setAttributes=f9(),Ci.insert=f8().bind(null,"head"),Ci.domAPI=f4(),Ci.insertStyleElement=mn(),f3()(Cr.A,Ci);let Cs=Cr.A&&Cr.A.locals?Cr.A.locals:void 0,Cl=({snackbar:e,closeSnackbar:n})=>{let{actionButtonLabel:t="",kind:a="success",onActionButtonClick:o=()=>{},isLowContrast:r="error"!==a,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==a,title:p,id:u,...d}=e,[f,m]=(0,u8.useState)(t),[h,g]=(0,u8.useState)(!0),[y,b]=(0,u8.useState)(!1),v=(0,u8.useCallback)(()=>{setTimeout(n,250)},[n]),$=(0,u8.useCallback)(()=>{b(!0),v()},[v]);return(0,u8.useEffect)(()=>{if(c){let e=setTimeout($,l);return()=>clearTimeout(e)}},[l,c,$]),(0,u8.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fQ.jsx)(mu.kZS,{actionButtonLabel:f,"aria-label":r_("closeSnackbar","Close snackbar"),className:f1()(Cs.slideIn,{[Cs.animated]:h,[Cs.slideOut]:y}),kind:a,lowContrast:r,onActionButtonClick:()=>{o(),$(),i&&m(i)},onClose:v,statusIconDescription:r_("snackbarNotification","Snackbar notification"),subtitle:s,title:p,...d})},Cc=({subject:e})=>{let[n,t]=(0,u8.useState)([]),a=(0,u8.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(Cl,{snackbar:e,closeSnackbar:()=>a(e)},e.id))})},Cp=new eo.Subject,Cu=0;function Cd(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(Cc,{subject:Cp}))}function Cf(e){var n;e&&"string"==typeof(n=e.title)&&n.trim().length>0?setTimeout(()=>{Cp.next({...e,id:Cu++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Cm=({toast:e,closeToast:n})=>{let{description:t,kind:a,critical:o,title:r,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,u8.useCallback)(()=>{s(),n()},[n,s]);return(0,fQ.jsx)("div",{children:(0,fQ.jsx)(mu.kZS,{actionButtonLabel:i,kind:a||"info",lowContrast:o,subtitle:t,title:r||"",onActionButtonClick:l,onClose:n})})},Ch=({subject:e})=>{let[n,t]=(0,u8.useState)([]),a=(0,u8.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,u8.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,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsx)(Cm,{toast:e,closeToast:()=>a(e)},e.id))})},Cg=new eo.Subject,Cy=0;function Cb(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(Ch,{subject:Cg}))}function C_(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&!(0,wG.A)(n))?setTimeout(()=>{Cg.next({...e,id:Cy++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Cv(e,n=!1){if(n)return!0;let t=Cx[e];return!t||!t()}function C$(e,n){let t=CP.getState()?.workspaceGroup,a=t?.name;a&&e===a&&CN(()=>{let a=CW(e);a&&(a.setState({},!0),a.subscribe(()=>{})()),"function"==typeof t?.cleanup&&t.cleanup(),CP.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof n&&n()},a?e=>e.currentWorkspaceGroup===a:()=>!0)}function CA(e,n){let{name:t,additionalProps:a}=n;uJ(t);let o=()=>{CM(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Ck(t,a),closeWorkspaceGroup:!1})};Cv(e.name)?o():CR("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Ck(e,n){let t=uJ(e),a=CP.getState().workspaceGroup;if(a&&!a.members?.includes(e))return void C$(a.name,()=>{Ck(e,n)});let o=CP.getState().workspaceGroup?.name,r={...t,title:CF(t,n),closeWorkspace:(n={})=>CM(e,n),closeWorkspaceWithSavedChanges:n=>CM(e,{ignoreChanges:!0,...n}),promptBeforeClosing:n=>{var t,a;return t=e,a=n,void(Cx[t]=a)},setTitle:(n,t)=>{r.title=n,r.titleNode=t,CP.setState(n=>{let t=n.openWorkspaces.map(n=>n.name===e?r:n);return{...n,openWorkspaces:t}})},currentWorkspaceGroup:o,additionalProps:n??{}};function i(e,n){CP.setState(t=>{let a=[e,...n??t.openWorkspaces],o=CI(e);return{...t,openWorkspaces:a,workspaceWindowState:o}})}o&&CW(o,n);let s=CP.getState().openWorkspaces,l=s.findIndex(n=>n.name===e),c=s.find(e=>e.type==r.type);if(0===s.length)i(r);else if(s[0].canHide||0===l)if(l>=0){let n=s[l];i({...n,additionalProps:r.additionalProps,...n.title===CF(n,n.additionalProps)&&{title:CF(r,r.additionalProps)}},s.filter(n=>n.name!=e))}else c?(i(c,CP.getState().openWorkspaces.filter(e=>e.type!=r.type)),CA(c,{name:e,additionalProps:n})):i(r);else CA(s[0],{name:e,additionalProps:n})}function Cw({targetUrl:e,contextKey:n,workspaceName:t,additionalProps:a}){Cz(n),Ck(t,a),or({to:e})}let Cx={};function CC(e,n){Cx[e]=n}function CE(e){return Cx[e]}function CS(){let e=CP.getState();CP.setState({...e,prompt:null})}let CD={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function CM(e,n={}){n={...CD,...n};let t=()=>{let t=CP.getState();t.openWorkspaces.find(n=>n.name===e);let a=t.openWorkspaces.filter(n=>n.name!=e),o=CP.getState().workspaceGroup?.name;o&&n.closeWorkspaceGroup&&C$(o),Cx[e]=()=>!1,CP.setState(e=>({...e,prompt:null,openWorkspaces:a,workspaceWindowState:CI(a?.[0])})),n?.onWorkspaceClose?.()};return Cv(e,n?.ignoreChanges)?(t(),!0):(CR("closing-workspace",t,uJ(e).title??e),!1)}function Cz(e){CP.getState().context!=e&&CP.setState({context:e,openWorkspaces:[],prompt:null})}let CO={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},CP=V("workspace",CO);function CT(){return CP}function CB(e){let n=CP.getState();CP.setState({...n,workspaceWindowState:e})}function CI(e){return e?.preferredWindowSize??"normal"}function CN(e=()=>{},n=()=>!0){let t=CP.getState().openWorkspaces.filter(n).every(({name:e})=>Cv(e)),a=()=>{CL(),e?.()};t?a():CR("closing-all-workspaces",a)}function Cj(){let{workspaceWindowState:e,openWorkspaces:n,prompt:t,workspaceGroup:a}=dr(CP);return(0,u8.useMemo)(()=>({active:n.length>0,prompt:t,workspaceWindowState:e,workspaces:n,workspaceGroup:a}),[n,e,t,a])}function CR(e,n=()=>{},t=""){let a;switch(e){case"closing-workspace":a={title:r_("unsavedChangesTitleText","Unsaved changes"),body:r_("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{n?.()},confirmText:r_("discard","Discard")};break;case"closing-all-workspaces":{let e=CP.getState().openWorkspaces.filter(({name:e})=>!Cv(e)).map(({title:e},n)=>`${n+1}. ${e}`);a={title:r_("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:r_("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:r_("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":a={title:r_("unsavedChangesTitleText","Unsaved changes"),body:r_("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:t}),onConfirm:()=>{CP.setState(e=>({...e,prompt:null})),n?.()},confirmText:r_("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),n?.();return}CP.setState(e=>({...e,prompt:a}))}function CF(e,n){return n?.workspaceTitle??e.title}function CL(){CP.setState(CO)}function CW(e,n={}){if(!e||"default"===e)return;let t=q(e,{});return n&&t.setState(e=>({...e,...n})),t}var CG=t(81341),CV={};CV.styleTagTransform=ma(),CV.setAttributes=f9(),CV.insert=f8().bind(null,"head"),CV.domAPI=f4(),CV.insertStyleElement=mn(),f3()(CG.A,CV);let CU=CG.A&&CG.A.locals?CG.A.locals:void 0;function Cq({getIcon:e,formOpenInTheBackground:n,tagContent:t}){return(0,fQ.jsxs)(fQ.Fragment,{children:[e({size:16}),n?(0,fQ.jsx)("span",{className:CU.interruptedTag,children:"!"}):(0,fQ.jsx)("span",{className:CU.countTag,children:t})]})}let CH=({getIcon:e,label:n,iconDescription:t,handler:a,type:o,tagContent:r})=>{let i=fb(),{workspaces:s,workspaceWindowState:l}=Cj(),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,fQ.jsxs)(mu.$nd,{className:f1()(CU.container,{[CU.active]:p}),iconDescription:t,kind:"ghost",onClick:a,role:"button",tabIndex:0,size:"md",children:[(0,fQ.jsx)("span",{className:CU.elementContainer,children:(0,fQ.jsx)(Cq,{formOpenInTheBackground:u,getIcon:e,tagContent:r})}),(0,fQ.jsx)("span",{children:n})]}):(0,fQ.jsx)(mu.K0,{align:"left","aria-label":t,className:f1()(CU.container,{[CU.active]:p}),enterDelayMs:300,kind:"ghost",label:n,onClick:a,size:"md",children:(0,fQ.jsx)("div",{className:CU.elementContainer,children:(0,fQ.jsx)(Cq,{formOpenInTheBackground:u,getIcon:e,tagContent:r})})})};var CK=t(54535),CY=t(40771),CJ=t(24898),CZ=/[\\^$.*+?()[\]{}|]/g,CX=RegExp(CZ.source);let CQ=function(e){return(e=(0,CJ.A)(e))&&CX.test(e)?e.replace(CZ,"\\$&"):e};var C0=t(37781),C1={};C1.styleTagTransform=ma(),C1.setAttributes=f9(),C1.insert=f8().bind(null,"head"),C1.domAPI=f4(),C1.insertStyleElement=mn(),f3()(C0.A,C1);let C2=C0.A&&C0.A.locals?C0.A.locals:void 0;function C3({contextKey:e}){let{prompt:n}=Cj();return(0,u8.useEffect)(()=>{RegExp(`/${CQ(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,u8.useEffect)(()=>(Cz(e),()=>{Cz(null)}),[e]),(0,u8.useEffect)(()=>{let n=n=>{let{detail:{cancelNavigation:t,newUrl:a}}=n,o=RegExp(`/${CQ(e)}(/|$)`),r=new URL(a),i=o.test(r.pathname),s=CP.getState().openWorkspaces.every(({name:e})=>Cv(e));i||(s?CL():(t?.(),CN(()=>{or({to:a})})))};return window.addEventListener("single-spa:before-routing-event",n),()=>{window.removeEventListener("single-spa:before-routing-event",n)}},[]),null!=n?(0,fQ.jsxs)(mu.KXP,{open:!0,onClose:CS,children:[(0,fQ.jsx)(mu.rQ0,{title:n.title}),(0,fQ.jsx)(mu.cwr,{children:(0,fQ.jsx)("p",{className:C2.messageBody,children:n.body})}),(0,fQ.jsxs)(mu.jlY,{children:[(0,fQ.jsx)(mu.$nd,{kind:"secondary",onClick:CS,children:n.cancelText??r_("cancel")}),(0,fQ.jsx)(mu.$nd,{kind:"danger",onClick:n.onConfirm,children:n.confirmText??r_("confirm")})]})]}):null}function C5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C4(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C5(Object(t),!0).forEach(function(n){C8(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function C6(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function C8(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C7(e){return(C7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C9(e,n){return(C9=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function Ee(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var En=function(e){var n=u8.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&&C9(i,n);var t,a,o,r=(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=C7(i);e=t?Reflect.construct(n,arguments,C7(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 Ee(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),C8(Ee(n=r.call(this,e)),"handleRef",function(e){n.el=e}),C8(Ee(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}))}),C8(Ee(n),"getParcelProps",function(){var e=C4(C4({},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 a=[{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,C4({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 d_&&d_.Consumer?u8.createElement(d_.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):null;var n=d_&&d_.Consumer?u8.createElement(d_.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):void 0;return u8.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},n)}}],C6(i.prototype,a),o&&C6(i,o),i}();C8(En,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Et=t(57515),Ea={};Ea.styleTagTransform=ma(),Ea.setAttributes=f9(),Ea.insert=f8().bind(null,"head"),Ea.domAPI=f4(),Ea.insertStyleElement=mn(),f3()(Et.A,Ea);let Eo=Et.A&&Et.A.locals?Et.A.locals:void 0;function Er({workspace:e,additionalPropsFromPage:n}){let[t,a]=(0,u8.useState)(),o=function(e){let[n,t]=(0,u8.useState)({}),[a,o]=(0,u8.useState)(e);return(0,u8.useEffect)(()=>{a!==e&&o(e)},[e]),(0,u8.useEffect)(()=>{let e,n=CW(a);return n&&(t(n.getState()),e=n.subscribe(t)),()=>{n&&e?.()}},[a]),n}(e.currentWorkspaceGroup);(0,u8.useEffect)(()=>{let n=!0;return e.load().then(e=>{n&&a(e)}),()=>{n=!1}},[e]);let r=(0,u8.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...n,...o,...e.additionalProps},[e,n,o]);return t?(0,fQ.jsx)(En,{config:t,mountParcel:ay,...r},e.name):(0,fQ.jsx)(mu.OuH,{className:Eo.loader,description:`${r_("loading","Loading")} ...`})}var Ei=t(24646),Es={};Es.styleTagTransform=ma(),Es.setAttributes=f9(),Es.insert=f8().bind(null,"head"),Es.domAPI=f4(),Es.insertStyleElement=mn(),f3()(Ei.A,Es);let El=Ei.A&&Ei.A.locals?Ei.A.locals:void 0;function Ec({isWithinWorkspace:e,name:n,actionMenuProps:t={}}){let[a,o]=(0,u8.useState)(!1),r=(0,u8.useRef)(window.innerHeight),{featureName:i}=(0,u8.useContext)(u9),s=fb();(0,u8.useEffect)(()=>{let e=()=>{o(!f_(s)&&r.current>window.innerHeight),r.current!=window.innerHeight&&(r.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[r]);let l=`action-menu-${n&&"default"!=n?n:i}-items-slot`;return(0,fQ.jsx)("aside",{className:f1()(El.sideRail,{[El.withinWorkspace]:e,[El.sideRailHidden]:a,[El.sideRailVisible]:!a}),children:(0,fQ.jsx)("div",{className:El.container,children:(0,fQ.jsx)(dd,{className:El.chartExtensions,name:l,state:t})})})}function Ep({contextKey:e,overlay:n,showSiderailAndBottomNav:t,additionalWorkspaceProps:a,actionMenuProps:o}){let r=fb(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=Cj(),c=l?.name,p=i[0],u="hidden"===s||null==p,d=p?.width??(n?"wider":"narrow"),f=(0,u8.useMemo)(()=>t||c&&!u,[c,u,t]);return dX(!u&&!f_(r)),(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)("div",{className:t?Eo.workspaceContainerWithActionMenu:Eo.workspaceContainerWithoutActionMenu,children:[(0,fQ.jsx)("aside",{className:f1()(n?Eo.workspaceOverlayOuterContainer:Eo.workspaceWindowSpacer,{[Eo.hiddenRelative]:u,[Eo.narrowWorkspace]:"narrow"===d,[Eo.widerWorkspace]:"wider"===d,[Eo.extraWideWorkspace]:"extra-wide"===d}),children:(0,fQ.jsx)("div",{className:f1()(Eo.workspaceFixedContainer,{[Eo.maximizedWindow]:"maximized"===s,[Eo.hiddenFixed]:u}),children:i.map((e,n)=>(0,fQ.jsx)("div",{className:f1()(Eo.workspaceInnerContainer,{[Eo.hiddenExtraWorkspace]:0!==n}),children:(0,fQ.jsx)(u8.Suspense,{fallback:null,children:(0,fQ.jsx)(dE.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fQ.jsx)(Eu,{workspaceInstance:e,additionalWorkspaceProps:a})})})},`workspace-container-${e?e.name:`empty-${n}`}`))})}),(0,fQ.jsx)(C3,{contextKey:e})]}),f&&(0,fQ.jsx)(Ec,{name:c,isWithinWorkspace:!t,actionMenuProps:o})]})}function Eu({workspaceInstance:e,additionalWorkspaceProps:n}){let{t}=(0,dE.useTranslation)(),a=fb(),{workspaceWindowState:o,workspaceGroup:r}=Cj(),i=r?.name,s="maximized"===o;(0,u8.useEffect)(()=>{let n=t(e.title);n!==e.title&&e.setTitle(n)},[e.title,t,e.setTitle]);let{featureName:l}=(0,u8.useContext)(u9),c=(0,u8.useCallback)(()=>{CB(s?"normal":"maximized")},[s]),{canHide:p=!1,canMaximize:u=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,u8.useMemo)(()=>e??{},[e]),m=(0,u8.useMemo)(()=>({...n,...e?.additionalProps}),[n,e]);return e&&(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)(mu.Y9Y,{"aria-label":r_("workspaceHeader","Workspace Header"),className:Eo.header,children:[!f_(a)&&!p&&(0,fQ.jsx)(mu.dJ2,{"aria-label":r_("close","Close"),renderMenuIcon:(0,fQ.jsx)(mD,{}),onClick:()=>f()}),(0,fQ.jsx)(mu.bCw,{prefix:"",children:e.titleNode??t(e.title)}),(0,fQ.jsx)("div",{className:Eo.overlayHeaderSpacer}),(0,fQ.jsxs)(mu.wdv,{className:Eo.headerButtons,children:[(0,fQ.jsx)(dd,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,fQ.jsx)(dd,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,fQ.jsx)(dd,{name:`workspace-header-${l}-slot`,state:m}),f_(a)&&(0,fQ.jsxs)(fQ.Fragment,{children:[(u||s)&&(0,fQ.jsx)(mu.V8d,{"aria-label":s?r_("minimize","Minimize"):r_("maximize","Maximize"),onClick:c,children:s?(0,fQ.jsx)(CK.Xj,{}):(0,fQ.jsx)(CK.hz,{})}),p&&!i?(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide","Hide"),onClick:()=>CB("hidden"),children:(0,fQ.jsx)(mM,{})}):(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close","Close"),onClick:()=>f?.(),children:(0,fQ.jsx)(mK,{})})]}),"tablet"===a&&p&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close","Close"),onClick:()=>f?.(),children:(0,fQ.jsx)(CY.d3,{})})]})]}),(0,fQ.jsx)("div",{className:f1()(Eo.workspaceContent,{[Eo.marginWorkspaceContent]:!!d}),children:(0,fQ.jsx)(Er,{workspace:e,additionalPropsFromPage:n},e.name)})]})}async function Ed(e,n){let{openedGroup:t}=uX.getState();if(t){if(t.groupName===e&&Eh(t.props,n))return!0;else if(!await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return uX.setState(t=>({...t,openedGroup:{groupName:e,props:n},openedWindows:[]})),!0}async function Ef(e){let{openedGroup:n,openedWindows:t}=uX.getState();if(n){if(t.length>0&&!(e||await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;uX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Em(e,n=null,t=null,a=null){let o=uX.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let r=uQ(e);if(!r)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=r,l=u0(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${r.name} is not registered to a workspace group`);let c=u1(e);if(i&&(i.groupName!==l.name||!Eh(i.props,a)))return!!await Eg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:a},openedWindows:[{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let a=o.openedWindows[c],r=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:p}=a;if(Eh(a.props,t)){let u=p.find(n=>n.workspaceName===e);return u&&Eh(u.props,n)?((i||c!==o.openedWindows.length-1)&&uX.setState(Ey.restoreWindow(o,s)),!0):!!await Eg({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??r},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[E$(e,n)],props:a?.props??t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Eg({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(uX.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Eg({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:r.name})&&(uX.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[E$(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Eh(e,n){return null==e||null==n||N(e,n)}function Eg(e){function n(e,n){let t=[];for(let a=e.openedWorkspaces.length-1;a>=0;a--){let o=e.openedWorkspaces[a];if(o.hasUnsavedChanges&&t.push(o),n&&o.workspaceName===n)break}return t}let{openedWindows:t,workspaceTitleByWorkspaceName:a}=uX.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=t.flatMap(e=>n(e));break;case"CLOSE_WINDOW":{let a=t.find(n=>n.windowName===e.windowName);if(!a)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(a);break}case"CLOSE_WORKSPACE":{let a=t.find(n=>n.windowName===e.windowName);if(!a)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(a,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=wj("workspace2-close-prompt",{size:"sm",onConfirm:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)},affectedWorkspaceTitles:o.map(e=>a[e.workspaceName])})})}let Ey={setWindowMaximized(e,n,t){let a=e.openedWindows.findIndex(e=>e.windowName===n),o=[...e.openedWindows],r={...o[a],maximized:t};return o[a]=r,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,n){let t=e.openedWindows.findIndex(e=>e.windowName===n),a=e.openedWindows[t],o=[...e.openedWindows.filter((e,n)=>n!==t),a];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,n){let t=u1(n);if(t<0)return e;let a={...e.openedWindows[t]},o=a.openedWorkspaces.findIndex(e=>e.workspaceName===n),r=[...e.openedWindows];a.openedWorkspaces=a.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===a.openedWorkspaces.length){let n=t===e.openedWindows.length-1;r.splice(t,1),n&&r.length>0&&(i=!1)}else r[t]=a;return{...e,openedWindows:r,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,n,t,a){let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);let r=e.registeredWorkspacesByName[n];if(!r)throw Error(`No workspace named "${n}" registered`);if(r.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,E$(t,a)]}:e)}},setHasUnsavedChanges(e,n,t){let a=u1(n);if(a<0)return e;let o={...e.openedWindows[a]},r=o.openedWorkspaces.findIndex(e=>e.workspaceName===n);if(r<0)return e;o.openedWorkspaces[r]={...o.openedWorkspaces[r],hasUnsavedChanges:t};let i=[...e.openedWindows];return i[a]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,n,t){let a={...e.workspaceTitleByWorkspaceName};return null===t?delete a[n]:a[n]=t,{...e,workspaceTitleByWorkspaceName:a}}};function Eb(){return di(uX,Ey)}let E_=()=>(0,u8.useContext)(d_),Ev=()=>Object.keys(uX.getState().registeredWorkspacesByName);function E$(e,n){return{workspaceName:e,props:n??{},hasUnsavedChanges:!1,uuid:pn()}}var EA=t(81179),Ek={};Ek.styleTagTransform=ma(),Ek.setAttributes=f9(),Ek.insert=f8().bind(null,"head"),Ek.domAPI=f4(),Ek.insertStyleElement=mn(),f3()(EA.A,Ek);let Ew=EA.A&&EA.A.locals?EA.A.locals:void 0,Ex=({title:e,children:n,hasUnsavedChanges:t=!1})=>{let a=fb(),{setWindowMaximized:o,hideWindow:r,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:p,registeredWorkspacesByName:u,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:m}=Eb(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:b}=E_(),v=u1(h),$=s[v],A=$?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,u8.useEffect)(()=>{A?.hasUnsavedChanges!=t&&i(h,t??!1)},[A?.hasUnsavedChanges,t,h,i]),(0,u8.useEffect)(()=>{d[h]!==e&&f(h,e)},[d,h,e,f]),v<0||null==l||null==A)return null;let k=c[l.groupName];if(!k)throw Error(`Cannot find registered workspace group ${l.groupName}`);let w=u[h].window,x=p[w];if(!x)throw Error(`Cannot find registered workspace window ${w}`);let{icon:C,canMaximize:E}=x,S="closable"===k.persistence,D=!!C&&!S,{maximized:M}=$,z=x?.width??"narrow",O=Object.values(p).some(e=>e.group===l.groupName&&void 0!==e.icon),P=v<s.length-1||m;return(0,fQ.jsxs)("div",{className:f1()(Ew.workspaceOuterContainer,{[Ew.narrowWorkspace]:"narrow"===z,[Ew.widerWorkspace]:"wider"===z,[Ew.extraWideWorkspace]:"extra-wide"===z,[Ew.isActionMenuOpened]:O}),children:[(0,fQ.jsx)("div",{className:f1()(Ew.workspaceSpacer,{[Ew.hidden]:P})}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceMiddleContainer,{[Ew.maximized]:M,[Ew.hidden]:P,[Ew.isRootWorkspace]:g,[Ew.showActionMenu]:b}),children:(0,fQ.jsxs)("div",{className:f1()(Ew.workspaceInnerContainer,{[Ew.maximized]:M,[Ew.hidden]:P,[Ew.isRootWorkspace]:g}),children:[(0,fQ.jsxs)(mu.Y9Y,{"aria-label":r_("workspaceHeader"),className:Ew.header,children:[(0,fQ.jsx)(mu.bCw,{prefix:"",children:e}),(0,fQ.jsx)("div",{className:Ew.overlayHeaderSpacer}),(0,fQ.jsx)(mu.wdv,{className:Ew.headerButtons,children:f_(a)?(0,fQ.jsxs)(fQ.Fragment,{children:[(E||M)&&(0,fQ.jsx)(mu.V8d,{"aria-label":M?r_("minimize"):r_("maximize"),onClick:()=>o(w,!M),children:M?(0,fQ.jsx)(CK.Xj,{}):(0,fQ.jsx)(CK.hz,{})}),D&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide"),onClick:()=>r(),children:(0,fQ.jsx)(mM,{})}),!S&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close"),onClick:()=>y({closeWindow:!0}),children:(0,fQ.jsx)(mK,{})})]}):(0,fQ.jsxs)(fQ.Fragment,{children:[D&&(0,fQ.jsx)(mu.V8d,{"aria-label":r_("hide"),onClick:()=>r(),children:(0,fQ.jsx)(CY.d3,{})}),(0,fQ.jsx)(mu.V8d,{"aria-label":r_("close"),onClick:()=>{S?Ef():y({closeWindow:!0})},children:(0,fQ.jsx)(mK,{})})]})})]}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceContent),children:n})]})})]})};var EC=t(97810),EE={};EE.styleTagTransform=ma(),EE.setAttributes=f9(),EE.insert=f8().bind(null,"head"),EE.domAPI=f4(),EE.insertStyleElement=mn(),f3()(EC.A,EE);let ES=EC.A&&EC.A.locals?EC.A.locals:void 0;function ED({getIcon:e,hasUnsavedChanges:n,tagContent:t}){return(0,fQ.jsxs)(fQ.Fragment,{children:[e({size:16}),n?(0,fQ.jsx)("span",{className:ES.interruptedTag,children:"!"}):(0,fQ.jsx)("span",{className:ES.countTag,children:t})]})}let EM=({icon:e,label:n,tagContent:t,workspaceToLaunch:a,onBeforeWorkspaceLaunch:o})=>{let r=fb(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=Eb(),{extension:p}=(0,u8.useContext)(u9),u=i.findIndex(e=>e.windowName===p?.extensionId),d=i[u],f=null!=d,m=f&&(u<i.length-1||c),h=f&&!m,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)m?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:n,windowProps:t}=a;Em(e,n,t)}};return"tablet"===r||"phone"===r?(0,fQ.jsxs)(mu.$nd,{className:f1()(ES.container,{[ES.active]:f&&!h,[ES.focused]:h}),iconDescription:n,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fQ.jsx)("span",{className:ES.elementContainer,children:(0,fQ.jsx)(ED,{hasUnsavedChanges:g,getIcon:e,tagContent:t})}),(0,fQ.jsx)("span",{children:n})]}):(0,fQ.jsx)(mu.K0,{align:"left","aria-label":n,className:f1()(ES.container,{[ES.active]:f&&!h,[ES.focused]:h}),enterDelayMs:300,kind:"ghost",label:n,onClick:y,size:"md",children:(0,fQ.jsx)("div",{className:ES.elementContainer,children:(0,fQ.jsx)(ED,{hasUnsavedChanges:g,getIcon:e,tagContent:t})})})};function Ez({showContactDetails:e,toggleContactDetails:n,className:t}){return(0,fQ.jsx)(mu.$nd,{className:t,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:e?mH:mV,children:e?r_("showLess","Show less"):r_("showMore","Show more")})}var EO=t(95804),EP={};EP.styleTagTransform=ma(),EP.setAttributes=f9(),EP.insert=f8().bind(null,"head"),EP.domAPI=f4(),EP.insertStyleElement=mn(),f3()(EO.A,EP);let ET=EO.A&&EO.A.locals?EO.A.locals:void 0,EB=({patientUuid:e})=>{let{cohorts:n=[],isLoading:t}=function(e){let n=e?`${oh}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:t,isLoading:a}=(0,dS.Ay)(n,o_),o=t?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,u8.useMemo)(()=>({cohorts:o,isLoading:a}),[a,o])}(e);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsxs)("p",{className:ET.heading,children:[r_("patientLists","Patient Lists")," (",n?.length??0,")"]}),t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsxs)("ul",{children:[(()=>{if(n?.length>0){let e=n.sort((e,n)=>kk(e?.startDate).getTime()-kk(n?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fQ.jsx)("li",{children:(0,fQ.jsx)(de,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fQ.jsx)("li",{children:"--"})})(),n.length>3&&(0,fQ.jsx)("li",{className:ET.link,children:(0,fQ.jsx)(de,{to:`${window.spaBase}/home/patient-lists`,children:r_("seeMoreLists","See {{count}} more lists",{count:n?.length-3})})})]})]})},EI=({patientId:e})=>{let{patient:n,isLoading:t}=fD(e),a=n?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("address","Address")}),(0,fQ.jsx)("ul",{children:a?Object.entries(a).filter(([e])=>"id"!==e&&"use"!==e).map(([e,n])=>"extension"===e?a.extension?.[0]?.extension?.map((n,t)=>(0,fQ.jsxs)("li",{children:[r_(o(n.url),o(n.url)),": ",n.valueString]},`address-${e}-${t}`)):(0,fQ.jsxs)("li",{children:[r_(e,e),": ",n]},`address-${e}`)):(0,fQ.jsx)("li",{children:"--"})})]})},EN=({patientUuid:e})=>{let{isLoading:n,contactAttributes:t}=(e=>{let{contactAttributeTypes:n=[]}=d1({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:t,error:a,isLoading:o}=(e=>{let{data:n,error:t,isLoading:a}=d6()(`${oh}/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)))`,o_);return{isLoading:a,attributes:n?.data.person.attributes??[],error:t}})(e);return{contactAttributes:(0,u8.useMemo)(()=>t.filter(({attributeType:e})=>n?.some(n=>e.uuid===n)),[t,n]),isLoading:o,error:a}})(e),a=(0,u8.useMemo)(()=>t?[...t?.map(e=>[e.attributeType.display?r_(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[t]);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("contactDetails","Contact Details")}),n?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsx)("ul",{children:a.length?a.map(([e,n],t)=>(0,fQ.jsxs)("li",{children:[e,": ",n]},`${e}-${n}-${t}`)):(0,fQ.jsx)("li",{children:"--"})})]})},Ej=({patientId:e})=>{let{data:n,isLoading:t}=function(e){let n=`${oh}/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:a,isLoading:o,isValidating:r}=(0,dS.Ay)(e?n:null,o_),i=t?.data?.results?.length?function(e,n){let t=[];for(let a of n)e===a.personA.uuid?t.push({uuid:`${a.uuid}`,display:a.personB.display,relativeAge:a.personB.age,relativeUuid:a.personB.uuid,relationshipType:a.relationshipType.bIsToA}):t.push({uuid:`${a.uuid}`,display:a.personA.display,relativeAge:a.personA.age,relativeUuid:a.personA.uuid,relationshipType:a.relationshipType.aIsToB});return t}(e,t.data.results):null;return{data:t?i:null,error:a,isLoading:o,isValidating:r}}(e);return(0,fQ.jsxs)(fQ.Fragment,{children:[(0,fQ.jsx)("p",{className:ET.heading,children:r_("relationships","Relationships")}),t?(0,fQ.jsx)(mu.OuH,{description:`${r_("loading","Loading")} ...`,role:"progressbar"}):(0,fQ.jsx)("ul",{children:n&&n.length>0?(0,fQ.jsx)(fQ.Fragment,{children:n.map(e=>(0,fQ.jsxs)("li",{className:ET.relationship,children:[(0,fQ.jsx)("div",{children:(0,fQ.jsx)(de,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fQ.jsx)("div",{children:e.relationshipType}),(0,fQ.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?r_("yearAbbreviation","yr"):r_("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fQ.jsx)("li",{children:"--"})})]})};function ER({patientId:e,deceased:n}){return(0,fQ.jsxs)("div",{className:f1()(ET.contactDetails,{[ET.deceased]:n}),children:[(0,fQ.jsxs)("div",{className:ET.row,children:[(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EI,{patientId:e})}),(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EN,{patientUuid:e})})]}),(0,fQ.jsxs)("div",{className:ET.row,children:[(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(Ej,{patientId:e})}),(0,fQ.jsx)("div",{className:ET.col,children:(0,fQ.jsx)(EB,{patientUuid:e})})]})]})}function EF(e){let n=document.querySelector("template#loading-spinner");if(n){let t=n.content.cloneNode(!0),a=Array.prototype.map.call(t.childNodes,e=>e);return e.appendChild(t),()=>a.forEach(e=>e.remove())}return()=>{}}var EL=t(24039),EW={};EW.styleTagTransform=ma(),EW.setAttributes=f9(),EW.insert=f8().bind(null,"head"),EW.domAPI=f4(),EW.insertStyleElement=mn(),f3()(EL.A,EW);let EG=EL.A&&EL.A.locals?EL.A.locals:void 0;function EV({workspaceGroup:e,groupProps:n}){let t=fb(),{persistence:a}=e;return(0,fQ.jsx)("aside",{className:EG.sideRail,children:(0,fQ.jsxs)("div",{className:EG.container,children:["closable"==a&&f_(t)&&(0,fQ.jsx)(mu.K0,{align:"left",onClick:()=>Ef(),label:r_("close"),kind:"ghost",children:(0,fQ.jsx)(mK,{})}),(0,fQ.jsx)(u9.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fQ.jsx)(dd,{className:EG.container,name:e.name,state:{groupProps:n}})})]})})}let EU=({lifeCycle:e,openedWorkspace:n,openedWindow:t,isRootWorkspace:a,isLeafWorkspace:o,showActionMenu:r})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Eb(),c=(0,u8.useMemo)(()=>n&&{closeWorkspace:async(e={})=>{let{closeWindow:a=!1,discardUnsavedChanges:o=!1}=e;return a?!!(o||await Eg({reason:"CLOSE_WINDOW",explicit:!0,windowName:t.windowName}))&&(s(t.openedWorkspaces[0].workspaceName),!0):!!(o||await Eg({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:n.workspaceName}))&&(s(n.workspaceName),!0)},launchChildWorkspace:async(e,a)=>{let o=n.workspaceName,{openedWorkspaces:r}=t,i=r.findIndex(e=>e.workspaceName===o);-1===i||i!==r.length-1&&r.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Eg({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:r[i+1].workspaceName})||l(o,e,a||{})},workspaceName:n.workspaceName,workspaceProps:n.props,windowProps:t.props,groupProps:i&&i.props?i.props:null,isRootWorkspace:a,isLeafWorkspace:o,windowName:t.windowName,showActionMenu:r},[n,s,i,t]);if(!e){let{registeredWorkspacesByName:e}=uX.getState(),t=e[n.workspaceName],o=t&&t.window?t.window:void 0,{registeredWindowsByName:s}=uX.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,fQ.jsxs)("div",{className:f1()(Ew.workspaceOuterContainer,{[Ew.narrowWorkspace]:"narrow"===c,[Ew.widerWorkspace]:"wider"===c,[Ew.extraWideWorkspace]:"extra-wide"===c,[Ew.isActionMenuOpened]:p}),children:[(0,fQ.jsx)("div",{className:Ew.workspaceSpacer}),(0,fQ.jsx)("div",{className:f1()(Ew.workspaceMiddleContainer,{[Ew.isRootWorkspace]:a,[Ew.showActionMenu]:r}),children:(0,fQ.jsx)("div",{className:f1()(Ew.workspaceInnerContainer,{[Ew.isRootWorkspace]:a}),children:(0,fQ.jsx)(mu.OuH,{className:Ew.loader,description:`${r_("loading")} ...`})})})]})}return(0,fQ.jsx)(En,{config:e,mountParcel:ay,...c},n.workspaceName)},Eq=({openedWindow:e,showActionMenu:n})=>{let{openedWorkspaces:t}=e,[a,o]=(0,u8.useState)({}),{registeredWorkspacesByName:r}=uX.getState();return(0,u8.useEffect)(()=>{let e=!1;return Promise.all(t.map(async e=>{let{moduleName:n,component:t}=r[e.workspaceName];return[e.uuid,await fW(n,t)]})).then(n=>{e||o(Object.fromEntries(n))}),()=>{e=!0}},[t]),(0,fQ.jsx)(fQ.Fragment,{children:t.map((o,r)=>(0,fQ.jsx)(EU,{openedWorkspace:o,openedWindow:e,lifeCycle:a[o.uuid],isRootWorkspace:0===r,isLeafWorkspace:r===t.length-1,showActionMenu:n},o.uuid))})};var EH=t(297),EK={};EK.styleTagTransform=ma(),EK.setAttributes=f9(),EK.insert=f8().bind(null,"head"),EK.domAPI=f4(),EK.insertStyleElement=mn(),f3()(EH.A,EK);let EY=EH.A&&EH.A.locals?EH.A.locals:void 0;function EJ(e){e&&(0,df.createRoot)(e).render((0,fQ.jsx)(EZ,{}))}function EZ(){let{openedGroup:e,openedWindows:n,registeredGroupsByName:t,registeredWindowsByName:a}=Eb();if((0,u8.useEffect)(()=>px("before-page-changed",n=>{let{newPage:a,cancelNavigation:o,oldUrl:r,newUrl:i}=n;if(!e)return;if(a)return void o(Ef().then(e=>!e));let s=t[e.groupName],l=s?.scopePattern;l&&function(e,n,t){try{let a=new URL(n,window.location.origin).pathname,o=new URL(t,window.location.origin).pathname,r=new RegExp(e),i=a.match(r),s=o.match(r);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,r,i)&&o(Ef().then(e=>!e))}),[e,t]),!e)return null;let o=t[e.groupName],r=n.some(e=>e.maximized),{name:i}=o,s=Object.values(a).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,fQ.jsxs)("div",{className:f1()(EY.workspaceWindowsAndMenuContainer,{[EY.overlay]:o.overlay,[EY.hasMaximizedWindow]:r}),children:[(0,fQ.jsx)("div",{className:EY.workspaceWindowsContainer,children:n.map(e=>(0,fQ.jsx)(Eq,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,fQ.jsx)(EV,{workspaceGroup:o,groupProps:e.props})]})}function EX(e){if("string"!=typeof e||0===e.trim().length)return;let n=e.replaceAll("_","-");try{return new Intl.Locale(n).toString()}catch{return}}function EQ(e,n,t){if(null==e)return t;let a=EX(e);if(!a)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),t;let o=[];for(let e of n){let n=EX(e);if(!n){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:n,original:e})}let r=a;for(;r;){let e=o.find(e=>e.canonical===r);if(e)return e.original;let n=r+"-",t=o.find(e=>e.canonical.startsWith(n));if(t)return t.original;if("ht"===r){r="fr-HT";continue}let a=r.lastIndexOf("-");if(-1===a)break;let i=(r=r.slice(0,a)).lastIndexOf("-");-1!==i&&r.length-i==2&&(r=r.slice(0,i))}return t}function E0(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function E1(e){return!!e&&e.constructor===Object}var E2=t(99589);function E3(e){let[n,t,a]=e.split(".");return`${n}.${t}.${a}`}function E5(e,n){let t=function(e){let n=e.indexOf("-");if(n>=0){let t=E3(e.slice(0,n)),a=e.slice(n+1);return`${t}-${a}`}return E3(e)}(n);return E2.satisfies(t,e,{includePrerelease:!0})}async function E4(e,n={}){let t,{shouldRetry:a,getDelay:o,onError:r}=n;a=a??(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 E6(o(i)),await e()}catch(e){r?.(e,i),t=e}while(a(i++));throw t}async function E6(e){if(!(e<=0))return new Promise(n=>setTimeout(n,e))}}}]);
|