@openmrs/esm-app-shell 10.0.1-pre.5501 → 10.0.1-pre.5518
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/.turbo/turbo-build.log +3 -3
- package/dist/{5c95944850f7232b.js → 3c26a553b5db1c11.js} +1 -1
- package/dist/{5c95944850f7232b.js.map → 3c26a553b5db1c11.js.map} +1 -1
- package/dist/4f25fabfbd242652.js +1 -0
- package/dist/4f25fabfbd242652.js.map +1 -0
- package/dist/{418e84790d85e1d2.js → 58b422bb3e2b709e.js} +1 -1
- package/dist/{c1f558fe1c434557.js.map → 58b422bb3e2b709e.js.map} +1 -1
- package/dist/{fba2ce80145ad903.js → 820d3a7f53689510.js} +2 -2
- package/dist/820d3a7f53689510.js.map +1 -0
- package/dist/{c1f558fe1c434557.js → a59e93981b163fef.js} +1 -1
- package/dist/{418e84790d85e1d2.js.map → a59e93981b163fef.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{openmrs.05ce171d9c619ca8.js → openmrs.691cd99c638afa60.js} +3 -3
- package/dist/{openmrs.05ce171d9c619ca8.js.map → openmrs.691cd99c638afa60.js.map} +1 -1
- package/lib/{343561ee0709af1f.js → 0f3e13a16d559dba.js} +1 -1
- package/lib/18ec06b4e1782343.js +8 -0
- package/lib/258c11567d1269c4.js +16 -0
- package/lib/28cd0b4d1d48499c.js +8 -0
- package/lib/{f7c61d1509f22b7f.js → 6c72dcc37b6da71c.js} +9 -1
- package/lib/{51d41341fd8d1dd7.js → 9585b7e8fd13cf44.js} +3 -3
- package/lib/965c2ea7ad36f9b9.js +16 -0
- package/lib/{10b4ef27e2197006.js → bf18b81b008d141f.js} +1 -1
- package/lib/c912d57aa96a2320.js +12 -0
- package/lib/{2c82de43c389188c.js → cde39f3d2a3c48d0.js} +1 -1
- package/lib/dcee9941dbf0fcae.js +8 -0
- package/lib/e0650e8f5bc5a5f0.js +16 -0
- package/lib/{0a393d2628c92699.js → ecb3a4bbeb2c0246.js} +1 -1
- package/lib/openmrs.js +7 -7
- package/package.json +3 -3
- package/dist/3dc3febe66b7c3f7.js +0 -1
- package/dist/3dc3febe66b7c3f7.js.map +0 -1
- package/dist/fba2ce80145ad903.js.map +0 -1
- package/lib/4e43d493d0158201.js +0 -8
- package/lib/5135ee43a98e1957.js +0 -8
- package/lib/851dcadf831a3e95.js +0 -8
- package/lib/91a6d7bbfee7d3e9.js +0 -8
- package/lib/cd15c92ac4bf8df8.js +0 -16
- package/lib/d4217550e793514c.js +0 -8
|
@@ -28,5 +28,5 @@ To fix this, ensure that you define the "description" field inside the feature f
|
|
|
28
28
|
To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
|
|
29
29
|
To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function eA(){eC.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of eC){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${n}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1===r)return console.warn(`A registered page definition is missing a route and thus cannot be registered.
|
|
30
30
|
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e);if(!t.component)return console.warn(`A registered page definition is missing a component and thus cannot be registered.
|
|
31
|
-
To fix this, ensure that you define the "component" field inside the page definition.`,e);let n=function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!(0,eg.jj)(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?(0,ex.pathToActiveWhen)(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t);(0,ex.registerApplication)(e,()=>eS(t.appName,t.component),n)}(n,t)}}var ek=r(61841);let eT={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 eR(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<eT.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>eT.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>eT.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<eT.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<eT.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<eT.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>eT.SMALL_DESKTOP_MAX)}let eN=!1;function eI(){eN||(window.addEventListener("resize",eR),eR(),eN=!0)}var eM=r(50457),e$=r(46925),eL=r.n(e$),eF=r(46073),eB=r.n(eF);function eV({title:e,children:t}){let r="tablet"===(0,e_.qv)();return(0,eM.jsxs)("div",{className:eB()({"Vkmd-M3ZdPZe+c6OloVbnw==":r,"ocWGqN+S6wY3-wV0QG3pOw==":!r}),children:[(0,eM.jsx)("h4",{children:e}),t]})}var eU=r(3855),eW=r(18326);let ez={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},eK=e=>(0,eM.jsx)(eW.TableBatchActions,{translateWithId:(e,t)=>{let r=ez[e];return r?(0,h.V)(r,e,t):e},...e}),eH="_8PykSzSXNNdifN25ybqq3w==",eG="qsOLntRcFqCu-mnZH0czJA==",eq="BserJewmzluWUcq5q8a0yw==",eZ="n86GzT7Rs8Kf8e25ihYZPg==",eY=(0,e$.createContext)(null);function eJ(){let e=(0,e$.useContext)(eY);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function eQ({menuTitle:e,children:t}){let[r,n]=eL().useState(!1),o=(0,e_.Wr)(()=>n(!1),r),i="tablet"===(0,e_.qv)(),a=(0,e$.useCallback)(()=>n(e=>!e),[]),s=(0,e$.useRef)(null),l=(0,e$.useRef)(null),u=(0,e$.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,e$.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,e$.useMemo)(()=>({closeMenu:f}),[f]),h=(0,e$.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=e$.Children.toArray(t);(0,e$.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,e$.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),v=m.map((e,t)=>(0,e$.isValidElement)(e)?(0,e$.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,eM.jsxs)("div",{"data-overflow-menu":!0,className:eB()("cds--overflow-menu",eH),ref:o,children:[(0,eM.jsx)("button",{className:eB()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},eZ),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,eM.jsxs)("div",{className:eB()("cds--overflow-menu-options","cds--overflow-menu--flip",eG,{[eq]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,eM.jsx)("ul",{className:eB()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,eM.jsx)(eY.Provider,{value:p,children:v})}),(0,eM.jsx)("span",{})]})]})}function eX(e){let t=(0,e$.useContext)(eY);return(0,eM.jsx)(eW.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var e0=r(99737),e1=r(47665);let e4=["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-mobile-check","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-two-factor-authentication","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"],e2=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),e3=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-add",iconProps:e})})),e6=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),e5=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),e9=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),e8=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),e7=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),te=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),tt=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),tr=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),tn=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),to=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),ti=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),ta=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),ts=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),tl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),tu=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),tc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),td=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),tf=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),tp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),th=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),tm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close",iconProps:e})})),ty=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),tv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),tg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-document",iconProps:e})})),tb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),tw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-download",iconProps:e})})),t_=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),tx=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),tE=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),tS=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-events",iconProps:e})})),tD=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),tO=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),tP=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),tC=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),tj=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),tA=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-group",iconProps:e})})),tk=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),tT=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),tR=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),tN=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information",iconProps:e})})),tI=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),tM=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),t$=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),tL=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),tF=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),tB=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-location",iconProps:e})})),tV=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),tU=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),tW=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),tz=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),tK=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),tH=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),tG=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-money",iconProps:e})})),tq=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),tZ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),tY=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),tJ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),tQ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-password",iconProps:e})})),tX=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),t0=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),t1=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),t4=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),t2=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),t3=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),t6=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),t5=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-report",iconProps:e})})),t9=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),t8=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-save",iconProps:e})})),t7=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-search",iconProps:e})})),re=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),rt=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),rr=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),rn=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),ro=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),ri=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),ra=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),rs=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-table",iconProps:e})})),rl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-time",iconProps:e})})),ru=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),rc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),rd=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),rf=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),rp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),rh=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),rm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),ry=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),rv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user",iconProps:e})})),rg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),rb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-view",iconProps:e})})),rw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),r_=rw,rx=tb,rE=tF,rS=tR,rD=rn,rO=(0,e$.memo)((0,e$.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,e$.useRef)(e?document.getElementById(e):void 0);return(0,e$.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,eM.jsx)(e_.fS,{value:o.current,fallback:t,children:(0,eM.jsx)(rP,{ref:n,icon:e,iconProps:r})})})),rP=(0,e$.memo)((0,e$.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,e$.useRef)(null);return(0,e$.useImperativeHandle)(r,()=>a.current),(0,e$.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,eM.jsx)("svg",{ref:a,className:eB()("omrs-icon","BfFhdfwf1e98NnHqJTMOmw==",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,eM.jsx)("use",{href:`#${e}`})})})),rC=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,e0.useTranslation)(),i=(0,e1.useLocation)(),a=(0,e$.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,eM.jsx)("div",{children:(0,eM.jsx)(e_.i_,{className:eB()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,eM.jsxs)("span",{className:"ds1tfuMnfJ+PmahVRNLpnQ==",children:[(0,eM.jsx)(rO,{icon:n,className:"_4ZrrhAdbDQb3EuiAijKGFw==",size:16}),(0,eM.jsx)("span",{children:o(t)})]})})},e)};function rj(e){return function({basePath:t}){return(0,eM.jsx)(e1.BrowserRouter,{children:(0,eM.jsx)(rC,{basePath:t,...e})})}}function rA(e){let t=(0,e$.useRef)(null);return(0,e$.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function rk(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let rT="u">typeof document?eL().useLayoutEffect:()=>{};function rR(e){let t=(0,e$.useRef)(null);return rT(()=>{t.current=e},[e]),(0,e$.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let rN={prefix:String(Math.round(1e10*Math.random())),current:0},rI=eL().createContext(rN),rM=eL().createContext(!1),r$=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),rL="function"==typeof eL().useId?function(e){let t=eL().useId(),[r]=(0,e$.useState)(rU()),n=r?"react-aria":`react-aria${rN.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,e$.useContext)(rI),r=function(e=!1){let t=(0,e$.useContext)(rI),r=(0,e$.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=eL().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=r$.get(e);null==r?r$.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,r$.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function rF(){return!1}function rB(){return!0}function rV(e){return()=>{}}function rU(){return"function"==typeof eL().useSyncExternalStore?eL().useSyncExternalStore(rV,rF,rB):(0,e$.useContext)(rM)}let rW=!!("u">typeof window&&window.document&&window.document.createElement),rz=new Map;function rK(e){let[t,r]=(0,e$.useState)(e),o=(0,e$.useRef)(null),i=rL(t),a=(0,e$.useRef)(null);if(n&&n.register(a,i),rW){let e=rz.get(i);e&&!e.includes(o)?e.push(o):rz.set(i,[o])}return rT(()=>()=>{n&&n.unregister(a),rz.delete(i)},[i]),(0,e$.useEffect)(()=>{let e=o.current;return e&&r(e),()=>{e&&(o.current=null)}}),i}function rH(e=[]){let t=rK(),[r,n]=function(e){let[t,r]=(0,e$.useState)(e),n=(0,e$.useRef)(null),o=rR(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});rT(()=>{n.current&&o()});let i=rR(e=>{n.current=e(t),o()});return[t,i]}(t),o=(0,e$.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return rT(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(n=new FinalizationRegistry(e=>{rz.delete(e)}));let rG=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function rq(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=rk(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=rG(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=rz.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=rz.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let rZ=Symbol("default");function rY({values:e,children:t}){for(let[r,n]of e)t=eL().createElement(r.Provider,{value:n},t);return t}function rJ(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,e$.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function rQ(e,t){let r=(0,e$.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||rZ;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function rX(e,t,r){let{ref:n,...o}=rQ(r,e.slot)||{},i=rA((0,e$.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),a=rq(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function r0(e=!0){let[t,r]=(0,e$.useState)(e),n=(0,e$.useRef)(!1),o=(0,e$.useCallback)(e=>{n.current=!0,r(!!e)},[]);return rT(()=>{n.current||r(!1)},[]),[o,t]}function r1(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let r4=(0,e$.createContext)(null),r2=null;function r3(e,t="assertive",r=7e3){r2?r2.announce(e,t,r):(r2=new r6,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?r2.announce(e,t,r):setTimeout(()=>{(null==r2?void 0:r2.isAttached())&&(null==r2||r2.announce(e,t,r))},100))}class r6{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}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 r5=new Set(["id"]),r9=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),r8=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),r7=/^(data-.*)$/;function ne(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r5.has(t)||r&&r9.has(t)||n&&r8.has(t)||(null==o?void 0:o.has(t))||r7.test(t))&&(i[t]=e[t]);return i}let nt=["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"])'],nr=nt.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";nt.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let nn=nt.join(':not([hidden]):not([tabindex="-1"]),');function no(e){return e.matches(nr)}function ni(e){return e.matches(nn)}let na=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},ns=e=>e&&"window"in e&&e.window===e?e:na(e).defaultView||window;function nl(e){if(function(){if(null==nu){nu=!1;try{document.createElement("div").focus({get preventScroll(){return nu=!0,!0}})}catch{}}return nu}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let nu=null;function nc(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function nd(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function nf(e){let t=(0,e$.useRef)({isFocused:!1,observer:null});rT(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=rR(t=>{null==e||e(t)});return(0,e$.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(nc(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let np=!1;function nh(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function nm(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ny(e){let t=null;return()=>(null==t&&(t=e()),t)}let nv=ny(function(){return nm(/^Mac/i)}),ng=ny(function(){return nm(/^iPhone/i)}),nb=ny(function(){return nm(/^iPad/i)||nv()&&navigator.maxTouchPoints>1}),nw=ny(function(){return ng()||nb()});ny(function(){return nv()||nw()});let n_=ny(function(){return nh(/AppleWebKit/i)&&!nx()}),nx=ny(function(){return nh(/Chrome/i)}),nE=ny(function(){return nh(/Android/i)}),nS=ny(function(){return nh(/Firefox/i)}),nD=new Map,nO=new Set;function nP(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=nD.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),nD.delete(r.target)),0===nD.size)){for(let e of nO)e();nO.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=nD.get(r.target);n||(n=new Set,nD.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function nC(e){requestAnimationFrame(()=>{0===nD.size?e():nO.add(e)})}"u">typeof document&&("loading"!==document.readyState?nP():document.addEventListener("DOMContentLoaded",nP));let nj="default",nA="",nk=new WeakMap;function nT(e){if(nw())"disabled"===nj&&(nj="restoring",setTimeout(()=>{nC(()=>{if("restoring"===nj){let t=na(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=nA||""),nA="",nj="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&nk.has(e)){let t=nk.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),nk.delete(e)}}let nR=eL().createContext({register:()=>{}});function nN(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function nI(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function nM(e,t,r){var n=nN(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function n$(e,t){rT(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function nL(){let e=(0,e$.useRef)(new Map),t=(0,e$.useCallback)((t,r,n,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,e$.useCallback)((t,r,n,o)=>{var i;let a=(null==(i=e.current.get(n))?void 0:i.fn)||n;t.removeEventListener(r,a,o),e.current.delete(n)},[]),n=(0,e$.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,e$.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}nR.displayName="PressResponderContext";function nF(e,t){return!!t&&!!e&&e.contains(t)}function nB(e){return e.target}function nV(e,t,r=!0){var n,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;nS()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(nv()?i=!0:a=!0);let u=n_()&&nv()&&!nb()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});nV.isOpening=r,nl(e),e.dispatchEvent(u),nV.isOpening=!1}function nU(e){return 0===e.mozInputSource&&!!e.isTrusted||(nE()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}nV.isOpening=!1;var nW=r(22065),nz=r.n(nW),nK=new WeakMap;class nH{continuePropagation(){nM(this,nK,!1)}get shouldStopPropagation(){var e;return e=nN(this,nK,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;nI(this,nK,{writable:!0,value:void 0}),nM(this,nK,!0);let i=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),a&&(null!=u&&null!=c?(s=u-a.left,l=c-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let nG=Symbol("linkClicked");function nq(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,e$.useContext)(nR);if(t){let{register:r,...n}=t;e=rq(n,e),r()}return n$(t,e.ref),e}(e),[h,m]=(0,e$.useState)(!1),y=(0,e$.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:v,removeAllGlobalListeners:g}=nL(),b=rR((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new nH("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),w=rR((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new nH("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new nH("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),x=rR((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new nH("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=rR(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(nJ(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,g(),d||nT(t.target),t.disposables))r();t.disposables=[]}}),S=rR(e=>{c&&E(e)}),D=rR(e=>{null==a||a(e)}),O=rR((e,t)=>{if(a){let r=new MouseEvent("click",e);nd(r,t),a(nc(r))}}),P=(0,e$.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(nY(t.nativeEvent,t.currentTarget)&&nF(t.currentTarget,nB(t.nativeEvent))){var n;nQ(nB(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;v(na(t.currentTarget),"keyup",rk(t=>{nY(t,n)&&!t.repeat&&nF(n,nB(t))&&e.target&&x(nJ(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&nv()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||nF(t.currentTarget,nB(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!nV.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||nU(t.nativeEvent))){let e=b(t,"virtual"),n=x(t,"virtual"),o=w(t,"virtual");D(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(nJ(t.currentTarget,t),n,!0),e.isOverTarget=!1,D(t),E(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&nY(t,e.target)){nQ(nB(t),t.key)&&t.preventDefault();let r=nB(t),o=nF(e.target,nB(t));w(nJ(e.target,t),"keyboard",o),o&&O(t,e.target),g(),"Enter"!==t.key&&nZ(e.target)&&nF(e.target,r)&&!t[nG]&&(t[nG]=!0,nV(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!nF(t.currentTarget,nB(t.nativeEvent)))return;if(o=t.nativeEvent,!nE()&&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=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(nw()){if("default"===nj){let t=na(e);nA=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}nj="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";nk.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=b(t,e.pointerType);let o=nB(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),v(na(t.currentTarget),"pointerup",r,!1),v(na(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(nF(t.currentTarget,nB(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!no(e);)e=e.parentElement;let t=ns(e),r=t.document.activeElement;if(!r||r===e)return;np=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},i=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,nl(r),l()))},a=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,nl(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),np=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{nF(t.currentTarget,nB(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(nJ(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(nJ(e.target,t),e.pointerType,!1),S(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(nF(e.target,nB(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?E(t):(nl(e.target),e.target.click()))},80);v(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else E(t);e.isOverTarget=!1}},n=e=>{E(e)};t.onDragStart=e=>{nF(e.currentTarget,nB(e.nativeEvent))&&E(e)}}return t},[v,s,u,g,d,E,S,w,b,x,D,O]);return(0,e$.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof ns(e).Element&&"auto"===ns(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,e$.useEffect)(()=>{let e=y.current;return()=>{var t;for(let r of(d||nT(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:rq(p,P)}}function nZ(e){return"A"===e.tagName&&e.hasAttribute("href")}function nY(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof ns(t).HTMLInputElement&&!n0(t,r)||t instanceof ns(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&nZ(t))&&"Enter"!==r)}function nJ(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function nQ(e,t){return e instanceof HTMLInputElement?!n0(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!nZ(e))}let nX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function n0(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:nX.has(e.type)}let n1=null,n4=new Set,n2=new Map,n3=!1,n6=!1,n5={Tab:!0,Escape:!0};function n9(e,t){for(let r of n4)r(e,t)}function n8(e){n3=!0,e.metaKey||!nv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(n1="keyboard",n9("keyboard",e))}function n7(e){n1="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(n3=!0,n9("pointer",e))}function oe(e){nU(e)&&(n3=!0,n1="virtual")}function ot(e){e.target!==window&&e.target!==document&&!np&&e.isTrusted&&(n3||n6||(n1="virtual",n9("virtual",e)),n3=!1,n6=!1)}function or(){np||(n3=!1,n6=!0)}function on(e){if("u"<typeof window||n2.get(ns(e)))return;let t=ns(e),r=na(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){n3=!0,n.apply(this,arguments)},r.addEventListener("keydown",n8,!0),r.addEventListener("keyup",n8,!0),r.addEventListener("click",oe,!0),t.addEventListener("focus",ot,!0),t.addEventListener("blur",or,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",n7,!0),r.addEventListener("pointermove",n7,!0),r.addEventListener("pointerup",n7,!0)),t.addEventListener("beforeunload",()=>{oo(e)},{once:!0}),n2.set(t,{focus:n})}let oo=(e,t)=>{let r=ns(e),n=na(e);t&&n.removeEventListener("DOMContentLoaded",t),n2.has(r)&&(r.HTMLElement.prototype.focus=n2.get(r).focus,n.removeEventListener("keydown",n8,!0),n.removeEventListener("keyup",n8,!0),n.removeEventListener("click",oe,!0),r.removeEventListener("focus",ot,!0),r.removeEventListener("blur",or,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",n7,!0),n.removeEventListener("pointermove",n7,!0),n.removeEventListener("pointerup",n7,!0)),n2.delete(r))};function oi(){return"pointer"!==n1}"u">typeof document&&("loading"!==(s=na(void 0)).readyState?on(void 0):s.addEventListener("DOMContentLoaded",()=>{on(void 0)}));let oa=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function os(e){let t=na(e),r=((e=document)=>e.activeElement)(t);"virtual"===n1?nC(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&nl(e)}):nl(e)}function ol(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,e$.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=nf(i),s=(0,e$.useCallback)(e=>{let t=na(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===nB(e.nativeEvent)&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function ou(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let oc=eL().createContext(null);function od(e,t){let{focusProps:r}=ol(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:ou(e.onKeyDown),onKeyUp:ou(e.onKeyUp)}},o=rq(r,n),i=function(e){let t=(0,e$.useContext)(oc)||{};n$(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,e$.useRef)(e.autoFocus);(0,e$.useEffect)(()=>{s.current&&t.current&&os(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:rq({...o,tabIndex:l},a)}}function of(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,e$.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=nL(),l=(0,e$.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=nf(l),c=(0,e$.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=na(e.target),r=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&r===nB(e.nativeEvent)){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let r=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!nF(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});nd(n,r),l(nc(n))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function op(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,e$.useRef)({isFocused:!1,isFocusVisible:r||oi()}),[a,s]=(0,e$.useState)(!1),[l,u]=(0,e$.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,e$.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,e$.useCallback)(e=>{i.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},on(),(0,e$.useEffect)(()=>{let e=(e,r)=>{var n;let o,a,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=na(null==r?void 0:r.target),a="u">typeof window?ns(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?ns(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?ns(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?ns(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof a&&!oa.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!n5[r.key]||(e=>{i.current.isFocusVisible=e,c()})(oi())};return n4.add(e),()=>{n4.delete(e)}},[]);let{focusProps:f}=ol({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=of({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?p:f}}eL().forwardRef(function(e,t){let{children:r,...n}=e,o=rA(t),i={...n,ref:o};return eL().createElement(oc.Provider,{value:i},r)});let oh=!1,om=0;function oy(e){"touch"===e.pointerType&&(oh=!0,setTimeout(()=>{oh=!1},50))}function ov(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",oy),om++,()=>{!(--om>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",oy)}}function og(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,e$.useState)(!1),s=(0,e$.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,e$.useEffect)(ov,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=nL(),{hoverProps:c,triggerHoverEnd:d}=(0,e$.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{oh&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(na(n.target),"pointerover",t=>{s.isHovered&&s.target&&!nF(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,e$.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 ob=(0,e$.createContext)(!1);function ow(e){let t=(t,r)=>(0,e$.useContext)(ob)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,e$.forwardRef)(t)}let o_=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),ox=(0,e$.createContext)({}),oE=ow(function(e,t){var r;[e,t]=rX(e,t,ox);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:v,isPressed:g}=nq({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=od(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=rq(b,v,ne(e,{labelable:!0}));return{isPressed:g,buttonProps:rq(r,w,{"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,t),{focusProps:s,isFocused:l,isFocusVisible:u}=op(e),{hoverProps:c,isHovered:d}=og({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=rJ({...e,values:f,defaultClassName:"react-aria-Button"}),h=rK(i.id),m=rK(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let v=(0,e$.useRef)(o);return(0,e$.useEffect)(()=>{let e={"aria-labelledby":y||h};!v.current&&l&&o?r3(e,"assertive"):v.current&&l&&!o&&r3(e,"assertive"),v.current=o},[o,l,y,h]),eL().createElement("button",{...ne(e,{propNames:o_}),...rq(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},eL().createElement(r4.Provider,{value:{id:m}},p.children))});(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null);let oS=(0,e$.createContext)({}),oD=(0,e$.createContext)({}),oO=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,oD);let{elementType:r="span",...n}=e;return eL().createElement(r,{className:"react-aria-Text",...n,ref:t})}),oP=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),oC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function oj(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return oP.has(t.script)}let t=e.split("-")[0];return oC.has(t)}let oA=Symbol.for("react-aria.i18n.locale");function ok(){let e="u">typeof window&&window[oA]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:oj(e)?"rtl":"ltr"}}let oT=ok(),oR=new Set;function oN(){for(let e of(oT=ok(),oR))e(oT)}function oI(){let e=rU(),[t,r]=(0,e$.useState)(oT);return((0,e$.useEffect)(()=>(0===oR.size&&window.addEventListener("languagechange",oN),oR.add(r),()=>{oR.delete(r),0===oR.size&&window.removeEventListener("languagechange",oN)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let oM=eL().createContext(null);function o$(e){let{locale:t,children:r}=e,n=oI(),o=eL().useMemo(()=>t?{locale:t,direction:oj(t)?"rtl":"ltr"}:n,[n,t]);return eL().createElement(oM.Provider,{value:o},r)}function oL(){let e=oI();return(0,e$.useContext)(oM)||e}var oF={};function oB(e,t){return e-t*Math.floor(e/t)}function oV(e,t,r,n){let o=(t=oW(e,t))-1,i=-2;return r<=2?i=0:oU(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function oU(e){return e%4==0&&(e%100!=0||e%400==0)}function oW(e,t){return"BC"===e?1-t:t}function oz(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}oF={"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 oK={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 oH{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=oB(t,146097),o=Math.floor(n/36524),i=oB(n,36524),a=Math.floor(i/1461),s=Math.floor(oB(i,1461)/365),[l,u]=oz(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-oV(l,u,1,1),d=2;e<oV(l,u,3,1)?d=0:oU(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-oV(l,u,f,1)+1;return new ii(l,u,f,p)}toJulianDay(e){return oV(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return oK[oU(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return oU(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 oG(e,t){let r=e.copy(),n="hour"in r?o2(r,t):0;oq(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,oZ(r),oY(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,oZ(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,oZ(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var i,a;let e=null==(i=(a=r.calendar).isInverseEra)?void 0:i.call(a,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function oq(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function oZ(e){for(;e.month<1;)oq(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,oq(e,1)}function oY(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 oJ(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),oY(e)}function oQ(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function oX(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),oJ(r),r}function o0(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),o1(r),r}function o1(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 o4(e,t){let r=e%t;return r<0&&(r+=t),r}function o2(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=o4(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=o4(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=o4(e.minute,60),r=Math.floor(e.hour/24),e.hour=o4(e.hour,24),r}function o3(e,t){let r=e.copy();return o2(r,t),r}function o6(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=o9(i,r,0,t.length-1,null==n?void 0:n.round),o.era=t[i],oJ(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(r=-r),o.year=o9(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=o9(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=o9(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),oJ(o),o}function o5(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=o9(t,r,i,a,null==n?void 0:n.round);break}case"minute":o.minute=o9(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=o9(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=o9(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function o9(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function o8(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?ig(oG(ix(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):ip(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),iE(iw(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function o7(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 ie(e){let t,r=iE(e,new oH);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function it(e){return`${ie(e)}T${o7(e)}`}function ir(e){let t,r="object"==typeof e[0]?e.shift():new oH;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var io=new WeakMap;class ii{copy(){return this.era?new ii(this.calendar,this.era,this.year,this.month,this.day):new ii(this.calendar,this.year,this.month,this.day)}add(e){return oG(this,e)}subtract(e){return oG(this,oQ(e))}set(e){return oX(this,e)}cycle(e,t,r){return o6(this,e,t,r)}toDate(e){return ib(this,e)}toString(){return ie(this)}compare(e){return iT(this,e)}constructor(...e){nI(this,io,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,oJ(this)}}var ia=new WeakMap;class is{copy(){return new is(this.hour,this.minute,this.second,this.millisecond)}add(e){return o3(this,e)}subtract(e){return o3(this,oQ(e))}set(e){return o0(this,e)}cycle(e,t,r){return o5(this,e,t,r)}toString(){return o7(this)}compare(e){var t,r;return t=this,r=e,iR(t)-iR(r)}constructor(e=0,t=0,r=0,n=0){nI(this,ia,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,o1(this)}}var il=new WeakMap;class iu{copy(){return this.era?new iu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new iu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return oG(this,e)}subtract(e){return oG(this,oQ(e))}set(e){return oX(o0(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return o6(this,e,t,r);default:return o5(this,e,t,r)}}toDate(e,t){return ib(this,e,t)}toString(){return it(this)}compare(e){var t,r;let n=iT(this,e);return 0===n?(t=this,r=ix(e),iR(t)-iR(r)):n}constructor(...e){nI(this,il,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,oJ(this)}}var ic=new WeakMap;class id{copy(){return this.era?new id(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new id(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return o8(this,e)}subtract(e){return o8(this,oQ(e))}set(e,t){let r,n;return 0===(n=o0(oX(r=ix(this),e),e)).compare(r)?this:iE(iw(ig(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=ix(e),a=iE(o0(i,{hour:t}),new oH),s=[ig(a,e.timeZone,"earlier"),ig(a,e.timeZone,"later")].filter(t=>iw(t,e.timeZone).day===a.day)[0],l=iE(o0(i,{hour:o}),new oH),u=[ig(l,e.timeZone,"earlier"),ig(l,e.timeZone,"later")].filter(t=>iw(t,e.timeZone).day===l.day).pop(),c=ip(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return iE(iw(c=36e5*o9(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return o5(e,t,r,n);case"era":case"year":case"month":case"day":return iE(iw(ig(o6(ix(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(ip(e)-e.offset)}toString(){var e;let t,r,n;return`${it(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof id){var r,n;return e.timeZone===t?e:(r=e,n=t,iE(iw(ip(r)-r.offset,n),r.calendar))}return iw(ig(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){nI(this,ic,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,oJ(this)}}function ip(e){return ih(oW((e=iE(e,new oH)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ih(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function im(e,t){if("UTC"===t)return 0;if(e>0&&t===iI())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=iv(e,t);return ih(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let iy=new Map;function iv(e,t){let r=iy.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),iy.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"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 ig(e,t,r="compatible"){var n,o,i;let a=ix(e);if("UTC"===t)return ip(a);if(t===iI()&&"compatible"===r){a=iE(a,new oH);let e=new Date,t=oW(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=ip(a),l=im(s-864e5,t),u=im(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=iv(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function ib(e,t,r="compatible"){return new Date(ig(e,t,r))}function iw(e,t){let r=im(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new id(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function i_(e){return new ii(e.calendar,e.era,e.year,e.month,e.day)}function ix(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new iu(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function iE(e,t){if(iP(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,oJ(n),n}let iS={"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 iD(e,t){return t=iE(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function iO(e,t){return iP(e.calendar,t.calendar)&&iD(e,t)}function iP(e,t){var r,n,o,i;return null!=(i=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?i:e.identifier===t.identifier}let iC={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function ij(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?iC[r]:(n=function(e){if(Intl.Locale){let t=iF.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&iF.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&iS[n]||0))%7;return o<0&&(o+=7),o}function iA(e){return iw(Date.now(),e)}function ik(e){return i_(iA(e))}function iT(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function iR(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let iN=null;function iI(){return null==iN&&(iN=new Intl.DateTimeFormat().resolvedOptions().timeZone),iN}function iM(e){return e.subtract({days:e.day-1})}function i$(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function iL(e,t,r){let n=ij(e,t,r);return e.subtract({days:n})}let iF=new Map;function iB(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function iV(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let iU=Symbol.for("react-aria.i18n.locale"),iW=Symbol.for("react-aria.i18n.strings");class iz{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[iU];if(void 0===l){let e=window[iW];if(!e)return null;for(let r in l={},e)l[r]=new iz({[t]:e[r]},t)}let r=null==l?void 0:l[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let iK=new Map,iH=new Map;class iG{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=iK.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),iK.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=iH.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),iH.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let iq=new WeakMap;function iZ(e,t){let r;return t&&iz.getGlobalDictionaryForPackage(t)||((r=iq.get(e))||(r=new iz(e),iq.set(e,r)),r)}function iY(e,t){let{locale:r}=oL(),n=iZ(e,t);return(0,e$.useMemo)(()=>new iG(r,n),[r,n])}let iJ=new Map;class iQ{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==i4&&(i4="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),i4&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=i0(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&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,t={}){this.formatter=i0(e,t),this.options=t}}let iX={true:{ja:"h11"},false:{}};function i0(e,t={}){if("boolean"==typeof t.hour12&&(null==i1&&(i1="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),i1)){let r=iX[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(iJ.has(r))return iJ.get(r);let n=new Intl.DateTimeFormat(e,t);return iJ.set(r,n),n}let i1=null,i4=null;function i2(e,t){let r=(0,e$.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function i3(e){e=i2(null!=e?e:{},i6);let{locale:t}=oL();return(0,e$.useMemo)(()=>new iQ(t,e),[t,e])}function i6(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function i5(e){return e&&e.__esModule?e.default:e}let i9=new WeakMap;function i8(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function i7(e,t,r,n){let o=iY(i5(oF),"@react-aria/calendar"),i=i8(e)||i8(t),a=i3({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=i3({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,e$.useMemo)(()=>{if(iD(e,iM(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),iD(t,i$(e)))return a.format(i.toDate(r));if(iD(t,i$(t)))return n?ae(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?ae(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function ae(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function at(e,t){let r=(0,e$.useRef)(!0),n=(0,e$.useRef)(null);(0,e$.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,e$.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function ar(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=rK(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function an(e,t){var r,n;let o,i,a,s,l,u=iY((r=oF)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=ne(e),d=i7(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=i7(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);at(()=>{t.isFocused||r3(f)},[f]);let p=(a=iY(i5(oF),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(n=t.value)?n:void 0,s=i3({weekday:"long",month:"long",year:"numeric",day:"numeric",era:i8(o)||i8(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,e$.useMemo)(()=>{if(!l&&o&&i)if(iD(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=ae(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));at(()=>{p&&r3(p,"polite",4e3)},[p]);let h=rH([!!e.errorMessage,e.isInvalid,e.validationState]);i9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:p});let[m,y]=(0,e$.useState)(!1),v=e.isDisabled||t.isNextVisibleRangeInvalid();v&&m&&(y(!1),t.setFocused(!0));let[g,b]=(0,e$.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&g&&(b(!1),t.setFocused(!0)),{calendarProps:rq(c,ar({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:v,onFocusChange:y},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:h},title:d}}let ao={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 ai(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,e$.useState)(!1),{focusWithinProps:i}=of({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,e$.useMemo)(()=>n?t:t?{...ao,...t}:ao,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return eL().createElement(r,rq(i,a),t)}function aa(e,t,r,n){let o=rR(r),i=null==r;(0,e$.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i,o])}let as=0,al=new Map;function au(e){let[t,r]=(0,e$.useState)();return rT(()=>{if(!e)return;let t=al.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${as++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},al.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),al.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function ac(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function ad(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function af(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(a).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)ac(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=ad(e,t,"left"),n=ad(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),h=a+parseInt(u,10),m=s+parseInt(l,10),y=h+e.clientWidth,v=m+e.clientHeight,g=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,x=parseInt(p,10)||0;r<=a+x?a=r-parseInt(u,10)-x:r+o>y-w&&(a+=r+o-y+w),n<=m+g?s=n-parseInt(l,10)-g:n+i>v-b&&(s+=n+i-v+b),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var r,n,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(a-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function ap(e,t){let r=e;for(ac(r,t)&&(r=r.parentElement);r&&!ac(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class ah extends oH{fromJulianDay(e){let t=super.fromJulianDay(e);return new ii(this,oW(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(am(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(am(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function am(e){let[t,r]=oz(e.year+-543);return new ii(t,r,e.month,e.day)}function ay(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function av(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-ay(e,r,1,1))/30),o=t+1-ay(e,r,n,1);return[r,n,o]}function ag(e){return Math.floor(e%4/3)}function ab(e,t){return t%13!=0?30:ag(e)+5}class aw{fromJulianDay(e){let[t,r,n]=av(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new ii(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),ay(1723856,t,e.month,e.day)}getDaysInMonth(e){return ab(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+ag(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class a_ extends aw{fromJulianDay(e){let[t,r,n]=av(1723856,e);return new ii(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class ax extends aw{fromJulianDay(e){let[t,r,n]=av(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new ii(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ay(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ab(t,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 aE=765433;function aS(e){return 7>oB(7*e+1,19)}function aD(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>oB(3*(r+1),7)&&(r+=1),r}function aO(e){let t,r;return aD(e)+(t=aD(e-1),r=aD(e),aD(e+1)-r==356?2:+(r-t==382))}function aP(e){return aO(e+1)-aO(e)}function aC(e,t){if(t>=6&&!aS(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=aP(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!aS(e):30}class aj{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/aE*19+234)/235)+1,n=aO(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=aO(--r)));let i=1,a=0;for(;a<o;)a+=aC(r,i),i++;let s=o-(a-=aC(r,--i));return new ii(this,r,i,s)}toJulianDay(e){let t=aO(e.year);for(let r=1;r<e.month;r++)t+=aC(e.year,r);return t+e.day+347997}getDaysInMonth(e){return aC(e.year,e.month)}getMonthsInYear(e){return aS(e.year)?13:12}getDaysInYear(e){return aP(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(aS(t.year)&&!aS(e.year)&&t.month>6?e.month--:!aS(t.year)&&aS(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class aA extends oH{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-oV(o.era,o.year,1,1);if(a<80?(i--,a+=(t=oU(o.year-1)?31:30)+155+90+10):(t=oU(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new ii(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=oz(e.year+78);return(oU(o)?(t=31,r=oV(n,o,3,21)):(t=30,r=oV(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&oU(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 ak(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function aT(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+ak(t,n,1,1)))/29.5)+1),i=r-ak(t,n,o,1)+1;return new ii(e,n,o,i)}function aR(e){return(14+11*e)%30<11}class aN{fromJulianDay(e){return aT(this,1948440,e)}toJulianDay(e){return ak(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&aR(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return aR(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class aI extends aN{fromJulianDay(e){return aT(this,1948439,e)}toJulianDay(e){return ak(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function aM(e){return 460322+i[e-1300]}function a$(e,t){return(o[e-1300]&1<<11-(t-1))==0?29:30}function aL(e,t){let r=aM(e);for(let n=1;n<t;n++)r+=a$(e,n);return r}function aF(e){return i[e+1-1300]-i[e-1300]}class aB extends aN{fromJulianDay(e){let t=e-1948440,r=aM(1300),n=aM(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-aM(++e)+1;let o=aF(e);if(n===o){r=12;break}if(n<o){let t=a$(e,r);for(r=1;n>t;)n-=t,t=a$(e,++r);break}}return new ii(this,e,r,t-aL(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+aL(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):a$(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):aF(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",o||(o=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!i){i=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){i[t-1300]=e;for(let r=1;r<=12;r++)e+=a$(t,r)}}}}let aV=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],aU=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],aW=[1867,1911,1925,1988,2018],az=["meiji","taisho","showa","heisei","reiwa"];function aK(e){let t=aV.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?aV.length-1:0===t?0:t-1}function aH(e){let t=aW[az.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new ii(e.year+t,e.month,e.day)}class aG extends oH{fromJulianDay(e){let t=super.fromJulianDay(e),r=aK(t);return new ii(this,az[r],t.year-aW[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(aH(e))}balanceDate(e){let t=aH(e),r=aK(t);az[r]!==e.era&&(e.era=az[r],e.year=t.year-aW[r]),this.constrainDate(e)}constrainDate(e){let t=az.indexOf(e.era),r=aU[t];if(null!=r){let[n,o,i]=r,a=n-aW[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=aV[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return az}getYearsInEra(e){let t=az.indexOf(e.era),r=aV[t],n=aV[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(aH(e))}getMinimumMonthInYear(e){let t=aq(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=aq(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function aq(e){if(1===e.year)return aV[az.indexOf(e.era)]}let aZ=[0,31,62,93,124,155,186,216,246,276,306,336];class aY{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-aZ[o]+1;return new ii(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=aZ[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>oB(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function aJ(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function aQ(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class aX extends oH{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=aQ(oW(t.era,t.year));return new ii(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(a0(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=aQ(aJ(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(a0(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function a0(e){let[t,r]=oz(aJ(e));return new ii(t,r,e.month,e.day)}function a1(e){switch(e){case"buddhist":return new ah;case"ethiopic":return new aw;case"ethioaa":return new a_;case"coptic":return new ax;case"hebrew":return new aj;case"indian":return new aA;case"islamic-civil":return new aN;case"islamic-tbla":return new aI;case"islamic-umalqura":return new aB;case"japanese":return new aG;case"persian":return new aY;case"roc":return new aX;default:return new oH}}function a4(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function a2(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=a3(e,t,r).subtract(i);return a5(e,a,t,r,n,o)}function a3(e,t,r,n,o){let i=e;if(t.years)i=iM(e.subtract({months:e.month-1}));else t.months?i=iM(e):t.weeks&&(i=iL(e,r));return a5(e,i,t,r,n,o)}function a6(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=a3(e,t,r).subtract(i);return a5(e,a,t,r,n,o)}function a5(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=iV(t,a3(i_(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=iB(t,a6(i_(i),r,n));e&&(t=e)}return t}function a9(e,t,r){if(t){let r=iV(e,i_(t));r&&(e=r)}if(r){let t=iB(e,i_(r));t&&(e=t)}return e}function a8(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function a7(e,t,r){let[n,o]=(0,e$.useState)(e||t),i=(0,e$.useRef)(void 0!==e),a=void 0!==e;(0,e$.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:n,l=(0,e$.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),a||(s=e)};"function"==typeof e?o((r,...o)=>{let i=e(a?s:r,...o);return(n(i,...t),a)?r:i}):(a||o(e),n(e,...t))},[a,s,r]);return[s,l]}function se(e){var t,r,n;let o=(0,e$.useMemo)(()=>new iQ(e.locale),[e.locale]),i=(0,e$.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:h}=e,m=(0,e$.useMemo)(()=>s(i.calendar),[s,i.calendar]),[y,v]=a7(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),g=(0,e$.useMemo)(()=>y?iE(i_(y),m):null,[y,m]),b=(0,e$.useMemo)(()=>y&&"timeZone"in y?y.timeZone:i.timeZone,[y,i.timeZone]),[w,x]=a7((0,e$.useMemo)(()=>e.focusedValue?a9(iE(i_(e.focusedValue),m),u,c):void 0,[e.focusedValue,m,u,c]),(0,e$.useMemo)(()=>a9(e.defaultFocusedValue?iE(i_(e.defaultFocusedValue),m):g||iE(ik(b),m),u,c),[e.defaultFocusedValue,g,b,m,u,c]),e.onFocusChange),[E,S]=(0,e$.useState)(()=>{switch(d){case"start":return a3(w,l,a,u,c);case"end":return a6(w,l,a,u,c);default:return a2(w,l,a,u,c)}}),[D,O]=(0,e$.useState)(e.autoFocus||!1),P=(0,e$.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,E.add(e)},[E,l]),[C,j]=(0,e$.useState)(m);if(!iP(m,C)){let e=iE(w,m);S(a2(e,l,a,u,c)),x(e),j(m)}function A(e){x(e=a9(e,u,c))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void v(null);(e=a8(e=a9(e,u,c),E,f))&&(e=iE(e,(null==y?void 0:y.calendar)||new oH),y&&"hour"in y?v(y.set(e)):v(e))}}a4(w,u,c)?x(a9(w,u,c)):0>w.compare(E)?S(a6(w,l,a,u,c)):w.compare(P)>0&&S(a3(w,l,a,u,c));let T=(0,e$.useMemo)(()=>!!g&&(!!(f&&f(g))||a4(g,u,c)),[g,f,u,c]),R=e.isInvalid||"invalid"===e.validationState||T,N=(0,e$.useMemo)(()=>"visible"===p?l:st(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:g,setValue:k,visibleRange:{start:E,end:P},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:R?"invalid":null,isValueInvalid:R,setFocusedDate(e){A(e),O(!0)},focusNextDay(){A(w.add({days:1}))},focusPreviousDay(){A(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&A(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&A(w.subtract({weeks:1}))},focusNextPage(){let e=E.add(N);x(a9(w.add(N),u,c)),S(a3(a5(w,e,N,a,u,c),N,a))},focusPreviousPage(){let e=E.subtract(N);x(a9(w.subtract(N),u,c)),S(a3(a5(w,e,N,a,u,c),N,a))},focusSectionStart(){l.days?A(E):l.weeks?A(iL(w,a)):(l.months||l.years)&&A(iM(w))},focusSectionEnd(){l.days?A(P):l.weeks?A(iL(w,a,void 0).add({days:6})):(l.months||l.years)&&A(i$(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?A(w.add({months:1})):(l.months||l.years)&&A(w.add({years:1})):A(w.add(st(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?A(w.subtract({months:1})):(l.months||l.years)&&A(w.subtract({years:1})):A(w.subtract(st(l)))},selectFocusedDate(){f&&f(w)||k(w)},selectDate(e){k(e)},isFocused:D,setFocused:O,isInvalid:e=>a4(e,u,c),isSelected(e){return null!=g&&iD(e,g)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>D&&w&&iD(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(E)||t.compare(P)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=E.subtract({days:1});return iD(e,E)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=P.add({days:1});return iD(e,P)||this.isInvalid(e)},getDatesInWeek(e,t=E){let r=t.add({weeks:e}),n=[],o=ij(r=iL(r,a,h),a,h);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(iD(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function st(e){let t={...e};for(let r in e)t[r]=1;return t}function sr(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:i_(e),end:i_(t)}):null}function sn(e,t){return(e=iE(e,(null==t?void 0:t.calendar)||new oH),t&&"hour"in t)?t.set(e):e}function so(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let si=(0,e$.createContext)(null),sa=(0,e$.createContext)(null),ss=(0,e$.createContext)(null),sl=(0,e$.createContext)(null),su=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,si);let{locale:r}=oL(),n=se({...e,locale:r,createCalendar:e.createCalendar||a1}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=an(e,n),u=rJ({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return eL().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},eL().createElement(rY,{values:[[ox,{slots:{previous:i,next:a}}],[oS,{"aria-hidden":!0,level:2,children:l}],[ss,n],[si,e],[oD,{slots:{errorMessage:s}}]]},eL().createElement(ai,null,eL().createElement("h2",null,o["aria-label"])),u.children,eL().createElement(ai,null,eL().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),sc=(0,e$.forwardRef)(function(e,t){var r,n;let o,i,a;[e,t]=rX(e,t,sa);let{locale:s}=oL(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=a7(t,r||null,n),[f,p]=(0,e$.useState)(null),h="center";if(c&&c.start&&c.end){let e=a2(i_(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,e$.useRef)(null),[y,v]=(0,e$.useState)(null),g=(0,e$.useMemo)(()=>iV(s,null==y?void 0:y.start),[s,y]),b=(0,e$.useMemo)(()=>iB(l,null==y?void 0:y.end),[l,y]),w=se({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:g,maxValue:b,selectionAlignment:h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:so(t,w,-1),end:so(t,w,1)},v(m.current)):(m.current=null,v(null))},[E,S]=(0,e$.useState)(w.visibleRange);iO(w.visibleRange.start,E.start)&&iO(w.visibleRange.end,E.end)||(x(f),S(w.visibleRange));let D=e=>{e?(p(e),x(e)):(p(null),x(null))},O=f?sr(f,w.focusedDate):c&&sr(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=a8(a9(t,g,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=sr(f,r);e&&d({start:sn(e.start,null==c?void 0:c.start),end:sn(e.end,null==c?void 0:c.end)}),D(null)}else D(r)},[C,j]=(0,e$.useState)(!1),{isDateUnavailable:A}=e,k=(0,e$.useMemo)(()=>!!c&&!f&&(!!(A&&(A(c.start)||A(c.end)))||a4(c.start,s,l)||a4(c.end,s,l)),[A,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||k;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:D,highlightedRange:O,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||a4(e,null==(t=m.current)?void 0:t.start,null==(r=m.current)?void 0:r.end)},isDragging:C,setDragging:j}}({...e,locale:s,createCalendar:e.createCalendar||a1}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=an(r,l),i=(0,e$.useRef)(!1),aa(a=(0,e$.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),aa(a,"pointerup",e=>{if(i.current){i.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},aa(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=rJ({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return eL().createElement("div",{...h,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},eL().createElement(rY,{values:[[ox,{slots:{previous:c,next:d}}],[oS,{"aria-hidden":!0,level:2,children:p}],[sl,l],[sa,e],[oD,{slots:{errorMessage:f}}]]},eL().createElement(ai,null,eL().createElement("h2",null,u["aria-label"])),h.children,eL().createElement(ai,null,eL().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),sd=(0,e$.createContext)(null),sf=(0,e$.forwardRef)(function(e,t){var r,n;let o=(0,e$.useContext)(ss),i=(0,e$.useContext)(sl),a=rQ(si),s=rQ(sa),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=oL(),s=i7(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=i9.get(t),c=ar({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=i3({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=oL(),p=(0,e$.useMemo)(()=>{let e=iL(ik(t.timeZone),f,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((ij(iM(n),f,i)+r)/7));return{gridProps:rq(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:p,weeksInMonth:h}}({startDate:u,endDate:i$(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return eL().createElement(sd.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:h}},eL().createElement("table",{...ne(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:eL().createElement(eL().Fragment,null,eL().createElement(sp,null,e=>eL().createElement(sh,null,e)),eL().createElement(sm,null,e.children))))}),sp=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,e$.useContext)(sd);return eL().createElement("thead",{...ne(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},eL().createElement("tr",null,a.map((e,t)=>eL().cloneElement(r(e),{key:t}))))}),sh=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return eL().createElement("th",{...ne(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),sm=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,e$.useContext)(ss),a=(0,e$.useContext)(sl),s=null!=i?i:a,{startDate:l,weeksInMonth:u}=(0,e$.useContext)(sd);return eL().createElement("tbody",{...ne(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>eL().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?eL().cloneElement(r(e),{key:t}):eL().createElement("td",{key:t})))))}),sy=(0,e$.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,e$.useContext)(ss),s=(0,e$.useContext)(sl),l=null!=a?a:s,{startDate:u}=null!=(n=(0,e$.useContext)(sd))?n:{startDate:l.visibleRange.start},c=(0,e$.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=i9.get(t),u=iY((n=oF)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=i3({weekday:"long",day:"numeric",month:"long",year:"numeric",era:i8(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i);a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&iD(t.value,i));m&&(d=!0),i=i2(i,iO);let y=(0,e$.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),v=iD(i,ik(t.timeZone)),g=(0,e$.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(iD(i,t.value.start)||iD(i,t.value.end))&&(e=l+", "),e+=c.format(y),v?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&iD(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&iD(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,v,i,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=au(b),x=(0,e$.useRef)(!1),E=(0,e$.useRef)(!1),S=(0,e$.useRef)(void 0),{pressProps:D,isPressed:O}=nq({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(i);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(iD(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}else if(iD(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});a||(o=iD(i,t.focusedDate)?0:-1),(0,e$.useEffect)(()=>{f&&r.current&&(nl(r.current),"pointer"!==n1&&document.activeElement===r.current&&af(r.current,{containingElement:ap(r.current)}))},[f,r]);let P=i3({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),C=(0,e$.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:rq(D,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":g,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:C}}({date:e},l,c),{hoverProps:h,isHovered:m}=og({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:v}=op();v&&(v=p.isFocused);let g=(o=u,i=iE(i=e,o.calendar),o=iM(o),i=iM(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=iD(e,l.highlightedRange.start),w=iD(e,l.highlightedRange.end));let x=rJ({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:g,isFocusVisible:v,isSelectionStart:b,isSelectionEnd:w,...p}}),E={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":v||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":g||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return eL().createElement("td",{...d,ref:r},eL().createElement("div",{...rq(ne(t),f,y,h,E,x),ref:c}))}),sv=(0,e$.createContext)({}),sg=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,sv);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=og({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=op({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=rJ({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return eL().createElement("div",{...rq(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),sb=(0,e$.createContext)({}),sw=ow(function(e,t){[e,t]=rX(e,t,sb);let{hoverProps:r,isHovered:n}=og(e),{isFocused:o,isFocusVisible:i,focusProps:a}=op({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=rJ({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return eL().createElement("input",{...rq((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var s_={};s_={"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 sx=eL().createContext(null),sE="react-aria-focus-scope-restore",sS=null;function sD(e){var t,r,n,o,i,a,s,l,u,c;let d,f,p,h,{children:m,contain:y,restoreFocus:v,autoFocus:g}=e,b=(0,e$.useRef)(null),w=(0,e$.useRef)(null),x=(0,e$.useRef)([]),{parentNode:E}=(0,e$.useContext)(sx)||{},S=(0,e$.useMemo)(()=>new sB({scopeRef:x}),[x]);rT(()=>{let e=E||sV.root;if(sV.getTreeNode(e.scopeRef)&&sS&&!sA(sS,e.scopeRef)){let t=sV.getTreeNode(sS);t&&(e=t)}e.addChild(S),sV.addNode(S)},[S,E]),rT(()=>{let e=sV.getTreeNode(x);e&&(e.contain=!!y)},[y]),rT(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(sE,n),t=t.nextSibling;return x.current=r,()=>{for(let e of r)e.removeEventListener(sE,n)}},[m]),rT(()=>{if(r||n)return;let e=t.current,o=na(e?e[0]:void 0),i=e=>{let r=nB(e);sC(r,t.current)?sS=t:sj(r)||(sS=null)};return o.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=v,n=y]),o=x,i=y,d=(0,e$.useRef)(void 0),f=(0,e$.useRef)(void 0),rT(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=na(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!sP(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!sC(r,n))return;let i=sM(sO(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&sk(a,!0)},n=e=>{(!sS||sA(sS,o))&&sC(nB(e),o.current)?(sS=o,d.current=nB(e)):sP(o)&&!sj(nB(e),o)?d.current?d.current.focus():sS&&sS.current&&sR(sS.current):sP(o)&&(d.current=nB(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=n1,n=("virtual"===r||null===r)&&nE()&&nx(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&sP(o)&&!sj(i,o)){sS=o;let t=nB(e);if(t&&t.isConnected){var a;d.current=t,null==(a=d.current)||a.focus()}else sS.current&&sR(sS.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),rT(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=v,l=y,p=(0,e$.useRef)("u">typeof document?((e=document)=>e.activeElement)(na(a.current?a.current[0]:void 0)):null),rT(()=>{let e=a.current,t=na(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!sS||sA(sS,a))&&sC(((e=document)=>e.activeElement)(t),a.current)&&(sS=a)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,l]),rT(()=>{let e=na(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!sP(a)||t.isComposing)return;let r=e.activeElement;if(!sj(r,a)||!sN(a))return;let n=sV.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=sM(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!sj(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(sj(s,a));(t.preventDefault(),t.stopPropagation(),s)?sk(s,!0):sj(o)?sk(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),rT(()=>{var e;let t=na(a.current?a.current[0]:void 0);if(!s)return;let r=sV.getTreeNode(a);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=sV.getTreeNode(a);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&sj(n,a)||n===t.body&&sN(a))){let e=sV.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void sI(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&sV.getTreeNode(t.scopeRef))return void sI(sT(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),u=x,c=g,h=eL().useRef(c),(0,e$.useEffect)(()=>{h.current&&(sS=u,!sC(((e=document)=>e.activeElement)(na(u.current?u.current[0]:void 0)),sS.current)&&u.current&&sR(u.current)),h.current=!1},[u]),(0,e$.useEffect)(()=>{let e=((e=document)=>e.activeElement)(na(x.current?x.current[0]:void 0)),t=null;if(sC(e,x.current)){for(let r of sV.traverse())r.scopeRef&&sC(e,r.scopeRef.current)&&(t=r);t===sV.getTreeNode(x)&&(sS=t.scopeRef)}},[x]),rT(()=>()=>{var e,t,r;let n=null!=(r=null==(t=sV.getTreeNode(x))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(x===sS||sA(x,sS))&&(!n||sV.getTreeNode(n))&&(sS=n),sV.removeTreeNode(x)},[x]);let D=(0,e$.useMemo)(()=>{var e;return e=x,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(na(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=sM(sO(n),{tabbable:i,accept:s},n);c.currentNode=sC(l,n)?l:u;let d=c.nextNode();return!d&&a&&(c.currentNode=u,d=c.nextNode()),d&&sk(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(na(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=sM(sO(n),{tabbable:i,accept:s},n);c.currentNode=sC(l,n)?l:u;let d=c.previousNode();return!d&&a&&(c.currentNode=u,d=c.previousNode()),d&&sk(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=sM(sO(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&sk(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=sM(sO(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&sk(a,!0),a}}},[]),O=(0,e$.useMemo)(()=>({focusManager:D,parentNode:S}),[S,D]);return eL().createElement(sx.Provider,{value:O},eL().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),m,eL().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function sO(e){return e[0].parentElement}function sP(e){let t=sV.getTreeNode(sS);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function sC(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function sj(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of sV.traverse(sV.getTreeNode(t)))if(r&&sC(e,r.current))return!0;return!1}function sA(e,t){var r;let n=null==(r=sV.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function sk(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{os(e)}catch{}}function sT(e,t=!0){let r=e[0].previousElementSibling,n=sO(e),o=sM(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=sM(n=sO(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function sR(e,t=!0){sk(sT(e,t))}function sN(e){let t=sV.getTreeNode(sS);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function sI(e){e.dispatchEvent(new CustomEvent(sE,{bubbles:!0,cancelable:!0}))&&sk(e)}function sM(e,t,r){var n,o,i;let a=(null==t?void 0:t.tabbable)?ni:no,s=na((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=ns(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||sC(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function s$(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(na(n)),u=sM(n,{tabbable:i,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&sk(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(na(n)),u=sM(n,{tabbable:i,accept:s});if(n.contains(l))u.currentNode=l;else{let e=sL(u);return e&&sk(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=sL(u);if(!e)return null;c=e}return c&&sk(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=sM(n,{tabbable:o,accept:i}).nextNode();return a&&sk(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=sL(sM(n,{tabbable:o,accept:i}));return a&&sk(a,!0),null!=a?a:null}}}function sL(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class sF{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new sB({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&sC(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new sF;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new sB({scopeRef:null}),this.fastMap.set(null,this.root)}}class sB{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 sV=new sF;function sU(e,t,r){let{direction:n}=oL(),o=(0,e$.useMemo)(()=>s$(t),[t]),i=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=sM(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:a}=nq({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return rq(a,{onKeyDown:i=>{if(i.currentTarget.contains(i.target)&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=sW(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=sW(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function sW(e,t,r){let n=sM(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function sz(e,t,r){let n=(0,e$.useRef)(t),o=rR(()=>{r&&r(n.current)});(0,e$.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function sK(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=rK(t);let a=rK(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:ar({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=rH([!!t,!!r,n,o]),l=rH([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=rq(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function sH(e,t,r){let{validationBehavior:n,focus:o}=e;rT(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=rR(()=>{t.resetValidation()}),a=rR(e=>{var n,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&a&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(a)===r.current&&(o?o():null==(i=r.current)||i.focus(),n1="keyboard",n9("keyboard",null)),e.preventDefault()}),s=rR(()=>{t.commitValidation()});(0,e$.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",a),e.addEventListener("change",s),null==t||t.addEventListener("reset",i),()=>{e.removeEventListener("invalid",a),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",i)}},[r,a,s,i,n])}let sG=new WeakMap,sq="__role_"+Date.now(),sZ="__focusManager_"+Date.now();function sY(e,t,r){var n,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=sK({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),p=(0,e$.useRef)(null),{focusWithinProps:h}=of({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),m=iY((o=s_)&&o.__esModule?o.default:o,"@react-aria/datepicker"),y="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",v="hour"===t.maxGranularity?"time":"date",g=au(t.value?m.format(y,{[v]:t.formatValue({month:"long"})}):""),b="presentation"===e[sq]?c["aria-describedby"]:[g["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[sZ],x=(0,e$.useMemo)(()=>w||s$(r),[w,r]),E=sU(t,r,"presentation"===e[sq]);sG.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:x});let S=(0,e$.useRef)(e.autoFocus);i="presentation"===e[sq]?{role:"presentation"}:rq(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,e$.useEffect)(()=>{S.current&&x.focusFirst(),S.current=!1},[x]),sz(e.inputRef,t.value,t.setValue),sH({...e,focus(){x.focusFirst()}},t,e.inputRef);let D={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(D.type="text",D.hidden=!0,D.required=e.isRequired,D.onChange=()=>{});let O=ne(e);return{labelProps:{...u,onClick:()=>{x.focusFirst()}},fieldProps:rq(O,i,E,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:D,descriptionProps:d,errorMessageProps:f,isInvalid:a,validationErrors:s,validationDetails:l}}var sJ={};sJ={"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 sQ={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},sX={...sQ,customError:!0,valid:!1},s0={isInvalid:!1,validationDetails:sQ,validationErrors:[]},s1=(0,e$.createContext)({}),s4="__formValidationState"+Date.now();function s2(e){if(e[s4]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[s4];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:sX}:null,u=(0,e$.useMemo)(()=>a&&null!=o?s6(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return s3(r)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let c=(0,e$.useContext)(s1),d=(0,e$.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>s3(c[e])):s3(c[n]):[],[c,n]),[f,p]=(0,e$.useState)(c),[h,m]=(0,e$.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,e$.useMemo)(()=>s6(h?[]:d),[h,d]),v=(0,e$.useRef)(s0),[g,b]=(0,e$.useState)(s0),w=(0,e$.useRef)(s0),[x,E]=(0,e$.useState)(!1);return(0,e$.useEffect)(()=>{if(!x)return;E(!1);let e=u||i||v.current;s5(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||y||u||i||s0,displayValidation:"native"===s?l||y||g:l||y||u||i||g,updateValidation(e){"aria"!==s||s5(g,e)?v.current=e:b(e)},resetValidation(){s5(s0,w.current)||(w.current=s0,b(s0)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function s3(e){return e?Array.isArray(e)?e:[e]:[]}function s6(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:sX}:null}function s5(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function s9(...e){let t=new Set,r=!1,n={...sQ};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let s8=new iz((u=sJ)&&u.__esModule?u.default:u);function s7(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function le(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=i||a||s,u=[];if(l){let e=s7(),n=new iG(e,iz.getGlobalDictionaryForPackage("@react-stately/datepicker")||s8),l=new iQ(e,ln({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let lt={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},lr={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ln(e,t){var r;e={...t.shouldForceLeadingZeros?lr:lt,...e};let n=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(r=t.maxGranularity)?r:"year");i<0&&(i=0);let a=o.indexOf(n);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===i&&(s.era="short"),s}function lo(e){return e&&"hour"in e?e:new is}function li(e,t){return null===e?null:e?iE(e,t):void 0}function la(e,t,r,n){if(e)return li(e,r);let o=iE(iA(null!=n?n:iI()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?i_(o):n?o:ix(o)}function ls(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,e$.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let ll=new iz({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"),lu={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},lc={year:5,month:2,day:7,hour:2,minute:15,second:15},ld={dayperiod:"dayPeriod"};function lf(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,h]=ls(f,e.granularity),m=h||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let y=(0,e$.useMemo)(()=>new iQ(n),[n]),v=(0,e$.useMemo)(()=>o(y.resolvedOptions().calendar),[o,y]),[g,b]=a7(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,e$.useMemo)(()=>{var e;return null!=(e=li(g,v))?e:null},[g,v]),[x,E]=(0,e$.useState)(()=>la(e.placeholderValue,p,v,h)),S="gregory"===v.identifier&&"BC"===(w||x).era,D=(0,e$.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,h,i,S]),O=(0,e$.useMemo)(()=>ln({},D),[D]),P=(0,e$.useMemo)(()=>new iQ(n,O),[n,O]),C=(0,e$.useMemo)(()=>P.resolvedOptions(),[P]),j=(0,e$.useMemo)(()=>P.formatToParts(new Date).filter(e=>lu[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[P]),[A,k]=(0,e$.useState)(()=>e.value||e.defaultValue?{...j}:{}),T=(0,e$.useRef)(null),R=(0,e$.useRef)(v);(0,e$.useEffect)(()=>{iP(v,R.current)||(R.current=v,E(t=>Object.keys(A).length>0?iE(t,v):la(e.placeholderValue,p,v,h)))},[v,p,A,h,e.placeholderValue]),g&&Object.keys(A).length<Object.keys(j).length&&k(A={...j}),null==g&&Object.keys(A).length===Object.keys(j).length&&(k(A={}),E(la(e.placeholderValue,p,v,h)));let N=w&&Object.keys(A).length>=Object.keys(j).length?w:x,I=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(A),n=Object.keys(j);null==t?(b(null),E(la(e.placeholderValue,p,v,h)),k({})):r.length>=n.length||r.length===n.length-1&&j.dayPeriod&&!A.dayPeriod&&"dayPeriod"!==T.current?b(t=iE(t,(null==f?void 0:f.calendar)||new oH)):E(t),T.current=null},M=(0,e$.useMemo)(()=>N.toDate(m),[N,m]),$=(0,e$.useMemo)(()=>(function(e,t,r,n,o,i,a,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=lu[e.type];"era"===e.type&&1===i.getEras().length&&(r=!1);let u=lu[e.type]&&!t[e.type],p=lu[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?ll.getStringForLocale(d,a):"––"):null,h={type:ld[e.type]||e.type,text:u?p:e.value,...lp(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(h),e.type===s&&c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(h),c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(h)}return c})(M,A,P,C,N,v,n,p),[M,A,P,C,N,v,n,p]);j.era&&A.year&&!A.era?(A.era=!0,k({...A})):!j.era&&A.era&&(delete A.era,k({...A}));let L=e=>{A[e]=!0,"year"===e&&j.era&&(A.era=!0),k({...A})},F=(e,t)=>{if(A[e])I(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(N,e,t,C));else{L(e);let t=Object.keys(A),r=Object.keys(j);(t.length>=r.length||t.length===r.length-1&&j.dayPeriod&&!A.dayPeriod)&&I(N)}},B=(0,e$.useMemo)(()=>le(g,u,c,d,D),[g,u,c,d,D]),V=s2({...e,value:g,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:w,dateValue:M,calendar:v,setValue:I,segments:$,dateFormatter:P,validationState:W,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,lc[e]||1)},decrementPage(e){F(e,-(lc[e]||1))},setSegment(e,t){L(e),I(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(N,e,t,C))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(A),r=Object.keys(j);t.length===r.length-1&&j.dayPeriod&&!A.dayPeriod&&(k(A={...j}),I(N.copy()))},clearSegment(t){delete A[t],T.current=t,k({...A});let r=la(e.placeholderValue,p,v,h),n=N;if("dayPeriod"===t&&"hour"in N&&"hour"in r){let e=N.hour>=12,t=r.hour>=12;e&&!t?n=N.set({hour:N.hour-12}):!e&&t&&(n=N.set({hour:N.hour+12}))}else"hour"===t&&"hour"in N&&N.hour>=12&&A.dayPeriod?n=N.set({hour:r.hour+12}):t in N&&(n=N.set({[t]:r[t]}));b(null),I(n)},formatValue:e=>w?new iQ(n,ln(e,D)).format(M):"",getDateFormatter:(e,t)=>new iQ(e,ln({},{...D,...t}))}}function lp(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.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(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?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 lh=(0,e$.createContext)(null),lm=(0,e$.createContext)(null),ly=(0,e$.createContext)(null),lv=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(lm),n=(0,e$.useContext)(ly);return r||n?eL().createElement(lb,{...e,ref:t}):eL().createElement(lg,{...e,ref:t})}),lg=(0,e$.forwardRef)((e,t)=>{let[r,n]=rX({slot:e.slot},t,lh),{locale:o}=oL(),i=lf({...r,locale:o,createCalendar:a1}),a=(0,e$.useRef)(null),{fieldProps:s,inputProps:l}=sY({...r,inputRef:a},i,n);return eL().createElement(rY,{values:[[lm,i],[sb,{...l,ref:a}],[sv,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},eL().createElement(lb,e))}),lb=(0,e$.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,e$.useContext)(lm),i=(0,e$.useContext)(ly),a=null!=o?o:i;return eL().createElement(eL().Fragment,null,eL().createElement(sg,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,e$.cloneElement)(n(e),{key:t}))),eL().createElement(sw,null))}),lw=(0,e$.createContext)({});function l_({children:e}){let t=(0,e$.useMemo)(()=>({register:()=>{}}),[]);return eL().createElement(nR.Provider,{value:t},e)}eL().forwardRef(({children:e,...t},r)=>{let n=(0,e$.useRef)(!1),o=(0,e$.useContext)(nR);r=rA(r||(null==o?void 0:o.ref));let i=rq(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return n$(o,r),(0,e$.useEffect)(()=>{n.current||(n.current=!0)},[]),eL().createElement(nR.Provider,{value:i},e)});let lx=eL().createContext(null);function lE(e){var t;let r=rU(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[i,a]=(0,e$.useState)(!1),s=(0,e$.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,e$.useContext)(lw))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=eL().createElement(sD,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},u)),u=eL().createElement(lx.Provider,{value:s},eL().createElement(l_,null,u)),nz().createPortal(u,n)}let lS=(0,e$.createContext)(null),lD=(0,e$.createContext)(null),lO=(0,e$.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=rX(e,t,lS);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=rH();i=e["aria-label"]?void 0:i;let a=(0,e$.useRef)(!1);return(0,e$.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){os(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),os(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),rT(()=>{null==n||n(!0)},[n=null==(r=(0,e$.useContext)(lx))?void 0:r.setContain]),{dialogProps:{...ne(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,e$.useContext)(lD);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=rJ({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return eL().createElement("section",{...ne(e),...n,...a,ref:t,slot:e.slot||void 0},eL().createElement(rY,{values:[[oS,{slots:{[rZ]:{},title:{...o,level:2}}}],[ox,{slots:{[rZ]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),lP=(0,e$.createContext)(null),lC=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(lP);return(null==r?void 0:r.isInvalid)?eL().createElement(lj,{...e,ref:t}):null}),lj=(0,e$.forwardRef)((e,t)=>{let r=(0,e$.useContext)(lP),n=ne(e),o=rJ({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:eL().createElement(oO,{slot:"errorMessage",...n,...o,ref:t})}),lA=(0,e$.createContext)(null),lk=(0,e$.createContext)({}),lT=ow(function(e,t){[e,t]=rX(e,t,lk);let{elementType:r="label",...n}=e;return eL().createElement(r,{className:"react-aria-Label",...n,ref:t})}),lR=(0,e$.createContext)({placement:"bottom"}),lN=new WeakMap,lI=[];function lM(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function l$(e,t){let r=e,n=t.toString(),o=n.indexOf("."),i=o>=0?n.length-o:0;if(i>0){let e=Math.pow(10,i);r=Math.round(r*e)/e}return r}function lL(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=l$(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(l$(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(l$((r-t)/n,n))*n),i=l$(i,n)}let lF={top:"top",bottom:"top",left:"left",right:"left"},lB={top:"bottom",bottom:"top",left:"right",right:"left"},lV={top:"left",left:"top"},lU={top:"height",left:"width"},lW={width:"totalWidth",height:"totalHeight"},lz={},lK="u">typeof document?window.visualViewport:null;function lH(e){var t,r,n,o,i;let a=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==lK?void 0:lK.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,a=null!=(r=null==lK?void 0:lK.width)?r:l,s=null!=(n=null==lK?void 0:lK.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,lK&&(c=lK.offsetTop,d=lK.offsetLeft)}else({width:a,height:s,top:c,left:d}=lJ(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=a,u=s;return n_()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==lK?void 0:lK.pageTop)?o:0,d=null!=(i=null==lK?void 0:lK.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function lG(e,t,r,n,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[lU[e]],c=n.scroll[lF[e]]+i,d=u+n.scroll[lF[e]]-i,f=t-l+a[e]-n[lF[e]],p=t-l+r+a[e]-n[lF[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function lq(e){if(lz[e])return lz[e];let[t,r]=e.split(" "),n=lF[t]||"right",o=lV[n];lF[r]||(r="center");let i=lU[n],a=lU[o];return lz[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},lz[e]}function lZ(e,t,r,n,o,i,a,s,l,u){var c,d,f,p,h;let{placement:m,crossPlacement:y,axis:v,crossAxis:g,size:b,crossSize:w}=n,x={};x[g]=null!=(c=e[g])?c:0,"center"===y?x[g]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:y!==g&&(x[g]+=(null!=(p=e[w])?p:0)-(null!=(h=r[w])?h:0)),x[g]+=i;let E=e[g]-r[w]+l+u,S=e[g]+e[w]-l-u;if(x[g]=lM(x[g],E,S),m===v){let r=s?a[b]:t[lW[b]];x[lB[v]]=Math.floor(r-e[v]+o)}else x[v]=Math.floor(e[v]+e[b]+o);return x}function lY(e,t,r,n,o,i){var a,s,l;let{placement:u,axis:c,size:d}=i;return u===c?Math.max(0,r[c]-e[c]-(null!=(a=e.scroll[c])?a:0)+t[c]-(null!=(s=n[c])?s:0)-n[lB[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[lB[c]]-o)}function lJ(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:r+a-l,width:n,height:o}}function lQ(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:i}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:i}}else{r=lJ(e);let n=lJ(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function lX(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let l0=new WeakMap;function l1(e){let{ref:t,box:r,onResize:n}=e;(0,e$.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let l4="u">typeof document?window.visualViewport:null;function l2(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let l3=[],l6="u">typeof document&&window.visualViewport,l5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),l9=0;function l8(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function l7(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function ue(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=ap(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var ut={};function ur(e){var t;let{onDismiss:r,...n}=e,o=ar(n,iY((t=ut)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return eL().createElement(ai,null,eL().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function un(e,t,r){rT(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,nW.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function uo(e){let[t,r]=a7(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,e$.useCallback)(()=>{r(!0)},[r]),o=(0,e$.useCallback)(()=>{r(!1)},[r]),i=(0,e$.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}ut={"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 ui=(0,e$.createContext)(null),ua=(0,e$.createContext)(null),us=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,ui);let r=(0,e$.useContext)(lD),n=uo(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,e$.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return un(e,o,(0,e$.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,e$.useContext)(ob),{direction:s}=oL();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),eL().createElement(eL().Fragment,null,t)}return!o||o.isOpen||i?eL().createElement(ul,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function ul({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let s=(0,e$.useRef)(null),[l,u]=(0,e$.useState)(0),c=(0,e$.useRef)(null),d=(0,e$.useContext)(ua),f=d&&"SubmenuTrigger"===n.trigger;rT(()=>{s.current&&e.isOpen&&u(s.current.getBoundingClientRect().width)},[e.isOpen,s]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l,...u}=e,c="SubmenuTrigger"===u.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,e$.useEffect)(()=>{if(o&&!l3.includes(t))return l3.push(t),()=>{let e=l3.indexOf(t);e>=0&&l3.splice(e,1)}},[o,t]);let l=()=>{l3[l3.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,e$.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=rR(e=>{r&&l2(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=rR(e=>{r&&r(e)});(0,e$.useEffect)(()=>{let e=i.current;if(n)return;let r=na(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&l2(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(l3[l3.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&l3[l3.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=of({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||sj(e.relatedTarget,sS))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||c,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l},null!=o?o:n),{overlayProps:p,arrowProps:h,placement:m}=function(e){var t,r,n;let{direction:o}=oL(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:y=!0,onClose:v,maxHeight:g,arrowBoundaryOffset:b=0}=e,[w,x]=(0,e$.useState)(null),E=[m,u,s.current,a.current,l.current,c,d,f,p,h,y,o,g,b,i],S=(0,e$.useRef)(null==l4?void 0:l4.scale);(0,e$.useEffect)(()=>{y&&(S.current=null==l4?void 0:l4.scale)},[y]);let D=(0,e$.useCallback)(()=>{var e,t,r,n,v,w;if(!1===m||!y||!s.current||!a.current||!f||(null==l4?void 0:l4.scale)!==S.current)return;let E=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(E={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(E.type="bottom",E.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let D=s.current;!g&&s.current&&(D.style.top="0px",D.style.bottom="",D.style.maxHeight=(null!=(v=null==(n=window.visualViewport)?void 0:n.height)?v:window.innerHeight)+"px");let O=function(e){var t,r,n,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:h,maxHeight:m,arrowSize:y=0,arrowBoundaryOffset:v=0}=e,g=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!lX(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!lX(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=g===document.documentElement,w=window.getComputedStyle(g).position,x=b?lJ(s):lQ(s,g);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);x.top+=parseInt(e,10)||0,x.left+=parseInt(t,10)||0}let E=lJ(l),S={top:parseInt((i=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(i.marginBottom,10)||0,left:parseInt(i.marginLeft,10)||0,right:parseInt(i.marginRight,10)||0};E.width+=(null!=(t=S.left)?t:0)+(null!=(r=S.right)?r:0),E.height+=(null!=(n=S.top)?n:0)+(null!=(o=S.bottom)?o:0);let D={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},O=lH(f),P=lH(g),C="BODY"===f.tagName?lJ(g):lQ(g,f);return"HTML"===g.tagName&&"BODY"===f.tagName&&(P.scroll.top=0,P.scroll.left=0),function(e,t,r,n,o,i,a,s,l,u,c,d,f,p,h,m){var y,v,g,b,w,x,E,S,D,O,P,C,j,A;let k,T,R,N=lq(e),{size:I,crossAxis:M,crossSize:$,placement:L,crossPlacement:F}=N,B=lZ(t,s,r,N,c,d,u,f,h,m),V=c,U=lY(s,u,t,o,i+c,N);if(a&&n[I]>U){let e=lq(`${lB[L]} ${F}`),n=lZ(t,s,r,e,c,d,u,f,h,m);lY(s,u,t,o,i+c,e)>U&&(N=e,B=n,V=c)}let W="bottom";"top"===N.axis?"top"===N.placement?W="top":"bottom"===N.placement&&(W="bottom"):"top"===N.crossAxis&&("top"===N.crossPlacement?W="bottom":"bottom"===N.crossPlacement&&(W="top"));let z=lG(M,B[M],r[$],s,l,i,u);B[M]+=z;let K=(w=B,x=r.height,E=W,k=f?u.height:s[lW.height],T=null!=w.top?u.top+w.top:u.top+(k-(null!=(S=w.bottom)?S:0)-x),R="top"!==E?Math.max(0,s.height+s.top+(null!=(D=s.scroll.top)?D:0)-T-((null!=(O=o.top)?O:0)+(null!=(P=o.bottom)?P:0)+i)):Math.max(0,T+x-(s.top+(null!=(C=s.scroll.top)?C:0))-((null!=(j=o.top)?j:0)+(null!=(A=o.bottom)?A:0)+i)),Math.min(s.height-2*i,R));p&&p<K&&(K=p),r.height=Math.min(r.height,K),z=lG(M,(B=lZ(t,s,r,N,V,d,u,f,h,m))[M],r[$],s,l,i,u),B[M]+=z;let H={},G=t[M]+.5*t[$]-B[M]-o[lF[M]],q=h/2+m,Z="left"===lF[M]?(null!=(y=o.left)?y:0)+(null!=(v=o.right)?v:0):(null!=(g=o.top)?g:0)+(null!=(b=o.bottom)?b:0),Y=r[$]-Z-h/2-m,J=lM(G,t[M]+h/2-(B[M]+o[lF[M]]),t[M]+t[$]-h/2-(B[M]+o[lF[M]]));return H[M]=lM(J,q,Y),{position:B,maxHeight:K,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:N.placement}}(a,x,E,D,S,c,d,O,P,C,p,h,!!w&&"static"!==w,m,y,v)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:h,maxHeight:g,arrowSize:i,arrowBoundaryOffset:b});if(O.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(O.position).forEach(e=>D.style[e]=O.position[e]+"px"),D.style.maxHeight=null!=O.maxHeight?O.maxHeight+"px":"",E&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[E.type]-t[E.type];l.current.scrollTop+=r-E.offset}x(O)}},E);rT(D,E),rT(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=D]),l1({ref:s,onResize:D}),l1({ref:a,onResize:D});let O=(0,e$.useRef)(!1);rT(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),D()},r=()=>{O.current&&t()};return null==l4||l4.addEventListener("resize",t),null==l4||l4.addEventListener("scroll",r),()=>{null==l4||l4.removeEventListener("resize",t),null==l4||l4.removeEventListener("scroll",r)}},[D]);let P=(0,e$.useCallback)(()=>{O.current||null==v||v()},[v,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,e$.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||l0.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:a,isOpen:y,onClose:v&&P}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:D}}({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;rT(()=>{if(!t){let e,t,r,n;return 1==++l9&&(a=nw()?(r=null,n=rk(l7(document,"touchstart",r=>{((e=ap(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=l8(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),l7(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),l7(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),l7(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!l5.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=rk(l7(window,"scroll",()=>{window.scrollTo(0,0)}),l8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),l8(document.documentElement,"overflow","hidden"),l8(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",l6&&(l6.height<window.innerHeight?requestAnimationFrame(()=>{ue(n)}):l6.addEventListener("resize",()=>ue(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):rk(l8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),l8(document.documentElement,"overflow","hidden"))),()=>{0==--l9&&a()}}},[t])}({isDisabled:i||!t.isOpen}),rT(()=>{if(t.isOpen&&n.current){if(!i)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{var t;let r=null!=(t=lN.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),lN.set(e,r+1))};lI.length&&lI[lI.length-1].disconnect(),o(t);let a=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return lI.push(s),()=>{for(let e of(a.disconnect(),n)){let t=lN.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),lN.delete(e)):lN.set(e,t-1))}s===lI[lI.length-1]?(lI.pop(),lI.length&&lI[lI.length-1].observe()):lI.splice(lI.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,a=null!=(e=null==o?void 0:o.current)?e:n.current;let t=lI[lI.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,n,o]),{popoverProps:rq(d,p),arrowProps:h,underlayProps:f,placement:m}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:l,groupRef:f?d:c},e),v=n.popoverRef,g=function(e,t=!0){let[r,n]=(0,e$.useState)(!0),o=r&&t;return rT(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),un(e,o,(0,e$.useCallback)(()=>n(!1),[])),o}(v,!!y)||n.isEntering||!1,b=rJ({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:g,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,e$.useState)(!1);rT(()=>{v.current&&E(w&&!v.current.querySelector("[role=dialog]"))},[v,w]),(0,e$.useEffect)(()=>{x&&v.current&&!v.current.contains(document.activeElement)&&os(v.current)},[x,v]);let S={...p.style,...b.style},D=eL().createElement("div",{...rq(ne(n),p),...b,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:v,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":g||void 0,"data-exiting":t||void 0},!n.isNonModal&&eL().createElement(ur,{onDismiss:e.close}),eL().createElement(lR.Provider,{value:{...m,placement:y,ref:s}},b.children),eL().createElement(ur,{onDismiss:e.close}));return f?eL().createElement(lE,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==d?void 0:d.current)?i:void 0},D):eL().createElement(lE,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&eL().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),eL().createElement("div",{ref:c,style:{display:"contents"}},eL().createElement(ua.Provider,{value:c},D)))}function uu(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let uc=(0,e$.createContext)(null),ud=(0,e$.createContext)(null),uf=(0,e$.createContext)(null),up=(0,e$.createContext)(null),uh=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,uc);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t;let r=uo(e),[n,o]=a7(e.value,e.defaultValue||null,e.onChange),i=n||e.placeholderValue||null,[a,s]=ls(i,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,e$.useState)(null),[p,h]=(0,e$.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,y=(0,e$.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:v,maxValue:g,isDateUnavailable:b}=e,w=(0,e$.useMemo)(()=>le(n,v,g,b,y),[n,v,g,b,y]),x=s2({...e,value:n,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{o("timeZone"in t?t.set(i_(e)):ix(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?D(t,p||lo(e.defaultValue||e.placeholderValue)):f(t):(o(t),x.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&D(d,p||lo(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new iQ(e,ln(t,y)).format(l):"",getDateFormatter:(e,t)=>new iQ(e,ln({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,e$.useRef)(null),[l,u]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:v,...g}=function(e,t,r){var n;let o=rK(),i=rK(),a=rK(),s=iY((n=s_)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=sK({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=sU(t,r),y=f["aria-labelledby"]||f.id,{locale:v}=oL(),g=t.formatValue(v,{month:"long"}),b=au(g?s.format("selectedDateDescription",{date:g}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=ne(e),E=(0,e$.useMemo)(()=>s$(r),[r]),S=(0,e$.useRef)(!1),{focusWithinProps:D}=of({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(i);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;S.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!S.current){var r,n;S.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:rq(x,m,f,b,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...f,id:a,[sq]:"presentation","aria-describedby":w,value:t.value,onChange:t.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,[s4]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:h,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...r1(e),label:u,validationBehavior:i},a,s),[b,w]=(0,e$.useState)(null),x=(0,e$.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);l1({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=op({within:!0}),O=rJ({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=ne(e);return delete P.id,eL().createElement(rY,{values:[[uf,a],[sv,{...c,ref:s,isInvalid:a.isInvalid}],[lh,f],[ox,{...p,isPressed:a.isOpen}],[lk,{...d,ref:l,elementType:"span"}],[si,m],[lD,a],[ui,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[lS,h],[oD,{slots:{description:y,errorMessage:v}}],[lP,g]]},eL().createElement("div",{...E,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),um=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,ud);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t,r,n;let o=uo(e),[i,a]=a7(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,e$.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let u=i||s,c=e=>{l(e||{start:null,end:null}),uu(e)?a(e):a(null)},[d,f]=ls((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,h=null==(n=e.shouldCloseOnSelect)||n,[m,y]=(0,e$.useState)(null),[v,g]=(0,e$.useState)(null);u&&uu(u)&&(m=u,"hour"in u.start&&(v=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(i_(e.start)):ix(e.start,t.start),end:"timeZone"in t.end?t.end.set(i_(e.end)):ix(e.end,t.end)}),y(null),g(null),j.commitValidation()},w=t=>{let r="function"==typeof h?h():h;p?uu(t)&&(null==v?void 0:v.start)&&(null==v?void 0:v.end)?b(t,{start:(null==v?void 0:v.start)||lo(e.placeholderValue),end:(null==v?void 0:v.end)||lo(e.placeholderValue)}):y(t):uu(t)?(c(t),j.commitValidation()):y(t),r&&o.setOpen(!1)},x=e=>{uu(m)&&uu(e)?b(m,e):g(e)},E=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,S=(0,e$.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:E}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,E]),{minValue:D,maxValue:O,isDateUnavailable:P}=e,C=(0,e$.useMemo)(()=>{var e,t;let r;return r=s9(le(null!=(e=null==u?void 0:u.start)?e:null,D,O,P,S),le(null!=(t=null==u?void 0:u.end)?t:null,D,O,P,S)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=s9(r,{isInvalid:!0,validationErrors:[(iz.getGlobalDictionaryForPackage("@react-stately/datepicker")||s8).getStringForLocale("rangeReversed",s7())],validationDetails:{...sQ,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,D,O,P,S]),j=s2({...e,value:i,name:(0,e$.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:C}),A=j.displayValidation.isInvalid,k=e.validationState||(A?"invalid":null);return{...j,value:u,setValue:c,dateRange:m,timeRange:v,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==m?void 0:m.end)?r:null}):w({start:null!=(n=null==m?void 0:m.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?x({start:t,end:null!=(r=null==v?void 0:v.end)?r:null}):x({start:null!=(n=null==v?void 0:v.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:x,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&uu(m)&&p&&b(m,{start:(null==v?void 0:v.start)||lo(e.placeholderValue),end:(null==v?void 0:v.end)||lo(e.placeholderValue)}),o.setOpen(t)},validationState:k,isInvalid:A,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,i=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),a="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=ln(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(a||"UTC"),f=new iQ(t,l);if(o===a&&i===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new iQ(t,ln(r,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new iQ(e,ln({},{...S,...t}))}}({...e,validationBehavior:i}),s=(0,e$.useRef)(null),[l,u]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:v,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,l;let u=iY((l=s_)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:h,descriptionProps:m,errorMessageProps:y}=sK({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),v=h["aria-labelledby"]||h.id,{locale:g}=oL(),b=t.formatValue(g,{month:"long"}),w=au(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),x={"aria-label":u.format("startDate"),"aria-labelledby":v},E={"aria-label":u.format("endDate"),"aria-labelledby":v},S=rK(),D=rK(),O=sU(t,r),P=[w["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,e$.useMemo)(()=>s$(r,{accept:e=>e.id!==S}),[r,S]),j={[sZ]:C,[sq]:"presentation","aria-describedby":P,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},A=ne(e),k=(0,e$.useRef)(!1),{focusWithinProps:T}=of({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(D);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;k.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!k.current){var r,n;k.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),R=(0,e$.useRef)(s0),N=(0,e$.useRef)(s0);return{groupProps:rq(A,O,h,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":P,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{C.focusFirst()}},buttonProps:{...w,id:S,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${S} ${v}`,"aria-describedby":P,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${S} ${v}`},startFieldProps:{...x,...j,value:null!=(a=null==(n=t.value)?void 0:n.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[s4]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){R.current=e,t.updateValidation(s9(e,N.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...E,...j,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[s4]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(s9(R.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:y,calendarProps:{autoFocus:!0,value:(null==(i=t.dateRange)?void 0:i.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...r1(e),label:u,validationBehavior:i},a,s),[w,x]=(0,e$.useState)(null),E=(0,e$.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);l1({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=op({within:!0}),P=rJ({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=ne(e);return delete C.id,eL().createElement(rY,{values:[[up,a],[sv,{...c,ref:s,isInvalid:a.isInvalid}],[ox,{...h,isPressed:a.isOpen}],[lk,{...d,ref:l,elementType:"span"}],[sa,y],[lD,a],[ui,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[lS,m],[lh,{slots:{start:f,end:p}}],[oD,{slots:{description:v,errorMessage:g}}],[lP,b]]},eL().createElement("div",{...S,...C,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function uy(e){return eL().createElement(o$,e)}var uv=r(11712),ug=r.n(uv);function ub(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof ii||e instanceof iu||e instanceof id)return t?iE(e,t):e;{let r=ug()(e).toDate(),n=new ii(r.getFullYear(),r.getMonth()+1,r.getDate());return t?iE(n,t):n}}function uw(e){if(e)return e.toDate(iI())}function u_(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function ux(e){let t=e??"",r=u_(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function uE(){let e=window.i18next.language,t=u_(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;c=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;c=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var uS=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(c||"en-US"),uD=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},uO={};for(let e=0;e<100;e++)uO[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var uP={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},uC="[1234567890一二三四五六七八九〇\\d]",uj={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},uA={},uk={"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},uT={zone:uk,year:uO,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:{}},uR={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(uk).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,}"},uN={...uR,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}"},uI={},uM=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=uS){return uI[t.toLowerCase()]||(uI[t.toLowerCase()]=new e(t)),uI[t.toLowerCase()]}constructor(e=uS){this.locale=e,this.lookups={...uT},this.vars={...uR};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.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 t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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 t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=uj:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(uA[e])return uA[e];if("fullwide"===e||"hanidec"===e)return{group:uC,lookup:{...uj}};let t=uP[e];if(!t)return{group:"\\d",lookup:{...uj}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return uA[e]={group:`[${r}-${n}]`,lookup:o},uA[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,uN)uN.hasOwnProperty(r)&&(this.vars[r]=uN[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},u$=["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"],uL={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},uF=()=>new Date;function uB(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var uV=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},uU=["year","month","day","hour","minute","second","millisecond","offset"],uW={};function uz(e,t){return""===t||/^\s+$/.test(t)||"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 uK=[[/([^\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"]],uH={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," "],...uK],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:uK,id:uK,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function uG(e,t=uS){let r=function(e){if(!uW[e]){var t,r;let n,o,i=uM.factory(e);uW[e]=new uV({doneChecker:uz,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${uC}{2,4})\\s*\u5E74\\s*(${uC}{1,2})\\s*\u6708\\s*(${uC}{1,2})\\s*\u65E5$`),handler:uB(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:uB(["","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:uB(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=uF(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.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,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?uL[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=uF();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{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 t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:uB(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:uB(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:uB(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:uB(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:uB(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:uB(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:uB(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:uB(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:uB(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:uB(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:uB(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:uB(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:uB(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:uB(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:uB(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:uB(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:uB(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:uB(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:uB(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:uB(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:uB(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:uB(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:uB(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:uB(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:uB(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:uB(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:uB(["offset"])}],o=i.baseName.slice(0,5),u$.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(uU.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=uO[e.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return uW[e]}(t),n=function(e,t){let r=uH[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function uq(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new uD(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 uD(t.valueOf()-60*e.offset*1e3):t}function uZ(e,t=uS){let r=uG(e,t),n=r.invalid?new uD(NaN):uq(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function uY(e,t=uS){return e instanceof Date?new uD(e.valueOf()):"number"==typeof e?new uD(e):uZ(e,t)}Date.fromString=uD.fromString=uZ,Date.fromAny=uD.fromAny=uY,"u">typeof window&&(window.anyDateParser={fromString:uZ,fromAny:uY,fromObject:uq,attempt:uG});var uJ=r(68558),uQ=r(31441),uX=r(43117);let u0=function(e){return null==e};var u1=r(61907);function u4(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}ug().extend(uJ),ug().extend(uX),ug().extend(uQ);let u2="YYYY-MM-DDTHH:mm:ss.SSSZZ";function u3(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&ug()(e,u2).isValid()}function u6(e){return ug()(e).isToday()}function u5(e){return u3(e)?ug()(e,u2).toDate():null}function u9(e,t=!1){let r=ug()(e);return t&&(r=r.utc()),r.format(u2)}function u8(e){return ug()(e).toDate()}var u7=new WeakMap;let ce=new class{register(e,t){u4(this,u7).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(u4(this,u7).has(t))return u4(this,u7).get(t)}if(e.language&&u4(this,u7).has(e.language))return u4(this,u7).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return u4(this,u7).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,u7,{writable:!0,value:new Map})}};function ct(e,t){ce.register(e,t)}function cr(e){let t=e??uE();return ce.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let cn={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function co(e,t={}){let r=uG(e,uE());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!u0(r.day)&&u0(r.month)&&(r=Object.assign({},(0,u1.A)(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},(0,u1.A)(r,"day"),{date:r.day}));let n=ug()().set(r).toDate();return u0(r.year)&&(t.year=!1),u0(r.month)&&(t.month=!1),u0(r.date)&&(t.day=!1),ci(n,t)}function ci(e,t){let r,n=t?.locale??uE(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...cn,...{noToday:"am"===o.language},...t},p={calendar:i??cr(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},h=ug()(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(ca("-"))),"wide"==a&&(t=t.map(ca(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${cs(e)}`),r}let ca=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function cs(e){return e.toLocaleTimeString(uE(),{hour:"2-digit",minute:"2-digit"})}function cl(e,t){return ci(e,{...t,time:!0})}function cu(e,t){let r=cr("string"==typeof t?new Intl.Locale(t):t);return r?iE(e,a1(r)):e}function cc(e,t){return new Intl.DurationFormat(uE(),t).format(e)}function cd(e,t){if(null==e)return null;if("string"==typeof e){let r=uG(e,uE());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...(0,u1.A)(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...(0,u1.A)(r,"day"),...{date:r.day}}),ug()(t).set(r))}return ug()(e)}let cf=["years","months","days","hours","minutes","seconds"],cp={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},ch={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function cm(e,t=ug()(),r){let n,o=ug()(t),i=cd(e,o);if(null==i)return null;if("string"==typeof r){let e=cp[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?cp[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=cf.indexOf(r);for(let o=0;o<cf.length;o++){let i=cf[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):cp[s]??s,function(e,t,r,n){let o=cf.indexOf(r),i=cf.indexOf(n),a=cf.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...ch};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[cp[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let cy={style:"short",localeMatcher:"lookup"};function cv(e,t=ug()(),r){let n=cm(e,t,r);return null==n?null:cc(n,"object"==typeof r&&r.formatOptions?{...cy,...r.formatOptions}:cy)}let cg=(0,e$.createContext)(null);function cb(){let e=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,e$.useMemo)(()=>{let t=uE();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,e$.useMemo)(()=>{let e=cr(t);return void 0!==e?a1(e):void 0},[t]),n=(0,e$.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,e$.useMemo)(()=>r?iE(ik(iI()),r):ik(iI()),[r]);return{calendar:r,intlLocale:n,today_:o}}let cw=new ii(1793,1,1);var c_={};function cx(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}c_={"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 cE=r(77941);function cS(e={}){let{locale:t}=oL();return(0,e$.useMemo)(()=>new(0,cE.K)(t,e),[t,e])}var cD={};function cO(e){var t;let r=(0,e$.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=iY((t=cD)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,e$.useEffect)(()=>()=>clearTimeout(r.current),[]);let v=(0,e$.useRef)(!1),g=()=>{v.current=!0},b=()=>{v.current=!1},w=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,e$.useEffect)(()=>{v.current&&(r2&&r2.clear("assertive"),r3(w,"assertive"))},[w]);let x=rR(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&x(60)},e)}),E=rR(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&E(60)},e)}),S=e=>{e.preventDefault()},{addGlobalListener:D,removeAllGlobalListeners:O}=nL();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:g,onBlur:b},incrementButtonProps:{onPressStart:()=>{x(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:g,onBlur:b},decrementButtonProps:{onPressStart:()=>{E(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:g,onBlur:b}}}cD={"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 cP=r(95084);function cC(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let cj=(0,e$.createContext)(null),cA=(0,e$.createContext)(null),ck=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,cj);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=oL(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===n||isNaN(n)?lM(i,t,r):lL(i,t,r,n)),isNaN(a)||(a=void 0===n||isNaN(n)?lM(a,t,r):lL(a,t,r,n));let[d,f]=a7(i,isNaN(a)?NaN:a,s),[p,h]=(0,e$.useState)(()=>isNaN(d)?"":new(0,cE.K)(l,o).format(d)),m=(0,e$.useMemo)(()=>new(0,cP.d)(l,o),[l,o]),y=(0,e$.useMemo)(()=>m.getNumberingSystem(p),[m,p]),v=(0,e$.useMemo)(()=>new(0,cE.K)(l,{...o,numberingSystem:y}),[l,o,y]),g=(0,e$.useMemo)(()=>v.resolvedOptions(),[v]),b=(0,e$.useCallback)(e=>isNaN(e)||null===e?"":v.format(e),[v]),w=s2({...e,value:d}),x=void 0===n||isNaN(n)?1:n;"percent"===g.style&&(void 0===n||isNaN(n))&&(x=.01);let[E,S]=(0,e$.useState)(d),[D,O]=(0,e$.useState)(l),[P,C]=(0,e$.useState)(o);Object.is(d,E)&&l===D&&o===P||(h(b(d)),S(d),O(l),C(o));let j=(0,e$.useMemo)(()=>m.parse(p),[m,p]),A=(e,n=0)=>{if(isNaN(j))return lL(isNaN(n)?0:n,t,r,x);{let n=lL(j,t,r,x);return"+"===e&&n>j||"-"===e&&n<j?n:lL(cC(e,j,x),t,r,x)}},k=(0,e$.useMemo)(()=>!u&&!c&&(isNaN(j)||void 0===r||isNaN(r)||lL(j,t,r,x)>j||cC("+",j,x)<=r),[u,c,t,r,x,j]),T=(0,e$.useMemo)(()=>!u&&!c&&(isNaN(j)||void 0===t||isNaN(t)||lL(j,t,r,x)<j||cC("-",j,x)>=t),[u,c,t,r,x,j]);return{...w,validate:e=>m.isValidPartialNumber(e,t,r),increment:()=>{let e=A("+",t);e===d&&h(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(lL(r,t,r,x)),w.commitValidation())},decrement:()=>{let e=A("-",r);e===d&&h(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:k,canDecrement:T,minValue:t,maxValue:r,numberValue:j,setNumberValue:f,setInputValue:h,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),h(void 0===i?"":b(d));return}isNaN(j)?h(b(d)):(e=void 0===n||isNaN(n)?lM(j,t,r):lL(j,t,r,n),f(e=m.parse(b(e))),h(b(void 0===i?e:d)))}}}({...e,locale:a,validationBehavior:i}),l=(0,e$.useRef)(null),[u,c]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:v,...g}=function(e,t,r){var n,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:h,label:m,formatOptions:y,onBlur:v=()=>{},onFocus:g,onFocusChange:b,onKeyDown:w,onKeyUp:x,description:E,errorMessage:S,isWheelDisabled:D,...O}=e,{increment:P,incrementToMax:C,decrement:j,decrementToMin:A,numberValue:k,inputValue:T,commit:R,commitValidation:N}=t,I=iY((o=c_)&&o.__esModule?o.default:o,"@react-aria/numberfield"),M=rK(a),{focusProps:$}=ol({onBlur(){R()}}),L=cS(y),F=(0,e$.useMemo)(()=>L.resolvedOptions(),[L]),B=cS({...y,currencySign:void 0}),V=(0,e$.useMemo)(()=>isNaN(k)?"":B.format(k),[B,k]),{spinButtonProps:U,incrementButtonProps:W,decrementButtonProps:z}=cO({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:P,onIncrementToMax:C,onDecrement:j,onDecrementToMin:A,value:k,textValue:V}),[K,H]=(0,e$.useState)(!1),{focusWithinProps:G}=of({isDisabled:u,onFocusWithinChange:H});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,e$.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);aa(t,"wheel",n?void 0:o)}({onScroll:(0,e$.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?P():e.deltaY<0&&j())},[j,P]),isDisabled:D||u||c||!K},r);let q=(null!=(n=F.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";ng()?Z?Y="text":q&&(Y="decimal"):nE()&&(Z?Y="numeric":q&&(Y="decimal"));let J=ne(e),Q=(0,e$.useCallback)(e=>{"Enter"===e.key?(R(),N()):e.continuePropagation()},[R,N]),{isInvalid:X,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:er,inputProps:en,descriptionProps:eo,errorMessageProps:ei}=function(e,t,r){let n=rR(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,e$.useEffect)(()=>{if(!cx()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=cx()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=a7(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=od(e,t),d=s2({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:v,errorMessageProps:g}=sK({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=ne(e,{labelable:!0}),w={type:a,pattern:e.pattern};return sz(t,l,u),sH(e,d,t),(0,e$.useEffect)(()=>{if(t.current instanceof ns(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:rq(b,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||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=>u(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(eL().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,...c,...y}),descriptionProps:v,errorMessageProps:g,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,e$.useRef)(null);return{inputProps:rq(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...O,...J,name:void 0,label:m,autoFocus:h,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[s4]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:M,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:v,onFocus:g,onFocusChange:b,onKeyDown:(0,e$.useMemo)(()=>rk(Q,w),[Q,w]),onKeyUp:x,description:E,errorMessage:S},t,r);sz(r,t.numberValue,t.setNumberValue);let ea=rq(U,$,en,{role:null,"aria-roledescription":nw()?null:I.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let es=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?er.id:e["aria-labelledby"]);let eu=rK(),ec=rK(),ed=rq(W,{"aria-label":l||I.format("increase",{fieldLabel:el}).trim(),id:i&&!l?eu:null,"aria-labelledby":i&&!l?`${eu} ${i}`:null,"aria-controls":M,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ef=rq(z,{"aria-label":s||I.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?ec:null,"aria-labelledby":i&&!s?`${ec} ${i}`:null,"aria-controls":M,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...G,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:er,inputProps:ea,incrementButtonProps:ed,decrementButtonProps:ef,errorMessageProps:ei,descriptionProps:eo,isInvalid:X,validationErrors:ee,validationDetails:et}}({...r1(e),label:c,validationBehavior:i},s,l),b=rJ({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=ne(e);return delete w.id,eL().createElement(rY,{values:[[cA,s],[sv,f],[sb,{...p,ref:l}],[lk,{...d,ref:u}],[ox,{slots:{increment:h,decrement:m}}],[oD,{slots:{description:y,errorMessage:v}}],[lP,g]]},eL().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&eL().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function cT(e,t){return Number.parseInt(ci(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let cR=(0,e$.forwardRef)(function(e,t){let{className:r}=e,n=(0,e$.useContext)(ss),o=(0,e$.useContext)(sl),i=n??o,a=(0,e$.useContext)(cg),s=iI(),l=ci(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=cT(i.visibleRange.start.toDate(s),a),c=i.maxValue?cT(i.maxValue.toDate(s),a):void 0,d=i.minValue?cT(i.minValue.toDate(s),a):void 0,f=(0,e$.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,eM.jsxs)("span",{ref:t,className:r,children:[(0,eM.jsx)("span",{children:l}),(0,eM.jsxs)(ck,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,eM.jsx)(sw,{}),(0,eM.jsxs)(sg,{children:[(0,eM.jsx)(oE,{slot:"increment",children:(0,eM.jsx)(ti,{size:8})}),(0,eM.jsx)(oE,{slot:"decrement",children:(0,eM.jsx)(tr,{size:8})})]})]})]})}),cN="+4zksyca-I5VROi6oiQzJQ==",cI="wiExnFcGq1fPxn+K4eWeig==",cM="uiyACHcxSXjudv9HIlh57w==",c$="SxtTLfuOGW-Mst6POMWfQA==",cL="UU1QpNunTQCrdkAN2b2Ecg==",cF="fhR-1dd9yTq-5JUfl4REqA==",cB="_5INZ7v7pw4CkyEJ2Y8RsrA==",cV="RFMrlShZc97nAtIJF9P8jw==";function cU({children:e}){let t=(0,e$.useContext)(uf),r=(0,e$.useContext)(up),n=t??r,o=(0,e_.Wr)(()=>n?.close());return(0,eM.jsx)(lO,{className:"qllIfMFRvFHzGUeuOQ+PpA==",ref:o,children:e})}let cW=(0,e$.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,eM.jsx)(us,{ref:o,className:"_16UMXpLD7yf8iGA5mGYNeA==",placement:"bottom start",offset:1,isNonModal:!0,children:(0,eM.jsx)(cU,{children:(0,eM.jsxs)(i?sc:su,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,eM.jsxs)("header",{className:"WAVlDbzjKhHAlu18b5VwWw==",children:[(0,eM.jsx)(oE,{className:eB()(cL,cF),slot:"previous",children:(0,eM.jsx)(tf,{size:16})}),(0,eM.jsx)(cR,{className:"A3aKFbSSeqZsllm0oKdxgg=="}),(0,eM.jsx)(oE,{className:eB()(cL,cF),slot:"next",children:(0,eM.jsx)(tp,{size:16})})]}),(0,eM.jsx)(sf,{className:"_6qRB2DssZC4NegdCeg1ktQ==",children:e=>(0,eM.jsx)(sy,{className:eB()("cds--date-picker__day",{"TZl6MCGNAAF8bYh2zSUQ2w==":0===t.compare(e)}),date:e},e.toString())})]})})})}),cz=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(uf),[n,o]=rX({slot:e.slot},t,lh),{locale:i}=oL(),a=lf({...n,locale:i,createCalendar:a1}),s=(0,e$.useRef)(null),{fieldProps:l,inputProps:u}=sY({...n,inputRef:s},a,o),c=(0,e$.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,eM.jsxs)(rY,{values:[[lm,a],[sb,{...u,ref:s}],[sv,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,eM.jsx)(sg,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,e$.cloneElement)(e.children(t),{key:r}))}),(0,eM.jsx)(sw,{})]})}),cK=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(uf),n=(0,e$.useContext)(up);return(r??n).isInvalid?(0,eM.jsx)(rw,{ref:t,size:16,...e}):(0,eM.jsx)(tt,{ref:t,size:16,...e})});class cH{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let cG=new Map,cq=(0,e$.forwardRef)(function({segment:e,...t},r){let n=(0,e$.useContext)(lm),o=rA(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,e$.useRef)(""),{locale:l,direction:u}=oL(),c=function(){var e;let{locale:t}=oL(),r=iZ((e=s_)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,e$.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new cH(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=sG.get(t),m=e.isPlaceholder?"":e.text,y=(0,e$.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),v=i3({month:"long",timeZone:y.timeZone}),g=i3({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=g.format(t.dateValue));else{let e=v.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:b}=cO({value:e.value,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,e$.useMemo)(()=>new(0,cP.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:E}=(n=function(e){let{locale:t}=oL(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(cG.has(r))return cG.get(r);let n=new Intl.Collator(t,e);return cG.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,e$.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,e$.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,e$.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,e$.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=i3({hour:"numeric",hour12:!0}),D=(0,e$.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),O=(0,e$.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=i3({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,e$.useMemo)(()=>{if("era"!==e.type)return[];let r=iE(new ii(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),j=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(D,r))t.setSegment("dayPeriod",0);else if(E(O,r))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=C.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=w.parse(r));break;case"h12":a=!1,o>12&&(i=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=n}}};aa((0,e$.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let A=(0,e$.useRef)("");aa(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":A.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&j(n.data)}}),aa(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=A.current),null!=n&&(E(D,n)||E(O,n))&&j(n))}),rT(()=>{let e=r.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let k=nw()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,e$.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=rK(),R=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),I=ar({"aria-label":`${N}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let M={caretColor:"transparent"};if("rtl"===u){M.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(M.direction="ltr")}return{segmentProps:rq(b,I,{id:T,...k,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:R,suppressContentEditableWarning:R,spellCheck:R?"false":void 0,autoCorrect:R?"off":void 0,[parseInt(eL().version,10)>=17?"enterKeyHint":"enterkeyhint"]:R?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!R?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(nv()?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(),x()}},onFocus:()=>{s.current="",r.current&&af(r.current,{containingElement:ap(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:M,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=op(),{hoverProps:u,isHovered:c}=og({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,e$.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,e$.useCallback)(e=>{e.stopPropagation()},[]);return(0,eM.jsx)("span",{...rq(ne(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),cZ={short:!1,size:"md"},cY=(0,e$.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:v,...g}={...cZ,...e},{calendar:b,intlLocale:w,today_:x}=cb(),E=(0,e$.useId)(),S=!!(u??l),D=(0,e$.useMemo)(()=>ub(n,b),[n,b]),O=(0,e$.useMemo)(()=>ub(v,b,!0),[v,b]),P=(0,e$.useMemo)(()=>ub(d,b),[d,b]),C=(0,e$.useMemo)(()=>ub(f??cw,b),[f,b]),j=(0,e$.useMemo)(()=>i||s,[i,s]),A=(0,e$.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(uw(e)))),[h,p]);return(0,eM.jsx)(uy,{locale:w.toString(),children:(0,eM.jsx)("div",{className:eB()("cds--form-item",r),children:(0,eM.jsx)(rY,{values:[[cg,w]],children:(0,eM.jsxs)(uh,{className:eB()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:j,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...g,onChange:A,children:[(0,eM.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,eM.jsx)(lT,{className:eB()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,eM.jsxs)(sg,{className:cN,children:[(0,eM.jsx)(cz,{id:S?E:void 0,ref:t,className:eB()("cds--date-picker-input__wrapper","kykar4EZi79xhpVitgu-vg==",{"KJtg-MP1knHYLUz4R6hZEw==":"sm"===y,"ablE9mmlFsZsPekwcW7jjQ==":"md"===y||!y||0===y.length,"_5dkQpmV3FO9GZg+Ai3BG3A==":"lg"===y}),children:e=>"era"!==e.type?(0,eM.jsx)(cq,{className:cI,segment:e}):(0,eM.jsx)(eL().Fragment,{})}),(0,eM.jsx)(oE,{className:eB()(cL,{[cB]:"sm"===y,[cF]:"md"===y||!y||0===y.length,[cV]:"lg"===y}),children:(0,eM.jsx)(cK,{})})]}),(0,eM.jsx)(lC,{className:c$,children:a})]}),(0,eM.jsx)(cW,{variant:"single",today_:x})]})})})})}),cJ=(0,e$.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:v,intlLocale:g,today_:b}=cb(),w=(0,e$.useId)(),x=!!(s??a),E=(0,e$.useMemo)(()=>{if(h)return{start:ub(h[0],v,!1),end:ub(h[1],v,!1)}},[h,v]),S=(0,e$.useMemo)(()=>{if(t)return{start:ub(t[0],v,!1),end:ub(t[1],v,!1)}},[t,v]),D=(0,e$.useMemo)(()=>ub(c??cw,v,!0),[c,v]),O=(0,e$.useMemo)(()=>ub(u,v,!0),[u,v]),P=(0,e$.useMemo)(()=>r||i,[r,i]),C=(0,e$.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([uw(e.start),uw(e.end)]))),[f,d]);return(0,eM.jsx)(uy,{locale:g.toString(),children:(0,eM.jsx)("div",{className:eB()("cds--form-item",e),children:(0,eM.jsx)(rY,{values:[[cg,g]],children:(0,eM.jsx)(um,{id:x?w:void 0,className:eB()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===g.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:C,children:(0,eM.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,eM.jsx)(lT,{className:eB()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,eM.jsxs)(sg,{className:cN,children:[(0,eM.jsxs)("div",{className:eB()("YlkGhdQcBgSDJNSlS1cQnw==",{"fAKhSoomCu7Mn5FBku20SQ==":"sm"===p,"XVgGPgTNDC4UIcE+4yAZPQ==":"md"===p||!p||0===p.length,"UgHJ1nnMa-axxvCtxsZexg==":"lg"===p}),children:[(0,eM.jsx)(lv,{className:eB()("cds--date-picker-input__wrapper","qgbQm03oBFnWnXNV1GFW6Q==",cM),slot:"start",children:e=>(0,eM.jsx)(cq,{className:cI,segment:e})}),(0,eM.jsx)("div",{className:"_79vXZ2hgTRvmmxREZu5WGw==",children:(0,eM.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,eM.jsx)(lv,{className:eB()("cds--date-picker-input__wrapper","huv7xQjo+RZmT7LsDwVMdw==",cM),slot:"end",children:e=>(0,eM.jsx)(cq,{className:cI,segment:e})})]}),(0,eM.jsx)(oE,{className:eB()(cL,{[cB]:"sm"===p,[cF]:"md"===p||!p||0===p.length,[cV]:"lg"===p}),children:(0,eM.jsx)(cK,{})})]}),(0,eM.jsx)(lC,{className:c$,children:n}),(0,eM.jsx)(cW,{variant:"range",today_:b,minDate:D,maxDate:O})]})})})})})}),cQ=({diagnoses:e})=>{let{diagnosisTags:t}=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"});return(0,eM.jsx)("div",{className:"_8kut8cACHJrbzESyXn6V0A==",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,eM.jsx)(eW.Tag,{type:i,children:o},n)})})},cX={action:"Y0dulYR6B5fprvtdpjGfEg==",content:"fo0nBB+424Kd5d6PQgXSNw==",desktopHeading:"_0Cg1NmmrPwBagqee7ft6pA==",tabletHeading:"BogTFW2NIZhoGcuXc5XDuw==",tile:"QB8Ldd7u7gkdqC6n-YSg0Q=="},c0=({width:e="64",height:t="64"})=>(0,eM.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,eM.jsx)("use",{href:"#omrs-empty-data-illustration"})}),c1=e=>{let t="tablet"===(0,e_.qv)(),r=e.launchForm;return(0,eM.jsx)(eW.Layer,{className:cX.layer,children:(0,eM.jsxs)(eW.Tile,{className:cX.tile,children:[(0,eM.jsx)("div",{className:t?cX.tabletHeading:cX.desktopHeading,children:(0,eM.jsx)("h4",{children:e.headerTitle})}),(0,eM.jsx)(c0,{}),(0,eM.jsx)("p",{className:cX.content,children:(0,h.V)("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,eM.jsx)("p",{className:cX.action,children:r&&(0,eM.jsx)(eW.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:(0,h.V)("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},c4=({error:e,headerTitle:t})=>{let r="tablet"===(0,e_.qv)();return(0,eM.jsx)(eW.Layer,{children:(0,eM.jsxs)(eW.Tile,{className:"dd4186Mm5sjs8UUsDMSW1g==",children:[(0,eM.jsx)("div",{className:r?"g5rjg9+AOtwh8Z2Elf9wSg==":"Nd9u2TzLVcwE5QlMC2PRUg==",children:(0,eM.jsx)("h4",{children:t})}),(0,eM.jsxs)("p",{className:"z2RiNHQhCUYOlXJFOX2flg==",children:[(0,h.V)("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,eM.jsx)("p",{className:"dq+e2AreXbyoxopCEZRwXA==",children:(0,h.V)("errorCopy")})]})})},c2=c4,c3=eL().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=(0,e_.TA)(),a=window.location??{pathname:""},s=(0,e_.CX)(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,eM.jsxs)(eW.SideNav,{"aria-label":(0,h.V)("leftNavigation","Left navigation"),className:"jzTJKtCPCooU36+y+NwbPQ==",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,eM.jsx)(e_.W3,{name:"global-nav-menu-slot"}),r?(0,eM.jsx)(e_.fS,{value:o,fallback:(0,eM.jsx)(e_.W3,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,eM.jsx)(e_.zq.Provider,{value:o,children:(0,eM.jsx)(e_.W3,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null});var c6=r(83360),c5=r.n(c6),c9=r(99970),c8=r.n(c9);let c7=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,e$.useState)(""),s=(0,e$.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=c5()(t,d.lo,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,e$.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:f,loadingNewData:p,error:m,setPage:y}=function(e,t=0,r=""){let n=(0,e_.d7)(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=c8()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${d.IU}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},d.lo);return(0,e$.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),v=(0,e$.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),g=(0,e$.useCallback)(e=>{o(),a(e.trim())},[o]),b=(0,e$.useCallback)(()=>{!p&&f&&y(e=>e+1)},[p,f,y]),w=(0,e_.Jm)(b),x=f?Math.max(0,Math.floor(v.length-n/2)):-1;return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)(eW.Search,{"aria-describedby":m?`${s}-error`:void 0,labelText:(0,h.V)("searchForLocation"),id:s,placeholder:(0,h.V)("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),m&&(0,eM.jsx)("div",{className:"vWBFDqCDM8BcQhePvfa35g==",id:`${s}-error`,children:(0,eM.jsx)(eW.InlineNotification,{kind:"error",subtitle:(0,h.V)("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:(0,h.V)("error","Error")})}),(0,eM.jsx)("div",{className:"Gbet+W1fVEk45aZli6JbrA==",children:c?(0,eM.jsx)("div",{className:"QO-zjOxMSWAzXY-PMrSiwQ==",children:Array.from({length:5}).map((e,t)=>(0,eM.jsx)(eW.RadioButtonSkeleton,{className:"otoCykP+JQHrsIsgKUOd7A==",role:"progressbar"},t))}):(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("div",{className:"_6PasfpnQ738RjzgXBzAQpw==",children:v.length>0?(0,eM.jsx)(eW.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:v.map((e,t)=>(0,eM.jsx)(eW.RadioButton,{className:"rTDPjXuaGJbz9KhOf57M3g==",id:e.resource.id,labelText:(0,eM.jsx)("span",{ref:t===x?w:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,eM.jsx)("div",{className:"w4-CatRLHH3loLqlunOalg==",children:(0,eM.jsx)("p",{className:"Of2MJqhAMKF7nrwI5bKckw==",children:(0,h.V)("noResultsToDisplay")})})}),p&&(0,eM.jsx)("div",{className:"NAwSBETYamP9uMuJE63U-w==",children:(0,eM.jsx)(eW.InlineLoading,{description:(0,h.V)("loading")})})]})})]})},de=(0,ek.Zd)("modalState",{modalContainer:null,modalStack:[]}),dt=0;async function dr(e,t,r={}){let n=(0,ev.Fg)(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=dt++;o=await (0,ev.Wu)({...a,name:`${t}-${s}`},{...r,domElement:e})}else(0,ec.N)(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function dn(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function di(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function da(e){return e.find(e=>!dn(e))}function ds(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let dl=window.getComputedStyle(document.body).overflow;function du({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",dd),document.body.style.overflow="hidden",t.style.visibility="unset");let r=da(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",dr(r,e.modalName,e.props).then(n=>{dn(e)?di(e.modalName,n):n?(e.parcel=n,t.prepend(r),ds(e,da(de.getState().modalStack)===e),n.mountPromise.then(()=>{dn(e)||(e.state="MOUNTED")},t=>{(0,ec.N)(t),e.parcel=null,dc(e)})):dc(e)},t=>{(0,ec.N)(t),dc(e)});break}case"MOUNTING":case"MOUNTED":ds(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),di(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=de.getState();de.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=dl,removeEventListener("keydown",dd)}function dc(e){if(dn(e))return;e.state="TO_BE_DELETED";let t=de.getState();de.setState({...t,modalStack:[...t.modalStack]})}function dd(e){"Escape"===e.key&&function(){let[e]=de.getState().modalStack;e&&dc(e)}()}function df(e){de.subscribe(du),de.setState({...de.getState(),modalContainer:e})}function dp(e,t={},r=()=>{}){let n=()=>{let e=de.getState().modalStack.find(e=>e.onClose===r);e&&dc(e)};if((0,ev.Fg)(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=de.getState()).modalStack],de.setState({...i,modalStack:a})}else(0,ec.N)(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var dh=r(67436);let dm=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},dy=({subject:e})=>{let[t,r]=(0,e$.useState)([]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(dm,{notification:e},e.id))})},dv=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,e$.useState)(t);return(0,eM.jsx)(eW.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:(0,h.V)("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:(0,h.V)("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},dg=({subject:e})=>{let[t,r]=(0,e$.useState)([]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(dv,{notification:e},e.id))})};var db=r(33743),dw=r(78014),d_=r(36791),dx=r(6476),dE=r(39715),dS=r(70200),dD=r(47508),dO=r(28481),dP=Object.prototype.hasOwnProperty;let dC=function(e){if(null==e)return!0;if((0,dE.A)(e)&&((0,dx.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,dS.A)(e)||(0,dO.A)(e)||(0,d_.A)(e)))return!e.length;var t=(0,dw.A)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,dD.A)(e))return!(0,db.A)(e).length;for(var r in e)if(dP.call(e,r))return!1;return!0};var dj=r(6661);let dA=new dh.Subject,dk=0,dT=new dh.Subject,dR=0;function dN(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(dy,{subject:dA}))}function dI(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!dC(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{dA.next({...e,id:dk++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function dM(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(dg,{subject:dT}))}function d$(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!dC(t))?setTimeout(()=>{dT.next({...e,id:dR++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let dL=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],dF=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],dB={container:"NfxbHD-wnMrBzBk69SCjYQ==",card:"_9oQAhF55AGaJdV52G-wqjg==","abnormal-value":"drvEiwdbggDi0fbHudAK8A==","critical-value":"JAIHtThObGIUDziDrI7NEw==",cell:"lTunWbcsMBJlcgcQcM49VQ==","critically-high":"aDUjcSFuBLWzHLB6F2ZL0w==","critically-low":"_5srAKYBlbvz1g2GZM1ESig==",high:"_7KiyKNoFp9yrwGOfblyG2A==",low:"Zs2ctcOpDW7uCL3jkar-mA==","label-container":"lGnGHj+yIJy++XiPwZ7Nzw==","value-container":"hHPXtsgUdZ4GZ-eQwkTLgQ==",label:"WFuxkvDaJtvRG1q-haHcBQ==",value:"_6fHUr05hAbo85hI967ByDg==",units:"EdVuwD5UxHNRKpAyfNSWGg==","pad-right":"_6T9CddK+8fdeyqNlwc4v4Q==","off-scale-low":"Sc1CVNBCBJ6DIhtHUAQbCg==","off-scale-high":"cWpU2bqU5X9eYPOfFJtE4g==",arrow:"SLGUhJysawfaXr-VtuJBYg=="},dV=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,e$.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${d.Jj}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${d.Jj}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=c5()(r,d.lo),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),f=o??u,p=(0,e$.useMemo)(()=>{if(n)return n?"--"===n?"normal":dL.includes(n)?n.toLowerCase():dF.includes(n)?n:"normal":void 0;if(f&&!c){if(!f||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==f.hiAbsolute&&void 0!==f.hiAbsolute&&t>f.hiAbsolute?"off_scale_high":null!==f.hiCritical&&void 0!==f.hiCritical&&t>=f.hiCritical?"critically_high":null!==f.hiNormal&&void 0!==f.hiNormal&&t>f.hiNormal?"high":null!==f.lowAbsolute&&void 0!==f.lowAbsolute&&t<f.lowAbsolute?"off_scale_low":null!==f.lowCritical&&void 0!==f.lowCritical&&t<=f.lowCritical?"critically_low":null!==f.lowNormal&&void 0!==f.lowNormal&&t<f.lowNormal?"low":"normal"}return"normal"},[n,f,e,c])??"normal",m="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,y="normal"!==p,v=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,w=null!=e&&""!==e,x=w?e:(0,h.V)("notAvailable","Not available"),E=eB()({[dB["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[dB["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[dB.low]:"low"===p,[dB.high]:"high"===p,[dB["off-scale-low"]]:"off_scale_low"===p,[dB["off-scale-high"]]:"off_scale_high"===p}),S=eB()({[dB.container]:!0,[dB.card]:!0,[dB["critical-value"]]:m,[dB["abnormal-value"]]:y&&!m}),D=eB()({[dB.cell]:!0,[E]:!0});return"cell"===a?(0,eM.jsxs)("div",{className:D,children:[x,w&&t?` ${t}`:""]}):(0,eM.jsxs)("section",{className:S,"data-testid":"numeric-observation-card",children:[r&&(0,eM.jsxs)("div",{className:dB["label-container"],children:[(0,eM.jsx)("span",{id:v,className:dB.label,children:r}),y&&(0,eM.jsx)("span",{className:dB[p.replace("_","-")],title:(0,h.V)("abnormalValue","Abnormal value")})]}),(0,eM.jsxs)("div",{className:dB["value-container"],children:[(0,eM.jsx)("span",{id:g,"aria-labelledby":v&&b?`${v} ${b}`:v||b||void 0,className:dB.value,children:x}),w&&t&&(0,eM.jsx)("span",{id:b,className:dB.units,children:t})]})]})},dU="YOpQLiaTysM+swWB7ATzKw==",dW=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,eM.jsx)("div",{className:eB()(dU,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,eM.jsx)("div",{className:eB()(dU,n),...o,children:(0,eM.jsx)(dz,{title:t,illustration:r})})}},dz=({title:e,illustration:t,className:r})=>{let[n,o]=(0,e$.useState)(null);return(0,e$.useEffect)(()=>{(0,f.zj)("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,eM.jsxs)("div",{className:eB()("PjsJmcqHjhav+51GzX5n1A==",r),children:[t,(0,eM.jsxs)("div",{className:"pPcKj1kNkKP4cQZUtFRU5g==",children:[n?.implementationName&&(0,eM.jsx)("p",{children:(0,h.V)(n.implementationName)}),(0,eM.jsx)("p",{className:"_3d4ICXZtVrDwUYN1iMMJCA==",children:e})]})]})},dK=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=(0,e_.WK)(t,e,n,i),u="tablet"===(0,e_.qv)(),c=(0,h.V)("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,eM.jsx)(eM.Fragment,{children:e>0&&(0,eM.jsxs)("div",{className:eB()({"lQ3akicW2mAhjncqby7nDA==":u,"HfUTYLFumnQ+awk4OaX1Dg==":!u}),children:[(0,eM.jsxs)("div",{children:[c,o&&(0,eM.jsx)(e_.i_,{to:o,className:"NM9v7zGqLsggVcQgLFigdA==",children:a??(0,h.V)("seeAll","See all")})]}),(0,eM.jsx)(eW.Pagination,{className:"WzkBsEFtArGu5wzXr0lPcA==",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>(0,h.V)("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function dH(e){return dq(dY(e,"usual","official"))}function dG(e){return dH(e)}function dq(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function dZ(e){return dq(e)}function dY(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function dJ(e,t=ug()()){let r=ug()(t),n=cd(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function dQ(e,t=ug()()){let r=dJ(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),cc(r,n)}let dX={container:"Gjd-4rKbEfNJ1EnpVM5fDg==",activePatientContainer:"QLcpgcrRf24FIBxfL-Reow==",patientBanner:"_7nrgC9D3asLAi-n1Cu-+aQ==",patientName:"-bF9a-l+JKDw4GnX6Iibsw==",patientAvatar:"AkN3HR6abRKcGhD1xnV8+w==",patientAvatarButton:"KDxA6I0UaFgLEI3mjex7Sg==",patientInfo:"+WtDB+1dogKuMZh79ffYHA==",demographics:"Vtf3vivMNnVD8Iw8FKnzIg==",row:"NIOYIHZjX3g7f-6H9EkSAg==",flexRow:"VxdGBrkVaGOrwx9RLt5iGA==",tagsSlot:"lU6+4m9TGusLI5P4rs2PxQ==",identifiers:"tehd8btQy-Upd-+nQmM3Ng==",identifier:"bSJIFK4yvsj7cwSGcOeCeg==",primaryIdentifier:"yOV1BITeMsXWDZ0-ZuNmRA==",secondaryIdentifier:"WvJbhTqh9ZSXAOeO7O+qjw==",value:"sBM-qDgU2-uAwtlPf+7gjA==",tag:"BEvEVs8H7vGP3H5V4Ec7VA==",gender:"_4XkLqr-02wazwbUoUfB7ow==",separator:"iYBA3rO3YNmv7d1qmnvvcA==",tooltipPadding:"EWVCKw9MY3VDbqwyPpZwyA==",tooltipSmallText:"yDmRU9+68HwaptpjumYB7w==",actionsButtonText:"mn139IetW5A5xAlW5YMrZQ=="};function d0({showIdentifierLabel:e,type:t,value:r}){return(0,eM.jsx)("span",{className:dX.primaryIdentifier,children:(0,eM.jsxs)(eW.Tag,{className:dX.tag,type:"gray",children:[e&&t?.text&&(0,eM.jsxs)("span",{className:dX.label,children:[t.text,": "]}),(0,eM.jsx)("span",{className:dX.value,children:r})]})})}function d1({showIdentifierLabel:e,type:t,value:r}){return(0,eM.jsxs)(eW.FormLabel,{className:dX.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,eM.jsxs)("span",{className:dX.label,children:[t?.text,": "]}),(0,eM.jsx)("span",{className:dX.value,children:r})]})}function d4({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=(0,e_.UK)(),{primaryIdentifierCode:n}=(0,e_.wJ)(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,eM.jsx)(eM.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,eM.jsxs)(eL().Fragment,{children:[(0,eM.jsx)("span",{className:dX.identifier,children:r?.coding?.[0]?.code===n?(0,eM.jsx)(d0,{showIdentifierLabel:t,type:r,value:e}):(0,eM.jsx)(d1,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"})]},e)):""})}let d2={Female:tD,Male:tO,Other:tP,Unknown:tC},d3=({gender:e})=>{let t=d2[e];return t?(0,eM.jsx)(t,{fill:"#525252"}):null},d6={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function d5({patient:e,renderedFrom:t}){var r;let n,o,i=dH(e),a=e?.gender&&(o=d6[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:(0,h.V)(n,r),iconKey:o}),s=(0,e$.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,eM.jsxs)("div",{className:dX.patientInfo,children:[(0,eM.jsx)("div",{className:eB()(dX.row,dX.patientNameRow),children:(0,eM.jsxs)("div",{className:dX.flexRow,children:[(0,eM.jsx)("span",{className:dX.patientName,children:i}),a&&(0,eM.jsxs)("div",{className:dX.gender,children:[(0,eM.jsx)(d3,{gender:a.iconKey}),(0,eM.jsx)("span",{children:a.displayText})]}),(0,eM.jsx)(e_.W3,{className:dX.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,eM.jsxs)("div",{className:dX.demographics,children:[e.birthDate&&(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("span",{children:dQ(e.birthDate)}),(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"}),(0,eM.jsx)("span",{children:co(e.birthDate,{time:!1})}),(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"})]}),(0,eM.jsx)(d4,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,eM.jsx)(e_.W3,{className:dX.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var d9=r(3534);function d8({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,e$.useState)(!1),{extensions:a}=(0,e_.br)(r),s="tablet"===(0,e_.qv)(),l=(0,e_.Wr)(()=>i(!1),o),u=(0,e$.useRef)(null),c=(0,e$.useRef)(null),d=(0,e$.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,e$.useCallback)(()=>i(e=>!e),[]),y=(0,e$.useCallback)(()=>{i(!1),u.current?.focus()},[]),v=(0,e$.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),y();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[y,o]);(0,e$.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,e$.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:y,...n}),[t,e,y,n]);return 0===a.length?null:(0,eM.jsx)("div",{className:"lXHHD93To9w3SyNIoCMHSQ==",children:(0,eM.jsxs)("div",{"data-overflow-menu":!0,className:eB()("cds--overflow-menu",eH),ref:l,children:[(0,eM.jsxs)("button",{className:eB()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},eZ),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:v,ref:u,children:[(0,eM.jsx)("span",{className:"SdOyMS1Pdej4TaBLRHDong==",children:(0,h.V)("actions","Actions")})," ",(0,eM.jsx)(d9.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,eM.jsxs)("div",{className:eB()("cds--overflow-menu-options","cds--overflow-menu--flip",eG,{[eq]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:v,ref:c,role:"menu",tabIndex:-1,children:[(0,eM.jsx)("ul",{className:eB()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,eM.jsx)(e_.W3,{name:r,state:g},r)}),(0,eM.jsx)("span",{})]})]})})}var d7=r(51982),fe=r.n(d7),ft=r(15931),fr=r.n(ft);function fn(e){let{patientPhotoConceptUuid:t}=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${d.Jj}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=fr()(e?r:null,d.lo),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let fo=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,e0.useTranslation)();return(0,eM.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,eM.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,eM.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"})]})},fi="t5TmZmWjzvbCohKkMNbM-g==";function fa({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=fn(e),[i,a]=(0,e$.useState)(null),[s,l]=(0,e$.useState)(!1),u=(0,e$.useMemo)(()=>fe().generate(e),[e]);(0,e$.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,e$.useMemo)(()=>r||(i?(0,h.V)("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):(0,h.V)("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,eM.jsx)(eW.SkeletonIcon,{className:"ueN8QhkAPVeVEePyTHkCOg==","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,eM.jsx)(fo,{"aria-label":(0,h.V)("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,eM.jsx)("div",{"aria-label":c,children:(0,eM.jsx)("img",{className:fi,src:i,alt:c,title:t})}):(0,eM.jsx)("div",{"aria-label":c,children:(0,eM.jsx)("div",{className:fi,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,eM.jsx)("span",{className:"-k9HvZjk0UAVuy9F8zZz0w==",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let fs=["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-digital-trust","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-metadata-export","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"],fl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),fu=fl,fc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),fd=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),ff=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),fp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),fh=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),fm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),fy=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),fv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),fg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),fb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),fw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),f_=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),fx=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),fE=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),fS=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),fD=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),fO=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),fP=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),fC=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),fj=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),fA=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),fk=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),fT=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),fR=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),fN=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),fI=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),fM=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),f$=fg,fL=fP,fF=(0,e$.memo)((0,e$.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,e$.useRef)(document.getElementById(e));return(0,e$.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,eM.jsx)(e_.fS,{value:o.current,fallback:t,children:(0,eM.jsx)(fB,{ref:n,pictogram:e,pictogramProps:r})})})),fB=(0,e$.memo)((0,e$.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,eM.jsx)("svg",{ref:r,className:eB()("wXX7tgyTzQUB487Ai2jwkw==",n),height:o,width:o,children:(0,eM.jsx)("use",{href:`#${e}`})})})),fV=({children:e})=>"tablet"===(0,e_.qv)()?(0,eM.jsx)(eW.Layer,{children:e}):(0,eM.jsx)(eM.Fragment,{children:e}),fU=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,e$.useState)(r),[y,v]=(0,e$.useState)(!0),[g,b]=(0,e$.useState)(!1),w=(0,e$.useCallback)(()=>{setTimeout(t,250)},[t]),x=(0,e$.useCallback)(()=>{b(!0),w()},[w]);return(0,e$.useEffect)(()=>{if(u){let e=setTimeout(x,l);return()=>clearTimeout(e)}},[l,u,x]),(0,e$.useEffect)(()=>{v(!1),window.setTimeout(()=>{v(!0)},0)},[]),(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:p,"aria-label":(0,h.V)("closeSnackbar","Close snackbar"),className:eB()("-oZItDje+VqIMbRFsj0vKg==",{"M2YBUemKsEmA3Eg4hsWRFQ==":y,"yEmGTBZUeA8w30tHbNSn5g==":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),x(),a&&m(a)},onClose:w,statusIconDescription:(0,h.V)("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},fW=({subject:e})=>{let[t,r]=(0,e$.useState)([]),n=(0,e$.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(fU,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},fz=new dh.Subject,fK=0;function fH(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(fW,{subject:fz}))}function fG(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{fz.next({...e,id:fK++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let fq=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,e$.useCallback)(()=>{s(),t()},[t,s]);return(0,eM.jsx)("div",{children:(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},fZ=({subject:e})=>{let[t,r]=(0,e$.useState)([]),n=(0,e$.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(fq,{toast:e,closeToast:()=>n(e)},e.id))})},fY=new dh.Subject,fJ=0;function fQ(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(fZ,{subject:fY}))}function fX(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!dC(t))?setTimeout(()=>{fY.next({...e,id:fJ++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function f0(e,t=!1){if(t)return!0;let r=f6[e];return!r||!r()}function f1(e,t){let r=pn.getState()?.workspaceGroup,n=r?.name;n&&e===n&&ps(()=>{let n=pf(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),pn.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function f4(e,t){let{name:r,additionalProps:n}=t;(0,ev.Xb)(r);let o=()=>{pe(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>f2(r,n),closeWorkspaceGroup:!1})};f0(e.name)?o():pu("closing-workspace-launching-new-workspace",o,e.title??e.name)}function f2(e,t){let r=(0,ev.Xb)(e),n=pn.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void f1(n.name,()=>{f2(e,t)});let o=pn.getState().workspaceGroup?.name,i={...r,title:pc(r,t),closeWorkspace:(t={})=>pe(e,t),closeWorkspaceWithSavedChanges:t=>pe(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(f6[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,pn.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){pn.setState(r=>{let n=[e,...t??r.openWorkspaces],o=pa(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&pf(o,t);let s=pn.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===pc(t,t.additionalProps)&&{title:pc(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,pn.getState().openWorkspaces.filter(e=>e.type!=i.type)),f4(u,{name:e,additionalProps:t})):a(i);else f4(s[0],{name:e,additionalProps:t})}function f3({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){pt(t),f2(r,n),(0,eb.oo)({to:e})}let f6={};function f5(e,t){f6[e]=t}function f9(e){return f6[e]}function f8(){let e=pn.getState();pn.setState({...e,prompt:null})}let f7={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function pe(e,t={}){t={...f7,...t};let r=()=>{let r=pn.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=pn.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&f1(o),f6[e]=()=>!1,pn.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:pa(n?.[0])})),t?.onWorkspaceClose?.()};return f0(e,t?.ignoreChanges)?(r(),!0):(pu("closing-workspace",r,(0,ev.Xb)(e).title??e),!1)}function pt(e){pn.getState().context!=e&&pn.setState({context:e,openWorkspaces:[],prompt:null})}let pr={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},pn=(0,ek.Zd)("workspace",pr);function po(){return pn}function pi(e){let t=pn.getState();pn.setState({...t,workspaceWindowState:e})}function pa(e){return e?.preferredWindowSize??"normal"}function ps(e=()=>{},t=()=>!0){let r=pn.getState().openWorkspaces.filter(t).every(({name:e})=>f0(e)),n=()=>{pd(),e?.()};r?n():pu("closing-all-workspaces",n)}function pl(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=(0,e_.Pj)(pn);return(0,e$.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function pu(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:(0,h.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,h.V)("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:(0,h.V)("discard","Discard")};break;case"closing-all-workspaces":{let e=pn.getState().openWorkspaces.filter(({name:e})=>!f0(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:(0,h.V)("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:(0,h.V)("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:()=>{t?.()},confirmText:(0,h.V)("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:(0,h.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,h.V)("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{pn.setState(e=>({...e,prompt:null})),t?.()},confirmText:(0,h.V)("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}pn.setState(e=>({...e,prompt:n}))}function pc(e,t){return t?.workspaceTitle??e.title}function pd(){pn.setState(pr)}function pf(e,t={}){if(!e||"default"===e)return;let r=(0,ek.jf)(e,{});return t&&r.setState(e=>({...e,...t})),r}let pp="f7spBy3jUTfjOH25a05A1A==",ph="ZROo9Y2WovRqEcmbEXN7sQ==",pm="+mcQhrE2BMNqPBknif4FqQ==";function py({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,eM.jsxs)(eM.Fragment,{children:[e({size:16}),t?(0,eM.jsx)("span",{className:"_7695LgJosRmkPmkyVGdZ-g==",children:"!"}):(0,eM.jsx)("span",{className:"vo9ZXEHO6camG8qEsBCH8A==",children:r})]})}let pv=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=(0,e_.qv)(),{workspaces:s,workspaceWindowState:l}=pl(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,eM.jsxs)(eW.Button,{className:eB()(pp,{[pm]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,eM.jsx)("span",{className:ph,children:(0,eM.jsx)(py,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,eM.jsx)("span",{children:t})]}):(0,eM.jsx)(eW.IconButton,{align:"left","aria-label":r,className:eB()(pp,{[pm]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,eM.jsx)("div",{className:ph,children:(0,eM.jsx)(py,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var pg=r(4964),pb=r(37650),pw=r(44314),p_=/[\\^$.*+?()[\]{}|]/g,px=RegExp(p_.source);let pE=function(e){return(e=(0,pw.A)(e))&&px.test(e)?e.replace(p_,"\\$&"):e};function pS({contextKey:e}){let{prompt:t}=pl();return(0,e$.useEffect)(()=>{RegExp(`/${pE(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,e$.useEffect)(()=>(pt(e),()=>{pt(null)}),[e]),(0,e$.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${pE(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=pn.getState().openWorkspaces.every(({name:e})=>f0(e));a||(s?pd():(r?.(),ps(()=>{(0,eb.oo)({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,eM.jsxs)(eW.ComposedModal,{open:!0,onClose:f8,children:[(0,eM.jsx)(eW.ModalHeader,{title:t.title}),(0,eM.jsx)(eW.ModalBody,{children:(0,eM.jsx)("p",{className:"+SBeVyf3Vs1HLINqeNxwCA==",children:t.body})}),(0,eM.jsxs)(eW.ModalFooter,{children:[(0,eM.jsx)(eW.Button,{kind:"secondary",onClick:f8,children:t.cancelText??(0,h.V)("cancel")}),(0,eM.jsx)(eW.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??(0,h.V)("confirm")})]})]}):null}var pD=r(87757);function pO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pO(Object(r),!0).forEach(function(t){pj(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function pC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pj(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pA(e){return(pA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pk(e,t){return(pk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pT(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var pR=function(e){var t=e$.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&pk(a,t);var r,n,o,i=(r=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,t=pA(a);e=r?Reflect.construct(t,arguments,pA(this).constructor):t.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 pT(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),pj(pT(t=i.call(this,e)),"handleRef",function(e){t.el=e}),pj(pT(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),pj(pT(t),"getParcelProps",function(){var e=pP(pP({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.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 t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,pP({domElement:t},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 pD.i&&pD.i.Consumer?e$.createElement(pD.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=pD.i&&pD.i.Consumer?e$.createElement(pD.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return e$.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],pC(a.prototype,n),o&&pC(a,o),a}();pj(pR,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});let pN=(0,ev.U2)();function pI({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,e$.useState)(),o=function(e){let[t,r]=(0,e$.useState)({}),[n,o]=(0,e$.useState)(e);return(0,e$.useEffect)(()=>{n!==e&&o(e)},[e]),(0,e$.useEffect)(()=>{let e,t=pf(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,e$.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,e$.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,eM.jsx)(pR,{config:r,mountParcel:pN,...i},e.name):(0,eM.jsx)(eW.InlineLoading,{className:"H6dHj0oBasuEG5BThmRHhw==",description:`${(0,h.V)("loading","Loading")} ...`})}function pM({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,e$.useState)(!1),i=(0,e$.useRef)(window.innerHeight),{featureName:a}=(0,e$.useContext)(e_.zq),s=(0,e_.qv)();(0,e$.useEffect)(()=>{let e=()=>{o(!(0,e_.xl)(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,eM.jsx)("aside",{className:eB()("GJUJ7TWs47hZNAq1HgT48A==",{"_7+TCfrT4vrpC5TH4e1by0w==":e,"bQ0UMzF1JBk1bcCogWlGrw==":n,"v-1cRnDYDLbApkU1gJodvg==":!n}),children:(0,eM.jsx)("div",{className:"WocuWYX1W7JwP94ypr0B8A==",children:(0,eM.jsx)(e_.W3,{className:"Cn3Jbzq8LOgwfW4fj6XYSQ==",name:l,state:r})})})}function p$({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=(0,e_.qv)(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=pl(),u=l?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,e$.useMemo)(()=>r||u&&!d,[u,d,r]);return(0,e_.yJ)(!d&&!(0,e_.xl)(i)),(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)("div",{className:r?"AHHuuXanpv12GtwxcK3ogA==":"E7yiHjGY1d2E+4Abx0jh7g==",children:[(0,eM.jsx)("aside",{className:eB()(t?"_7nS969hUMMe36pOPOtI3Fg==":"l+rgkmJVqlq3O++ce09vbA==",{"AJHmQ2iPp0Yic2jCrU6NIA==":d,"Vb16L-oIiZ74fu1QQMOirg==":"narrow"===f,"Bn7v8I0voAWdRO7H9eKQiw==":"wider"===f,"vN8kIRmjOaaBlFkAfGVJ5g==":"extra-wide"===f}),children:(0,eM.jsx)("div",{className:eB()("pBPmoo5CjBr1d116v8KrrA==",{"Sew5FCwW7FqufRz17h2owg==":"maximized"===s,"BxutHfy6GErdVMJpbvmkVg==":d}),children:a.map((e,t)=>(0,eM.jsx)("div",{className:eB()("tYaVVyyd6Tcv58Bbo4mkcw==",{"lBaWeq3srAzA5Ngk2dm0kQ==":0!==t}),children:(0,eM.jsx)(e$.Suspense,{fallback:null,children:(0,eM.jsx)(e0.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,eM.jsx)(pL,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,eM.jsx)(pS,{contextKey:e})]}),p&&(0,eM.jsx)(pM,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function pL({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,e0.useTranslation)(),n=(0,e_.qv)(),{workspaceWindowState:o,workspaceGroup:i}=pl(),a=i?.name,s="maximized"===o;(0,e$.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,e$.useContext)(e_.zq),u=(0,e$.useCallback)(()=>{pi(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,e$.useMemo)(()=>e??{},[e]),m=(0,e$.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)(eW.Header,{"aria-label":(0,h.V)("workspaceHeader","Workspace Header"),className:"-3kjtr5uYox3-kZnfzcNuw==",children:[!(0,e_.xl)(n)&&!c&&(0,eM.jsx)(eW.HeaderMenuButton,{"aria-label":(0,h.V)("close","Close"),renderMenuIcon:(0,eM.jsx)(e5,{}),onClick:()=>p()}),(0,eM.jsx)(eW.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,eM.jsx)("div",{className:"_2Zd7JZN89pW2XY09qZBAAw=="}),(0,eM.jsxs)(eW.HeaderGlobalBar,{className:"ppNsYZC7Z00KBemD1lNxQA==",children:[(0,eM.jsx)(e_.W3,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,eM.jsx)(e_.W3,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,eM.jsx)(e_.W3,{name:`workspace-header-${l}-slot`,state:m}),(0,e_.xl)(n)&&(0,eM.jsxs)(eM.Fragment,{children:[(d||s)&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":s?(0,h.V)("minimize","Minimize"):(0,h.V)("maximize","Maximize"),onClick:u,children:s?(0,eM.jsx)(pg.Xj,{}):(0,eM.jsx)(pg.hz,{})}),c&&!a?(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide","Hide"),onClick:()=>pi("hidden"),children:(0,eM.jsx)(e9,{})}):(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close","Close"),onClick:()=>p?.(),children:(0,eM.jsx)(tm,{})})]}),"tablet"===n&&c&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close","Close"),onClick:()=>p?.(),children:(0,eM.jsx)(pb.d3,{})})]})]}),(0,eM.jsx)("div",{className:eB()("cNdK12M+p0cj6LR0VGui6A==",{"RXftxuAFC8bU7RXpujMdHA==":!!f}),children:(0,eM.jsx)(pI,{workspace:e,additionalPropsFromPage:t},e.name)})]})}var pF=r(49598),pB=r(92424);async function pV(e,t){let{openedGroup:r}=ev.J_.getState();if(r){if(r.groupName===e&&pz(r.props,t))return!0;else if(!await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return ev.J_.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function pU(e){let{openedGroup:t,openedWindows:r}=ev.J_.getState();if(t){if(r.length>0&&!(e||await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;ev.J_.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function pW(e,t=null,r=null,n=null){let o=ev.J_.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=(0,ev.Ml)(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=(0,ev.o1)(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=(0,ev.YX)(e);if(a&&(a.groupName!==l.name||!pz(a.props,n)))return!!await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(pz(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&pz(d.props,t)?((a||u!==o.openedWindows.length-1)&&ev.J_.setState(pH.restoreWindow(o,s)),!0):!!await pK({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[pY(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await pK({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await pK({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function pz(e,t){return null==e||null==t||(0,pB.b)(e,t)}function pK(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=ev.J_.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=dp("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let pH={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=(0,ev.YX)(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,pY(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=(0,ev.YX)(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function pG(){return(0,e_.mQ)(ev.J_,pH)}let pq=()=>(0,e$.useContext)(pD.i),pZ=()=>Object.keys(ev.J_.getState().registeredWorkspacesByName);function pY(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:(0,pF.A)()}}let pJ={workspaceOuterContainer:"bPVpyfZzXGTGRy6q-9pUCQ==",narrowWorkspace:"kSYS7aTPRggp+MU8vlcg9Q==",widerWorkspace:"nW2HBDZ0RgkGRkWQv4sdoQ==",extraWideWorkspace:"em5yAU5C7oWbHDo0sV+3mw==",workspaceMiddleContainer:"Bx1i6z+7q-g19Un039FkIw==",maximized:"Kfygrk5eNBXuECXupuCX8g==",hidden:"RPimX0oediR2hea+lS-OuQ==",workspaceInnerContainer:"_5zxptoWhQKImthth5lAP+g==",workspaceSpacer:"E+9820x1sb5UGVFe-CBnKA==",loader:"vmBQnPcRkkl1-BXrxfe78A==",hiddenExtraWorkspace:"qkbMGOnFdM1xyc3yNGcang==",header:"IZ-2+-SpwQ-zVx81DihBdw==",headerButtons:"_81a2NYhmPVTD24yRK8d2FQ==",workspaceContent:"eetPy90L7DgJzpdTBFH3sg==",overlayHeaderSpacer:"ruc6rYzwbrMxADrXzvYMPA==",isActionMenuOpened:"XgCkc1lLTADQAwD3tG9jVA==",showActionMenu:"sHRt1Fx7e+48j2yyo8ktzg==",marginWorkspaceContent:"TN+S+hiol289+iSd7tDjwA==",workspaceContainerWithActionMenu:"xLg8emf8GoZJo-KsUJV1QQ==",workspaceFixedContainer:"W9cgZ7vfCSiTpKs+aaYksQ==",workspaceContainerWithoutActionMenu:"fRrxdLWEtrSuNfqGjVjqVA=="},pQ=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=(0,e_.qv)(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:m}=pG(),{workspaceName:y,isRootWorkspace:v,closeWorkspace:g,showActionMenu:b}=pq(),w=(0,ev.YX)(y),x=s[w],E=x?.openedWorkspaces.find(e=>e.workspaceName===y);if((0,e$.useEffect)(()=>{E?.hasUnsavedChanges!=r&&a(y,r??!1)},[E?.hasUnsavedChanges,r,y,a]),(0,e$.useEffect)(()=>{f[y]!==e&&p(y,e)},[f,y,e,p]),w<0||null==l||null==E)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let D=d[y].window,O=c[D];if(!O)throw Error(`Cannot find registered workspace window ${D}`);let{icon:P,canMaximize:C}=O,j="closable"===S.persistence,A=!!P&&!j,{maximized:k}=x,T=O?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=w<s.length-1||m;return(0,eM.jsxs)("div",{className:eB()(pJ.workspaceOuterContainer,{[pJ.narrowWorkspace]:"narrow"===T,[pJ.widerWorkspace]:"wider"===T,[pJ.extraWideWorkspace]:"extra-wide"===T,[pJ.isActionMenuOpened]:R}),children:[(0,eM.jsx)("div",{className:eB()(pJ.workspaceSpacer,{[pJ.hidden]:N})}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceMiddleContainer,{[pJ.maximized]:k,[pJ.hidden]:N,[pJ.isRootWorkspace]:v,[pJ.showActionMenu]:b}),children:(0,eM.jsxs)("div",{className:eB()(pJ.workspaceInnerContainer,{[pJ.maximized]:k,[pJ.hidden]:N,[pJ.isRootWorkspace]:v}),children:[(0,eM.jsxs)(eW.Header,{"aria-label":(0,h.V)("workspaceHeader"),className:pJ.header,children:[(0,eM.jsx)(eW.HeaderName,{prefix:"",children:e}),(0,eM.jsx)("div",{className:pJ.overlayHeaderSpacer}),(0,eM.jsx)(eW.HeaderGlobalBar,{className:pJ.headerButtons,children:(0,e_.xl)(n)?(0,eM.jsxs)(eM.Fragment,{children:[(C||k)&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":k?(0,h.V)("minimize"):(0,h.V)("maximize"),onClick:()=>o(D,!k),children:k?(0,eM.jsx)(pg.Xj,{}):(0,eM.jsx)(pg.hz,{})}),A&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide"),onClick:()=>i(),children:(0,eM.jsx)(e9,{})}),!j&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close"),onClick:()=>g({closeWindow:!0}),children:(0,eM.jsx)(tm,{})})]}):(0,eM.jsxs)(eM.Fragment,{children:[A&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide"),onClick:()=>i(),children:(0,eM.jsx)(pb.d3,{})}),(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close"),onClick:()=>{j?pU():g({closeWindow:!0})},children:(0,eM.jsx)(tm,{})})]})})]}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceContent),children:t})]})})]})},pX="jc6--ve4CL-z756RWjy-Gg==",p0="whLL8QyjyxlJqTQo67X7BQ==",p1="fbyFm5PlSWWUnG9aPE8kTg==",p4="+aVpzvvOae5n83hGlMESXg==";function p2({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,eM.jsxs)(eM.Fragment,{children:[e({size:16}),t?(0,eM.jsx)("span",{className:"sRkvSBatkOj+HMw7m2i81Q==",children:"!"}):(0,eM.jsx)("span",{className:"XMH0DAK2HUw4W4tYCVa-Fg==",children:r})]})}let p3=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=(0,e_.qv)(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=pG(),{extension:c}=(0,e$.useContext)(e_.zq),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||u),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=async()=>{if(p)h?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;pW(e,t,r)}};return"tablet"===i||"phone"===i?(0,eM.jsxs)(eW.Button,{className:eB()(pX,{[p1]:p&&!m,[p4]:m}),iconDescription:t,kind:"ghost",onClick:v,role:"button",tabIndex:0,size:"md",children:[(0,eM.jsx)("span",{className:p0,children:(0,eM.jsx)(p2,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,eM.jsx)("span",{children:t})]}):(0,eM.jsx)(eW.IconButton,{align:"left","aria-label":t,className:eB()(pX,{[p1]:p&&!m,[p4]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:v,size:"md",children:(0,eM.jsx)("div",{className:p0,children:(0,eM.jsx)(p2,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function p6({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,eM.jsx)(eW.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?th:td,children:e?(0,h.V)("showLess","Show less"):(0,h.V)("showMore","Show more")})}let p5={contactDetails:"R7vfY7Iaw0lD8ocVMwqawA==",deceased:"nTt+luUWofi9sOTbqKrEMQ==",heading:"x7UoTntwbhzXmMIis3mxBw==",row:"qFgIi9mOLR8Ix3ZH8vrDYA==",col:"JXUlg85aLlEdoM3F7PHY9A==",relationship:"T3LO-FI5uzpceBz7W+qY3w=="},p9=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${d.Jj}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=fr()(t,d.lo),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,e$.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)("p",{className:p5.heading,children:[(0,h.V)("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>u8(e?.startDate).getTime()-u8(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,eM.jsx)("li",{children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,eM.jsx)("li",{children:"--"})})(),t.length>3&&(0,eM.jsx)("li",{className:p5.link,children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/home/patient-lists`,children:(0,h.V)("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},p8=({patientId:e})=>{let{patient:t,isLoading:r}=(0,e_.tQ)(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("address","Address")}),(0,eM.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,eM.jsxs)("li",{children:[(0,h.V)(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,eM.jsxs)("li",{children:[(0,h.V)(e,e),": ",t]},`address-${e}`)):(0,eM.jsx)("li",{children:"--"})})]})},p7=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=(0,e_.UK)({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=c5()(`${d.Jj}/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)))`,d.lo);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,e$.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,e$.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?(0,h.V)(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("contactDetails","Contact Details")}),t?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,eM.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,eM.jsx)("li",{children:"--"})})]})},he=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${d.Jj}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=fr()(e?t:null,d.lo),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("relationships","Relationships")}),r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsx)("ul",{children:t&&t.length>0?(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsxs)("li",{className:p5.relationship,children:[(0,eM.jsx)("div",{children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,eM.jsx)("div",{children:e.relationshipType}),(0,eM.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?(0,h.V)("yearAbbreviation","yr"):(0,h.V)("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,eM.jsx)("li",{children:"--"})})]})};function ht({patientId:e,deceased:t}){return(0,eM.jsxs)("div",{className:eB()(p5.contactDetails,{[p5.deceased]:t}),children:[(0,eM.jsxs)("div",{className:p5.row,children:[(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p8,{patientId:e})}),(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p7,{patientUuid:e})})]}),(0,eM.jsxs)("div",{className:p5.row,children:[(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(he,{patientId:e})}),(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p9,{patientUuid:e})})]})]})}function hr(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let hn="_6Gke0iocK8-7xF6UDXtjtQ==";function ho({workspaceGroup:e,groupProps:t}){let r=(0,e_.qv)(),{persistence:n}=e;return(0,eM.jsx)("aside",{className:"T2lMV3y-c2DH29-1sQdY7g==",children:(0,eM.jsxs)("div",{className:hn,children:["closable"==n&&(0,e_.xl)(r)&&(0,eM.jsx)(eW.IconButton,{align:"left",onClick:()=>pU(),label:(0,h.V)("close"),kind:"ghost",children:(0,eM.jsx)(tm,{})}),(0,eM.jsx)(e_.zq.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,eM.jsx)(e_.W3,{className:hn,name:e.name,state:{groupProps:t}})})]})})}function hi(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let ha=(0,ev.U2)(),hs=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=pG(),u=(0,e$.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await pK({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await pK({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await pK({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,workspaceMeta:ev.J_.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=ev.J_.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=ev.J_.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,eM.jsxs)("div",{className:eB()(pJ.workspaceOuterContainer,{[pJ.narrowWorkspace]:"narrow"===u,[pJ.widerWorkspace]:"wider"===u,[pJ.extraWideWorkspace]:"extra-wide"===u,[pJ.isActionMenuOpened]:c}),children:[(0,eM.jsx)("div",{className:pJ.workspaceSpacer}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceMiddleContainer,{[pJ.isRootWorkspace]:n,[pJ.showActionMenu]:i}),children:(0,eM.jsx)("div",{className:eB()(pJ.workspaceInnerContainer,{[pJ.isRootWorkspace]:n}),children:(0,eM.jsx)(eW.InlineLoading,{className:pJ.loader,description:`${(0,h.V)("loading")} ...`})})})]})}return(0,eM.jsx)(pR,{config:e,mountParcel:ha,...u},t.workspaceName)},hl=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,e$.useState)({}),{registeredWorkspacesByName:i}=ev.J_.getState();return(0,e$.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await eS(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,eM.jsx)(eM.Fragment,{children:r.map((o,i)=>(0,eM.jsx)(hs,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function hu(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(hc,{}))}function hc(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=pG();if((0,e$.useEffect)(()=>(0,eu.$y)("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(pU().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=hi(t),i=hi(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(pU().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,eM.jsxs)("div",{className:eB()("_2u2mcnHqn77Jo33H5a1H2g==",{"_7RHYZQ-hEc8EPJUY-c9Hpg==":o.overlay,"gvJRdHcF9cqv2qaFk6opjw==":i}),children:[(0,eM.jsx)("div",{className:"_40ITOKKqqE8nvSQt409qiA==",children:t.map(e=>(0,eM.jsx)(hl,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,eM.jsx)(ho,{workspaceGroup:o,groupProps:e.props})]})}var hd=r(27934);function hf(e,t,r){if(null==e)return r;let n=u_(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=u_(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function hp(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function hh(e){return!!e&&e.constructor===Object}var hm=r(60574);function hy(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function hv(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=hy(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return hy(e)}(t);return hm.satisfies(r,e,{includePrerelease:!0})}async function hg(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await hb(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function hb(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},19076(e,t,r){"use strict";r.d(t,{$3:()=>y,FI:()=>h,LQ:()=>m,Vt:()=>v,Yt:()=>o,bJ:()=>g,bK:()=>b,dX:()=>w,ff:()=>u,gj:()=>i,ls:()=>x,pc:()=>l,sT:()=>a});let n="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function a(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}let s="openmrs:precache-static-dependencies";function l(e={}){window.dispatchEvent(new CustomEvent(s,{detail:e}))}function u(e){let t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}let c="openmrs:notification-shown",d="openmrs:actionable-notification-shown",f="openmrs:toast-shown",p="openmrs:snack-bar-shown";function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function m(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function g(e){let t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function b(e){let t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function w(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function x(e){let t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}},72448(e,t,r){"use strict";r.d(t,{tA:()=>b,JK:()=>g,g4:()=>w,vf:()=>i,MY:()=>a,Wh:()=>v,qh:()=>c,lz:()=>s,D_:()=>u,JG:()=>f,oo:()=>h,zl:()=>p});var n=r(79758);let o=(0,r(61841).Zd)("breadcrumbs",[]);function i(e){return a([e])}function a(e){let t=[...s(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,n.pathToRegexp)(e.matcher).regexp:(0,n.pathToRegexp)(e.path).regexp,settings:e}))];o.setState(t,!0)}function s(){return o.getState()}function l(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=l(e,r.join("/"));if(t)return t}}(e,t)}function u(e,t){if(e.length>0){let r=l(e,t);if(r){let t=[r],n=l(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=l(e,n.settings.parent);return t.reverse()}}return[]}function c(e){return u(s(),e)}var d=r(480);function f(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,"");return p(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t}).replace(/^\/\//,"/")}function p(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function h({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=f(e,t).replace(window.location.origin,"");n.startsWith(r)?(0,d.navigateToUrl)(n):window.location.assign(n)}let m="openmrs:history";function y(e){let t=JSON.parse(sessionStorage.getItem(m)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(m,JSON.stringify(t))}function v(){0===JSON.parse(sessionStorage.getItem(m)??"[]").length&&document.referrer&&y(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=g();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(m,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?b({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&y(window.location.href)})}function g(){return JSON.parse(sessionStorage.getItem(m)??"[]")}function b({toUrl:e}){let t=g(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);h({to:t[r]}),sessionStorage.setItem(m,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function w(){sessionStorage.removeItem(m)}},36604(e,t,r){"use strict";let n,o;r.d(t,{nr:()=>k,xN:()=>r9,u1:()=>nm,KG:()=>nb,FO:()=>r8,FE:()=>nl,LM:()=>rY,sA:()=>nn,Rs:()=>v,ff:()=>nd,wn:()=>np,sK:()=>nw,lY:()=>r7,ms:()=>x,Zr:()=>r1,WK:()=>ng,WA:()=>nu,UH:()=>g,cy:()=>ne,Gp:()=>r5,jU:()=>nr,Og:()=>A,iD:()=>ns,C$:()=>r6,qb:()=>na,Iq:()=>r0,NU:()=>nf,sZ:()=>y,yD:()=>nc,Io:()=>r4,wJ:()=>j,JC:()=>w,e:()=>rH,xc:()=>r2,pb:()=>r3,bO:()=>no,AO:()=>rJ,Td:()=>nh,Gj:()=>b});try{self["workbox:window:6.5.4"]&&_()}catch(e){}function i(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var l=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function u(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function d(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function f(){}var p={type:"SKIP_WAITING"};function h(e,t){if(!t)return e&&e.then?e.then(f):Promise.resolve()}var m=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new l,n.en=new l,n.on=new l,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!u(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new c(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new c("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new c("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return d(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new c("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return h(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),d(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&u(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new c("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?h(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 d(this.getSW(),function(t){return i(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&i(this.fn.waiting,p)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return d(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],a(t.prototype,r),n&&a(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function y(e,t){if(void 0!==o)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),o;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new m(e,t);return o=r.register().then(()=>r.controlling.then(()=>r))}function v(){return o??Promise.resolve(void 0)}let g="x-omrs-offline-response-body",b="x-omrs-offline-response-status",w="x-omrs-offline-caching-strategy";async function x(e){let t=await v();return t?await t.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 E(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function S(){return!window.indexedDB}async function D(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function O(){return await D()||await S()||await E()}let P="openmrs3:offline-mode",C="unavailable";function j(){return{current:C,notAvailable:"unavailable"===C,active:"on"===C}}function A(e){"unavailable"!==C&&"unavailable"!==e&&(localStorage.setItem(P,"on"===e?"active":"disabled"),C=e)}async function k(){await O()||(C="active"===localStorage.getItem(P)?"on":"off"),navigator.onLine}let T="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,R=Object.keys,N=Array.isArray;function I(e,t){return"object"!=typeof t||R(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||T.Promise||(T.Promise=Promise);let M=Object.getPrototypeOf,$={}.hasOwnProperty;function L(e,t){return $.call(e,t)}function F(e,t){"function"==typeof t&&(t=t(M(e))),("u"<typeof Reflect?R:Reflect.ownKeys)(t).forEach(r=>{V(e,r,t[r])})}let B=Object.defineProperty;function V(e,t,r,n){B(e,t,I(r&&L(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function U(e){return{from:function(t){return e.prototype=Object.create(t.prototype),V(e.prototype,"constructor",e),{extend:F.bind(null,e.prototype)}}}}let W=Object.getOwnPropertyDescriptor;function z(e,t){let r;return W(e,t)||(r=M(e))&&z(r,t)}let K=[].slice;function H(e,t,r){return K.call(e,t,r)}function G(e,t){return t(e)}function q(e){if(!e)throw Error("Assertion Failed")}function Z(e){T.setImmediate?setImmediate(e):setTimeout(e,0)}function Y(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function J(e,t){if(L(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=J(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:J(s,t.substr(a+1))}}function Q(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){q("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)Q(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?N(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&L(e,a)||(l=e[a]={}),Q(l,s,r)}}else void 0===r?N(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function X(e){var t={};for(var r in e)L(e,r)&&(t[r]=e[r]);return t}let ee=[].concat;function et(e){return ee.apply([],e)}let er="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(et([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>T[e]),en=er.map(e=>T[e]);Y(er,e=>[e,!0]);let eo=null;function ei(e){eo="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=eo&&eo.get(t);if(r)return r;if(N(t)){r=[],eo&&eo.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(en.indexOf(t.constructor)>=0)r=t;else{let n=M(t);for(var i in r=n===Object.prototype?{}:Object.create(n),eo&&eo.set(t,r),t)L(t,i)&&(r[i]=e(t[i]))}return r}(e);return eo=null,t}let{toString:ea}={};function es(e){return ea.call(e).slice(8,-1)}let el="u">typeof Symbol?Symbol.iterator:"@@iterator",eu="symbol"==typeof el?function(e){var t;return null!=e&&(t=e[el])&&t.apply(e)}:function(){return null},ec={};function ed(e){var t,r,n,o;if(1==arguments.length){if(N(e))return e.slice();if(this===ec&&"string"==typeof e)return[e];if(o=eu(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let ef="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var ep="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),eh=()=>!0;let em=!Error("").stack;function ey(){if(em)try{throw ey.arguments,Error()}catch(e){return e}return Error()}function ev(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(eh).map(e=>"\n"+e).join("")):""}var eg=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],eb=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(eg),ew={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 e_(e,t){this._e=ey(),this.name=e,this.message=t}function ex(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function eE(e,t,r,n){this._e=ey(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=ex(e,t)}function eS(e,t){this._e=ey(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=ex(e,t)}U(e_).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ev(this._e,2))}},toString:function(){return this.name+": "+this.message}}),U(eE).from(e_),U(eS).from(e_);var eD=eb.reduce((e,t)=>(e[t]=t+"Error",e),{}),eO=eb.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=ey(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ew[t]||r,this.inner=null)}return U(n).from(e_),e[t]=n,e},{});eO.Syntax=SyntaxError,eO.Type=TypeError,eO.Range=RangeError;var eP=eg.reduce((e,t)=>(e[t+"Error"]=eO[t],e),{}),eC=eb.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=eO[t]),e),{});function ej(){}function eA(e){return e}function ek(e,t){return null==e||e===eA?t:function(r){return t(e(r))}}function eT(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function eR(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?eT(n,this.onsuccess):n),o&&(this.onerror=this.onerror?eT(o,this.onerror):o),void 0!==i?i:r}}function eN(e,t){return e===ej?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?eT(r,this.onsuccess):r),n&&(this.onerror=this.onerror?eT(n,this.onerror):n)}}function eI(e,t){return e===ej?t:function(r){var n=e.apply(this,arguments);I(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?eT(o,this.onsuccess):o),i&&(this.onerror=this.onerror?eT(i,this.onerror):i),void 0===n?void 0===a?void 0:a:I(n,a)}}function eM(e,t){return e===ej?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function e$(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}eC.ModifyError=eE,eC.DexieError=e_,eC.BulkError=eS;var eL={};let[eF,eB,eV]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,M(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,M(t),e]})(),eU=eB&&eB.then,eW=eF&&eF.constructor,ez=!!eV;var eK=!1,eH=eV?()=>{eV.then(tn)}:T.setImmediate?setImmediate.bind(null,tn):T.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{tn(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tn,0)},eG=function(e,t){e4.push([e,t]),eZ&&(eH(),eZ=!1)},eq=!0,eZ=!0,eY=[],eJ=[],eQ=null,eX=eA,e0={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:tO,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{tO(e[0],e[1])}catch(e){}})}},e1=e0,e4=[],e2=0,e3=[];function e6(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ej,this._lib=!1;var t=this._PSD=e1;if(ep&&(this._stackHolder=ey(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==eL)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&e8(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&to();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof e6?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,e7(t)),n&&ti()}},e8.bind(null,t))}catch(e){e8(t,e)}}(this,e)}let e5={get:function(){var e=e1,t=tp;function r(r,n){var o=!e.global&&(e!==e1||t!==tp);let i=o&&!tv();var a=new e6((t,a)=>{te(this,new e9(tS(r,e,o,i),tS(n,e,o,i),t,a,e))});return ep&&tr(a,this),a}return r.prototype=eL,r},set:function(e){V(this,"then",e&&e.prototype===eL?e5:{get:function(){return e},set:e5.set})}};function e9(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function e8(e,t){if(eJ.push(t),null===e._state){var r=e._lib&&to();t=eX(t),e._state=!1,e._value=t,ep&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=z(t,"stack");t._promise=e,V(t,"stack",{get:()=>eK?r&&(r.get?r.get.apply(t):r.value):e.stack})}),eY.some(t=>t._value===e._value)||eY.push(e),e7(e),r&&ti()}}function e7(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)te(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===e2&&(++e2,eG(()=>{0==--e2&&ta()},[]))}function te(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++e2,eG(tt,[r,e,t])}else e._listeners.push(t)}function tt(e,t,r){try{eQ=t;var n,o=t._value;t._state?n=e(o):(eJ.length&&(eJ=[]),n=e(o),-1===eJ.indexOf(o)&&function(e){for(var t=eY.length;t;)if(eY[--t]._value===e._value)return void eY.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{eQ=null,0==--e2&&ta(),--r.psd.ref||r.psd.finalize()}}function tr(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function tn(){to()&&ti()}function to(){var e=eq;return eq=!1,eZ=!1,e}function ti(){var e,t,r;do for(;e4.length>0;)for(e=e4,e4=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(e4.length>0);eq=!0,eZ=!0}function ta(){var e=eY;eY=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=e3.slice(0),r=t.length;r;)t[--r]()}function ts(e){return new e6(eL,!1,e)}function tl(e,t){var r=e1;return function(){var n=to(),o=e1;try{return t_(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{t_(o,!1),n&&ti()}}}F(e6.prototype,{then:e5,_then:function(e,t){te(this,new e9(null,null,e,t,e1))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):ts(e)):this.then(null,e=>e&&e.name===t?r(e):ts(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),ts(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eK=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=ev(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return ep&&((o=ev(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eK=!1}}},timeout:function(e,t){return e<1/0?new e6((r,n)=>{var o=setTimeout(()=>n(new eO.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&V(e6.prototype,Symbol.toStringTag,"Dexie.Promise"),e0.env=tx(),F(e6,{all:function(){var e=ed.apply(null,arguments).map(tg);return new e6(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>e6.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof e6)return e;if(e&&"function"==typeof e.then)return new e6((t,r)=>{e.then(t,r)});var t=new e6(eL,!0,e);return tr(t,eQ),t},reject:ts,race:function(){var e=ed.apply(null,arguments).map(tg);return new e6((t,r)=>{e.map(e=>e6.resolve(e).then(t,r))})},PSD:{get:()=>e1,set:e=>e1=e},totalEchoes:{get:()=>tp},newPSD:tm,usePSD:tE,scheduler:{get:()=>eG,set:e=>{eG=e}},rejectionMapper:{get:()=>eX,set:e=>{eX=e}},follow:(e,t)=>new e6((r,n)=>tm((t,r)=>{var n=e1;n.unhandleds=[],n.onunhandled=r,n.finalize=eT(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},e3.push(function t(){e(),e3.splice(e3.indexOf(t),1)}),++e2,eG(()=>{0==--e2&&ta()},[])},n.finalize),e()},t,r,n))}),eW&&(eW.allSettled&&V(e6,"allSettled",function(){let e=ed.apply(null,arguments).map(tg);return new e6(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>e6.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),eW.any&&"u">typeof AggregateError&&V(e6,"any",function(){let e=ed.apply(null,arguments).map(tg);return new e6((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>e6.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let tu={awaits:0,echoes:0,id:0};var tc=0,td=[],tf=0,tp=0,th=0;function tm(e,t,r,n){var o=e1,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++th;var a=e0.env;i.env=ez?{Promise:e6,PromiseProp:{value:e6,configurable:!0,writable:!0},all:e6.all,race:e6.race,allSettled:e6.allSettled,any:e6.any,resolve:e6.resolve,reject:e6.reject,nthen:tD(a.nthen,i),gthen:tD(a.gthen,i)}:{},t&&I(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=tE(i,e,r,n);return 0===i.ref&&i.finalize(),s}function ty(){return tu.id||(tu.id=++tc),++tu.awaits,tu.echoes+=100,tu.id}function tv(){return!!tu.awaits&&(0==--tu.awaits&&(tu.id=0),tu.echoes=100*tu.awaits,!0)}function tg(e){return tu.echoes&&e&&e.constructor===eW?(ty(),e.then(e=>(tv(),e),e=>(tv(),tP(e)))):e}function tb(e){++tp,tu.echoes&&0!=--tu.echoes||(tu.echoes=tu.id=0),td.push(e1),t_(e,!0)}function tw(){var e=td[td.length-1];td.pop(),t_(e,!1)}function t_(e,t){var r,n=e1;if((t?!tu.echoes||tf++&&e===e1:!tf||--tf&&e===e1)||(r=t?tb.bind(null,e):tw,eU.call(eF,r)),e!==e1&&(e1=e,n===e0&&(e0.env=tx()),ez)){var o=e0.env.Promise,i=e.env;eB.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(T,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function tx(){var e=T.Promise;return ez?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(T,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:eB.then,gthen:e.prototype.then}:{}}function tE(e,t,r,n,o){var i=e1;try{return t_(e,!0),t(r,n,o)}finally{t_(i,!1)}}function tS(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=e1;r&&ty(),t_(t,!0);try{return e.apply(this,arguments)}finally{t_(i,!1),n&&(o=tv,eU.call(eF,o))}}}function tD(e,t){return function(r,n){return e.call(this,tS(r,t),tS(n,t))}}function tO(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(T.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),I(n,o)):T.CustomEvent&&I(n=new CustomEvent("unhandledrejection",{detail:o}),o),n&&T.dispatchEvent&&(dispatchEvent(n),!T.PromiseRejectionEvent&&T.onunhandledrejection))try{T.onunhandledrejection(n)}catch(e){}ep&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+eU).indexOf("[native code]")&&(ty=tv=ej);var tP=e6.reject;let tC=String.fromCharCode(65535),tj="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tA=[],tk="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tT=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function tR(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tN={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tI(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ei(t))[e],t)}class tM{_trans(e,t,r){let n=this._tx||e1.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new eO.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=to();try{return n&&n.db===this.db?n===e1.trans?n._promise(e,i,r):tm(()=>n._promise(e,i,r),{trans:n,transless:e1.transless||e1}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||e1.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===eD.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):tP(i)}return i._promise(r,(e,t)=>tm(()=>(e1.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return tP(new eO.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tP(new eO.DatabaseClosed);t.open().catch(ej)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&ti()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(N(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=R(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==tC)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&ep&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?tR(r,a&&a.multi?e=>{let t=J(e,o);return N(t)&&t.some(e=>i(s,e))}:e=>i(s,J(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).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,N(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(L(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){I(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=tI(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{Q(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||N(e))return this.where(":id").equals(e).modify(t);{let r=J(e,this.schema.primKey.keyPath);if(void 0===r)return tP(new eO.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?R(t).forEach(r=>{Q(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=tI(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{Q(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tN})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new eO.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new eO.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(tI(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new eS(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new eO.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new eO.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(tI(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new eS(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new eS(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function t$(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"==typeof e){var a;return void R(a=e).forEach(function(e){var t=a[e];if(N(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new eO.InvalidArgument("Invalid event config");var r=i(e,eA,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){Z(function(){e.apply(null,t)})})})}})}n||(n=eM),o||(o=ej);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(n,o)}};return t[e]=r[e]=s,s}}function tL(e,t){return U(t).from({prototype:e}),t}function tF(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tB(e,t){e.filter=tR(e.filter,t)}function tV(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>tR(n(),t()):t,e.justLimit=r&&!n}function tU(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new eO.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function tW(e,t,r){let n=tU(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function tz(e,t,r,n){let o=e.replayFilter?tR(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),L(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),tK(tW(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return tK(tW(e,n,r),tR(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function tK(e,t,r,n){var o=tl(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=ej},t=>{e.fail(t),r=ej})||o(e.value,e,e=>r=e),r()})})}function tH(e,t){try{let r=tG(e),n=tG(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(tq(e),tq(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=tH(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function tG(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=es(e);return"ArrayBuffer"===r?"binary":r}function tq(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class tZ{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,tP.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,tP.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=tR(t.algorithm,e)}_iterate(e,t){return tz(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&I(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>tz(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(tF(t,!0))return r.count({trans:e,query:{index:tU(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return tz(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&tF(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=tU(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return tz(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,tF(t)?tV(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):tV(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),tV(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return tB(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),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 t;return tB(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=tR(t.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 t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&tF(t,!0)&&t.limit>0)return this._read(e=>{var r=tU(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).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,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return tB(this._ctx,function(e){var t=e.primaryKey.toString(),n=L(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=R(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];J(t,a)!==s&&(Q(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,R(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,v=[];for(let e=0;e<d;++e){let t=f[e],r={value:ei(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?v.push(o[c+e]):s||0===tH(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(v.push(o[c+e]),h.push(r.value)))}let g=tF(t)&&t.limit===1/0&&("function"!=typeof e||e===tY)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)v.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||g&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:g,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(v.length>0||g&&e===tY)&&a.mutate({trans:r,type:"delete",keys:v,criteria:g}).then(e=>p(v.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new eE("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return tF(e)&&(e.isPrimKey&&!tk||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new eE("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(tY)}}let tY=(e,t)=>t.value=null;function tJ(e,t){return e<t?-1:+(e!==t)}function tQ(e,t){return e>t?-1:+(e!==t)}function tX(e,t,r){var n=e instanceof t3?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function t0(e){return new e.Collection(e,()=>t2("")).limit(0)}function t1(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return tX(e,"String expected.");function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?tJ:tQ;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>t4(s[0],l[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,l,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],l[m],a,u);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function t4(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function t2(e){return{type:1,lower:e,upper:e}}class t3{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?t0(this):new this.Collection(this,()=>t4(e,t,!r,!n))}catch(e){return tX(this,tj)}}equals(e){return null==e?tX(this,tj):new this.Collection(this,()=>t2(e))}above(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(e,void 0,!0))}aboveOrEqual(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(e,void 0,!1))}below(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(void 0,e,!1,!0))}belowOrEqual(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(void 0,e))}startsWith(e){return"string"!=typeof e?tX(this,"String expected."):this.between(e,e+tC,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):t1(this,(e,t)=>0===e.indexOf(t[0]),[e],tC)}equalsIgnoreCase(e){return t1(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ed.apply(ec,arguments);return 0===e.length?t0(this):t1(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ed.apply(ec,arguments);return 0===e.length?t0(this):t1(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tC)}anyOf(){let e=ed.apply(ec,arguments),t=this._cmp;try{e.sort(t)}catch(e){return tX(this,tj)}if(0===e.length)return t0(this);let r=new this.Collection(this,()=>t4(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ed.apply(ec,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return tX(this,tj)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return t0(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return tX(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",eO.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return tX(this,tj)}let f=0,p=l?e=>n(e,u[f][1])>0:e=>n(e,u[f][1])>=0,h=s?e=>o(e,u[f][0])>0:e=>o(e,u[f][0])>=0,m=p,y=new this.Collection(this,()=>t4(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===u.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,u[f][1])||0===this._cmp(o,u[f][0])||t(()=>{c===n?e.continue(u[f][0]):e.continue(u[f][1])}),!1)}),y}startsWithAnyOf(){let e=ed.apply(ec,arguments);return e.every(e=>"string"==typeof e)?0===e.length?t0(this):this.inAnyRange(e.map(e=>[e,e+tC])):tX(this,"startsWithAnyOf() only works with strings")}}function t6(e){return tl(function(t){return t5(t),e(t.target.error),!1})}function t5(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let t9=t$(null,"storagemutated");class t8{_lock(){return q(!e1.global),++this._reculock,1!==this._reculock||e1.global||(e1.lockOwnerFor=this),this}_unlock(){if(q(!e1.global),0==--this._reculock)for(e1.global||(e1.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{tE(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&e1.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(q(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new eO.DatabaseClosed(r);case"MissingAPIError":throw new eO.MissingAPI(r.message,r);default:throw new eO.OpenFailed(r)}if(!this.active)throw new eO.TransactionInactive;return q(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=tl(t=>{t5(t),this._reject(e.error)}),e.onabort=tl(t=>{t5(t),this.active&&this._reject(new eO.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=tl(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&t9.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return tP(new eO.ReadOnly("Transaction is readonly"));if(!this.active)return tP(new eO.TransactionInactive);if(this._locked())return new e6((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},e1])});if(r)return tm(()=>{var e=new e6((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new e6((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=e6.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new e6((e,n)=>{r.then(r=>t._waitingQueue.push(tl(e.bind(null,r))),e=>t._waitingQueue.push(tl(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new eO.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(L(t,e))return t[e];let r=this.schema[e];if(!r)throw new eO.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function t7(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+re(t)}}function re(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function rt(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:Y(r,e=>[e.name,e])}}let rr=e=>{try{return e.only([[]]),rr=()=>[[]],[[]]}catch(e){return rr=()=>tC,tC}};function rn(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>J(t,e):t=>J(t,e)}function ro(e){return[].slice.call(e)}let ri=0;function ra(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function rs({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=ro(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=N(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:rn(t)},indexes:ro(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:N(o),keyPath:o,unique:r,multiEntry:n,extractKey:rn(o)};return i[ra(o)]=a,a}),getIndexByKeyPath:e=>i[ra(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[ra(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=tl(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,v=e=>{++y,t5(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=v;else for(let t=0;t<p;++t)h.push(u=c[r](e[t])),u.onerror=v}let g=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{v(e),g(e)},u.onsuccess=g})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=tl(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},f=t6(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=f,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=tl(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=t6(o)}),query:e=>new Promise((r,n)=>{r=tl(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:f}=u,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=t6(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=t6(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=tl(s);let{index:u,range:c}=n,d=e.objectStore(t),f=u.isPrimaryKey?d:d.index(u.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=t6(l),h.onsuccess=tl(t=>{let r=h.result;if(!r)return void s(null);r.___id=++ri,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=tl(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=tl(e),h.onerror=t6(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=tl(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=tl(t=>e(t.target.result)),c.onerror=t6(a)})}}}),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:rr(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function rl({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=z(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?V(t,r,{get(){return this.table(r)},set(e){B(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function ru({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function rc(e,t){return e._cfg.version-t._cfg.version}function rd(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||tk)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function rf(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>rp(o,e)),o}function rp(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function rh(e,t,r){let n={};return H(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=t7(re(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=t7(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=rt(e,i,a)}),n}function rm({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+H(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&T.WorkerGlobalScope&&T instanceof T.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ry{_parseStoresSpec(e,t){R(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return t7(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),N(n),0===t)}),o=n.shift();if(o.multi)throw new eO.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new eO.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new eO.Schema("Index must have a name and cannot be an empty string")}),t[r]=rt(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?I(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{I(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,ru(t,[t._allTables,t,t.Transaction.prototype]),rl(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],R(o),o),t._storeNames=R(o),this}upgrade(e){return this._cfg.contentUpgrade=e$(this._cfg.contentUpgrade||ej,e),this}}function rv(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new rM("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function rg(e){return e&&"function"==typeof e.databases}function rb(e){return tm(function(){return e1.letThrough=!0,e()})}function rw(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):N(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function r_(e,t,r){var n=arguments.length;if(n<2)throw new eO.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,et(o),r]}function rx(e,t,r){let n=N(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let rE={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=ra(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:rn(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:rx(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:rx(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[ra(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(rx(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(rx(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function rS(e,t,r,n){return r=r||{},n=n||"",R(e).forEach(o=>{if(L(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=es(i);e!==es(a)?r[n+o]=t[o]:"Object"===e?rS(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),R(t).forEach(o=>{L(e,o)||(r[n+o]=t[o])}),r}let rD={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=e1.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===ej&&s.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===ej)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=e1.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||Q(e.values[o],n.keyPath,r))}else{let t=rS(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{L(t,e)?t[e]=n[e]:Q(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function rO(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===tH(t.keys[o],e[i])&&(n.push(r?ei(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let rP={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=rO(e.keys,e.trans._cache,"clone"===e.cache);return t?e6.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ei(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function rC(e){return!("from"in e)}let rj=function(e,t){if(!this){let t=new rj;return e&&"d"in e&&I(t,e),t}I(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function rA(e,t,r){let n=tH(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(rC(e))return I(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>tH(r,e.from))return o?rA(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rR(e);if(tH(t,e.to)>0)return i?rA(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rR(e);0>tH(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),tH(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&rk(e,o),i&&a&&rk(e,i)}function rk(e,t){rC(t)||function e(t,{from:r,to:n,l:o,r:i}){rA(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function rT(e){let t=rC(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>tH(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=tH(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rR(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=rN(r)}e.d=rN(e)}function rN({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}F(rj.prototype,{add(e){return rk(this,e),this},addKey(e){return rA(this,e,e),this},addKeys(e){return e.forEach(e=>rA(this,e,e)),this},[el](){return rT(this)}});let rI={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new rj(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new rj)},u=l(""),c=l(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(N(f)){"delete"!==d&&(f=e.results),u.addKeys(f);let t=rO(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&N(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==tH(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new rj(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new rj(e.key)],getMany:e=>[a,(new rj).addKeys(e.keys)],count:c,query:c,openCursor:c};return R(d).forEach(e=>{u[e]=function(i){let{subscr:a}=e1;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new rj)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class rM{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=rM.dependencies;this._options=t={addons:rM.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ej,dbReadyPromise:null,cancelOpen:ej,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new e6(e=>{i.dbReadyResolve=e}),i.openCanceller=new e6((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=t$(this,"populate","blocked","versionchange","close",{ready:[e$,ej]}),this.on.ready.subscribe=G(this.on.ready.subscribe,e=>(t,r)=>{rM.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||e6.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,tL(tZ.prototype,function(e,t){this.db=r;let n=tN,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==eA?s:null}})),this.Table=function(e){return tL(tM.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:t$(null,{creating:[eR,ej],reading:[ek,eA],updating:[eI,ej],deleting:[eN,ej]})})}(this),this.Transaction=function(e){return tL(t8.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=t$(this,"complete","error","abort"),this.parent=i||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 e6((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),tP(e)})})}(this),this.Version=function(e){return tL(ry.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return tL(t3.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new eO.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,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=rr(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),tA.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(rE),this.use(rD),this.use(rI),this.use(rP),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new eO.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new eO.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(rc),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||e1.letThrough||this._vip)?e():new e6((e,t)=>{if(this._state.openComplete)return t(new eO.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new eO.DatabaseClosed);this.open().catch(ej)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?tP(r.dbOpenError):e);ep&&(r.openCanceller._stackHolder=ey()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new eO.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1;return e6.race([o,("u"<typeof navigator?e6.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new e6((t,o)=>{if(i(),!n)throw new eO.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new eO.MissingAPI;u.onerror=t6(o),u.onblocked=tl(e._fireOnBlocked),u.onupgradeneeded=tl(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=t5,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=tl(()=>{o(new eO.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=t6(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=e1.transless||e1,tm(()=>{e1.trans=n,e1.transless=f,0===i?(R(r).forEach(e=>{rf(c,e,r[e].primKey,r[e].indexes)}),rs(e,c),e6.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=rh(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;rm(e,o,n),rm(e,l,n),a=e._dbSchema=l;let u=rd(o,l);u.add.forEach(e=>{rf(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new eO.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>rp(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),rp(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;rs(e,n),r._memoizedTables={},s=!0;let i=X(l);u.del.forEach(e=>{i[e]=o[e]}),ru(e,[e.Transaction.prototype]),rl(e,[e.Transaction.prototype],R(i),i),r.schema=i;let a=ef(c);a&&ty();let d=e6.follow(()=>{if((t=c(r))&&a){var e=tv.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?e6.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&tk||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),ru(e,[e.Transaction.prototype]),rl(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?e6.resolve(o.shift()(r.idbtrans)).then(e):e6.resolve()})().then(()=>{var e;R(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||rf(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=tl(()=>{s=null;let n=e._novip.idbdb=u.result,o=H(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=rh(0,t,r);e._storeNames=H(t.objectStoreNames,0),rl(e,[e._allTables],R(n),n)}(e,n,i):(rm(e,e._dbSchema,i),((t=rd(rh(0,e.idbdb,i),e._dbSchema)).add.length||t.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.")),rs(e,i)}catch(e){}tA.push(e),n.onversionchange=tl(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=tl(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){rg(e)||"__dbnames"===r||rv(e,t).put({name:r}).catch(ej)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],e6.resolve(rb(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(e$,ej);return r.onReadyBeingFired=[],e6.resolve(rb(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),tP(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=tA.indexOf(this);if(t>=0&&tA.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new e6(t=>{e.dbReadyResolve=t}),e.openCanceller=new e6((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new eO.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new e6((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tl(()=>{!function({indexedDB:e,IDBKeyRange:t},r){rg(e)||"__dbnames"===r||rv(e,t).delete(r).catch(ej)}(this._deps,this.name),r()}),e.onerror=t6(n),e.onblocked=this._fireOnBlocked};if(e)throw new eO.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.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 R(this._allTables).map(e=>this._allTables[e])}transaction(){let e=r_.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=e1.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)n="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new eO.InvalidArgument("Invalid transaction mode: "+e);n="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===n){if(!a)throw new eO.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new eO.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):tP(e)}let s=(function e(t,r,n,o,i){return e6.resolve().then(()=>{let a,s=e1.transless||e1,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===eD.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):tP(o)}let u=ef(i);u&&ty();let c=e6.follow(()=>{if(a=i.call(l,l))if(u){var e=tv.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=rw(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?e6.resolve(a).then(e=>l.active?e:tP(new eO.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),tP(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):e1.trans?tE(e1.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!L(this._allTables,e))throw new eO.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let r$="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class rL{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[r$](){return this}}function rF(e,t){return R(t).forEach(r=>{rk(e[r]||(e[r]=new rj),t[r])}),e}try{n={indexedDB:T.indexedDB||T.mozIndexedDB||T.webkitIndexedDB||T.msIndexedDB,IDBKeyRange:T.IDBKeyRange||T.webkitIDBKeyRange}}catch(e){n={indexedDB:null,IDBKeyRange:null}}function rB(e){let t=rV;try{rV=!0,t9.storagemutated.fire(e)}finally{rV=t}}F(rM,{...eC,delete:e=>new rM(e,{addons:[]}).delete(),exists:e=>new rM(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return rg(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):rv(e,t).toCollection().primaryKeys()})(rM.dependencies).then(e)}catch(e){return tP(new eO.MissingAPI)}},defineClass:()=>function(e){I(this,e)},ignoreTransaction:e=>e1.trans?tE(e1.transless,e):e(),vip:rb,async:function(e){return function(){try{var t=rw(e.apply(this,arguments));return t&&"function"==typeof t.then?t:e6.resolve(t)}catch(e){return tP(e)}}},spawn:function(e,t,r){try{var n=rw(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:e6.resolve(n)}catch(e){return tP(e)}},currentTransaction:{get:()=>e1.trans||null},waitFor:function(e,t){let r=e6.resolve("function"==typeof e?rM.ignoreTransaction(e):e).timeout(t||6e4);return e1.trans?e1.trans.waitFor(r):r},Promise:e6,debug:{get:()=>ep,set:e=>{ep=e,eh="dexie"===e?()=>!0:tT}},derive:U,extend:I,props:F,override:G,Events:t$,on:t9,liveQuery:function(e){return new rL(t=>{let r=ef(e),n=!1,o={},i={},a={get closed(){return n},unsubscribe:()=>{n=!0,t9.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,l=!1;function u(){return R(i).some(e=>o[e]&&function(e,t){let r=rT(t),n=r.next();if(n.done)return!1;let o=n.value,i=rT(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=tH(s.from,o.to)&&tH(s.to,o.from)>=0)return!0;0>tH(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{rF(o,e),u()&&d()},d=()=>{let f,p;if(s||n)return;o={};let h={},m=(r&&ty(),f=()=>tm(e,{subscr:h,trans:null}),p=e1.trans?tE(e1.transless,f):f(),r&&p.then(tv,tv),p);l||(t9("storagemutated",c),l=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,n||(u()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:rF,getByKeyPath:J,setByKeyPath:Q,delByKeyPath:function(e,t){"string"==typeof t?Q(e,t,void 0):"length"in t&&[].map.call(t,function(t){Q(e,t,void 0)})},shallowClone:X,deepClone:ei,getObjectDiff:rS,cmp:tH,asap:Z,minKey:-1/0,addons:[],connections:tA,errnames:eD,dependencies:n,semVer:"3.2.3",version:"3.2.3".split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),rM.maxKey=rr(rM.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(t9("storagemutated",e=>{if(!rV){let t;tk?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),rV=!0,dispatchEvent(t),rV=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{rV||rB(e)}));let rV=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),t9("storagemutated",t=>{rV||e.postMessage(t)}),e.onmessage=e=>{e.data&&rB(e.data)}}else if("u">typeof self&&"u">typeof navigator){t9("storagemutated",e=>{try{rV||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&rB(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&rB(e.changedParts)})}e6.rejectionMapper=function(e,t){if(!e||e instanceof e_||e instanceof TypeError||e instanceof SyntaxError||!e.name||!eP[e.name])return e;var r=new eP[e.name](t||e.message,e);return"stack"in e&&V(r,"stack",{get:function(){return this.inner.stack}}),r},eh=tT;var rU=r(464),rW=r(61841);function rz(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class rK extends rM{constructor(){super("EsmOffline"),rz(this,"syncQueue",void 0),rz(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 rH(){return new rK}let rG=new rK,rq={},rZ=(0,rW.Zd)("offline-synchronization",{});function rY(){return rZ}async function rJ(){if(rZ.getState().synchronization)return;let e=await rG.syncQueue.count(),t={},r=Object.entries(rq),n=r.length,o={},i=new AbortController,a=()=>{let e=rZ.getState().synchronization;rZ.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{rZ.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[n]={},await Promise.all(l),t[n]=rQ(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{rZ.setState({synchronization:void 0})}}async function rQ({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],l=await rX();await rG.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:f,dependencies:p=[]}]=a[u];try{let i=await r(d,{abort:o,index:u,items:s,userId:l,dependencies:p.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==f&&(n[e][f]=i),await rG.syncQueue.delete(c)}catch(e){await rG.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function rX(){let e=await (0,rU.xC)();return e?.uuid||"*"}async function r0(e,t,r,n){let o=n&&n.id;return void 0!==o&&await rG.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(rM.errnames.DatabaseClosed),await rG.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(rM.errnames.DatabaseClosed,()=>-1)}async function r1(e,t,r){let n=await rX();return await r0(n,e,t,r)}async function r4(e,t){return(await r2(e,t)).map(e=>e.content)}async function r2(e,t){return await rG.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(rM.errnames.DatabaseClosed,()=>[])}async function r3(e){let t=await rX();return await r4(t,e)}async function r6(e){let t=await rX();return await r2(t,e)}async function r5(e){return await rG.syncQueue.get(e).catch(rM.errnames.DatabaseClosed,()=>void 0)}function r9(e){return!!rq[e]?.options.onBeginEditSyncItem}async function r8(e){let t=await r5(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=rq[t.type]?.options.onBeginEditSyncItem;if(!r)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 "${t.type}" supports editing items.`);r(t)}async function r7(e){await rG.syncQueue.delete(e).catch(rM.errnames.DatabaseClosed)}function ne(e,t,r,n={}){rq[e]={type:e,dependsOn:t,process:r,options:n}}var nt=r(49598);let nr="OFFLINE+";function nn(){return nr+(0,nt.A)()}function no(e){return e.startsWith(nr)}let ni={};function na(){return Object.values(ni)}function ns(e){ni[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.`),ni[e.id]=e}async function nl(e){let t=await ny();return await nu(t,e)}async function nu(e,t){let r=new rK;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(rM.errnames.DatabaseClosed,()=>[])}async function nc(e,t){let r=await ny();return await nd(r,e,t)}async function nd(e,t,r){let n=new rK,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(rM.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(rM.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(rM.errnames.DatabaseClosed)}async function nf(e,t){let r=await ny();return await np(r,e,t)}async function np(e,t,r){let n=new rK,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(rM.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(rM.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(rM.errnames.DatabaseClosed))}async function nh(e,t){let r=await nl(e);await Promise.all(r.map(async e=>nm(e.type,e.identifier,t)))}async function nm(e,t,r){await nc(e,t);let n=new rK,o=await ny(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(rM.errnames.DatabaseClosed,()=>void 0),a=na().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(rM.errnames.DatabaseClosed)}async function ny(){let e=(await (0,rU.xC)()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let nv=(0,rW.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ng(){return n_(),nv}function nb(e,t){n_(),ns({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function nw(e){n_(),await nm("patient",e)}function n_(){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.")}},86647(e,t,r){"use strict";let n;r.d(t,{fq:()=>tt,JK:()=>L,if:()=>ez,tQ:()=>eX,YY:()=>c,E4:()=>ew,zD:()=>ef,g9:()=>B,uL:()=>x,kH:()=>eH,WK:()=>eJ,br:()=>D,Gz:()=>eS,M3:()=>eZ,qw:()=>e2,e6:()=>p,Wq:()=>eE,rr:()=>g,oU:()=>e1,wV:()=>e4,d7:()=>ey,Jm:()=>eq,xH:()=>te,W3:()=>P,zq:()=>a,Ie:()=>X,CH:()=>eP,ns:()=>F,vL:()=>eB,xl:()=>eW,Us:()=>ee,UK:()=>ed,fS:()=>Q,yJ:()=>ea,u:()=>eO,to:()=>ek,iy:()=>eI,_9:()=>ei,Bf:()=>e$,Tt:()=>er,CX:()=>S,Ed:()=>eC,p6:()=>J,Wr:()=>eG,TA:()=>eK,F7:()=>$,qv:()=>eU,zA:()=>en,sc:()=>V,yu:()=>e_,WQ:()=>eY,i_:()=>l,$B:()=>ex,oq:()=>eF,wJ:()=>e0,Pj:()=>y,mQ:()=>v,wr:()=>tr,mw:()=>eT,jn:()=>Y,Fx:()=>em});var o=r(46925),i=r.n(o);let a=(0,o.createContext)({moduleName:"",featureName:""});var s=r(72448);function l({to:e,templateParams:t,onBeforeNavigate:r,children:n,...a}){return(0,o.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),i().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),(0,s.oo)({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:(0,s.JG)(e,t),...a},n)}var u=r(98635);let c=({state:e,children:t,...r})=>{let{extension:n}=(0,o.useContext)(a),s=(0,o.useRef)(null),l=(0,o.useRef)(Promise.resolve()),c=(0,o.useRef)(!1),d=(0,o.useRef)(!1),f=(0,o.useRef)(e),p=(0,o.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":l.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),h=(0,o.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(l.current=Promise.all([e.mountPromise,l.current]).then(()=>{if(s.current?.getStatus()==="MOUNTED"&&s.current.update)return s.current.update({...t})}).catch(e=>{let t=s.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),m=(0,o.useCallback)(t=>{t&&!s.current&&!d.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(d.current=!0,(0,u.wG)(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(d.current=!1,s.current=t,c.current)?p(t):t&&f.current!==e&&h(t,f.current)},()=>{d.current=!1}))},[]);return(0,o.useEffect)(()=>(c.current=!1,()=>{c.current=!0,p(s.current)}),[]),(0,o.useEffect)(()=>{f.current=e,s.current&&h(s.current,e)},[e]),n?i().createElement("div",{ref:m,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};var d=r(464),f=r(92424);function p(e){let t=(0,o.useRef)(e);return(0,f.b)(t.current,e)||(t.current=e),t.current}function h(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let m=e=>e;function y(e,t=m,r){let n=(0,o.useCallback)(t=>e.subscribe(t),[e]),i=(0,o.useCallback)(()=>t(e.getState()),[e,t]),a=(0,o.useSyncExternalStore)(n,i,i),s=(0,o.useMemo)(()=>r?h(e,r):null,[e,r]);return(0,o.useMemo)(()=>s?{...a,...s}:a,[a,s])}function v(e,t){return y(e,m,t)}function g(e){return function(t){let r=(0,o.useCallback)(t=>e.subscribe(t),[]),n=(0,o.useCallback)(()=>e.getState(),[]),i=(0,o.useSyncExternalStore)(r,n,n),a=(0,o.useMemo)(()=>t?h(e,t):null,[t]);return(0,o.useMemo)(()=>a?{...i,...a}:i,[i,a])}}let b=[];Object.freeze(b);let w={candidateExtensions:b};Object.freeze(w);let x=e=>{let t=(0,o.useCallback)(t=>t.slots?.[e]??w,[e]);return y((0,u.zF)(),t)},E=e=>e.session;function S(e,t){let{candidateExtensions:r}=x(e),n=y(d.eA,E),i=p(t);return(0,o.useMemo)(()=>(0,u.zx)(e,i),[e,i,n,r])}function D(e,t){let{moduleName:r}=(0,o.useContext)(a);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)(()=>{(0,u.FY)(r,e)},[r,e]),{extensions:S(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function O(e){return e}function P({name:e,extensionSlotName:t,select:r=O,children:n,state:s,style:l,...u}){if(n&&s)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 d=e??t,f=(0,o.useRef)(null),{extensions:p,extensionSlotModuleName:h}=D(d,s),m=(0,o.useMemo)(()=>r(p),[r,p]),y=(0,o.useMemo)(()=>{if("function"==typeof n&&!i().isValidElement(n))return m.map(e=>n(e,s))},[n,m]);return i().createElement("div",{ref:f,"data-extension-slot-name":d,"data-extension-slot-module-name":h,style:{...l,position:"relative"},...u},d&&m?.map((e,t)=>i().createElement(a.Provider,{key:e.id,value:{moduleName:h,featureName:"",extension:{extensionId:e.id,extensionSlotName:d,extensionSlotModuleName:h,extensionMeta:e.meta}}},y?.[t]??("function"!=typeof n?n:null)??i().createElement(c,{state:s}))))}var C=r(6661),j=r(87757),A=r(99737),k=r(15931),T=r.n(k),R=r(72924);let N={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},I=new Map;(0,R.initCache)(I);let M={errorRetryCount:3,fetcher:d.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof d.$f){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>I};function $(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},N,e),r={...M,...t.swrConfig};return function(e){var n,s,l,u,c;return l=s=class extends(n=i().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return i().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=i().createElement(o.Suspense,{fallback:null},i().createElement(k.SWRConfig,{value:r},i().createElement(a.Provider,{value:this.state.config},t.disableTranslations?i().createElement(e,this.props):i().createElement(A.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},i().createElement(e,this.props)))));return t.strictMode&&i().StrictMode?i().createElement(i().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},u="displayName",c=`OpenmrsReactComponent(${t.featureName})`,u in l?Object.defineProperty(l,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):l[u]=c,s}}function L(e,t){return(0,j.A)({React:i(),ReactDOMClient:C,rootComponent:$(t)(e)})}function F(e,t){return()=>e().then(({default:e})=>L(e,t))}function B(e,t){return()=>Promise.resolve(L(e,t))}let V=F;var U=r(19167),W=r(61841);let z=(0,U.y)()(()=>({}));(0,W.CE)("openmrs-app-context",z);let K={};function H(e,t=e=>e){let r=z.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function G(e,t){z.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function q(e){return null===e?null:Object.freeze(Object.assign({},e))}let Z=new Map;function Y(e,t){let r=(0,o.useRef)(t??{}),n=(0,o.useRef)(t=>G(e,t)),i=(0,o.useRef)(Symbol());return(0,o.useEffect)(()=>{let r=t??{},n=i.current;return null===H(e)?!function(e,t=K){z.setState(r=>{if(e in r)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({},r,{[e]:t===K?{}:t})})}(e,r):(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.`),G(e,()=>r)),Z.set(e,n),()=>{Z.get(e)===n&&(z.setState(t=>(e in t&&delete t[e],t)),Z.delete(e))}},[e]),(0,o.useEffect)(()=>{let n=t??{};(0,f.b)(r.current,n)||(G(e,()=>n),r.current=n)},[t]),n.current}function J({namespace:e,value:t}){return Y(e,t),null}let Q=({children:e,value:t,fallback:r})=>t?i().createElement(i().Fragment,null,e):r?i().createElement(i().Fragment,null,r):null;function X(){let e=(0,o.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,o.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function ee(e,t=e=>e??{}){let[r,n]=(0,o.useState)(()=>{if(et(e))return;let r=H(e);if(null!==r)return t?t(r):r});return(0,o.useEffect)(()=>{if(et(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,o.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>(0,f.b)(e,r)?e:r)})(q(o=H(e))),z.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(q(n)))})},[e,t]),r}function et(e){return"string"!=typeof e||0===e.trim().length}function er(e){let t=S(e);return(0,o.useMemo)(()=>t.map(e=>e.id),[t])}function en(e){return x(e).candidateExtensions}var eo=r(71647);function ei(e,t,r){let{data:n,error:i,mutate:a,isLoading:s,isValidating:l}=T()(e?(0,eo.e8)(e,t,r):null,d.lo);return(0,o.useMemo)(()=>({isLoading:s,data:n?.data.results??[],error:i,mutate:a,isValidating:l}),[n,i,s,l,a])}function ea(e){(0,o.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}var es=r(37315),el=r(82460);let eu={},ec=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
32
|
-
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function ed(e){let{moduleName:t,extension:r}=(0,o.useContext)(a),n=e?.externalModuleName??t;if(!n&&!r)throw Error(ec);let i=function(e){let t=(0,o.useMemo)(()=>(0,el.IS)(e),[e]),r=function(e){let[t,r]=(0,o.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,o.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw eu[e]||(eu[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),eu[e];return r}(n),s=function(e){let t=(0,o.useMemo)(el.GI,[]),r=function(e,t){let[r,n]=(0,o.useState)(t?()=>{let r=e.getState(),n=(0,el.P0)(r,t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,o.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=(0,el.P0)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,es.A)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!eu[r]&&t&&(eu[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=(0,el.P0)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),eu[r]}return r||{}}(r);return(0,o.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...i}:{...i,...s},[n,e?.externalModuleName,i,s])}let ef=S;var ep=r(19076),eh=r(27934);function em(){let[e,t]=(0,o.useState)((0,eh.s)());return(0,o.useEffect)(()=>(0,ep.gj)(({online:e})=>t(e)),[]),e}function ey(e,t=300){let[r,n]=(0,o.useState)(e);return(0,o.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var ev=r(83360),eg=r.n(ev);let eb=`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,t])=>`${e}:${t}`).join(",")}`;function ew(){let e=`${d.Jj}/emrapi/configuration?v=${eb}`,t=eg()(e,d.lo);return(0,o.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function e_(){return(0,o.useContext)(a).extension}let ex=g((0,u.a9)());function eE(e){let t=S(e);return(0,o.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let eS=g((0,u.zF)());var eD=r(36580);function eO(e){let{flags:t}=y(eD.jX);return t[e]?.enabled??!1}function eP(){let[,e]=(0,o.useState)(0);return(0,o.useCallback)(()=>{e(e=>e+1)},[])}function eC(e,t,r={}){return eA(e,t,ej,r)}let ej={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL((0,d.Gm)(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);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 eA(e,t,r,n={}){let{getPaginatedUrl:i,getTotalCount:a,getCurrentPageSize:s,getData:l}=r,{immutable:u,swrConfig:c}=n,f=n.fetcher??d.lo,[p,h]=(0,o.useState)(1),m=(0,o.useRef)(NaN),y=(0,o.useRef)(NaN),v=(0,o.useRef)(p),g=(0,o.useRef)(!1),b=(0,o.useRef)(!1),w=e?.toString()??"",[x,E]=(0,o.useState)(w);w!==x&&(E(w),h(1),v.current=1,m.current=NaN,y.current=NaN,g.current=!1,b.current=!1);let S=(p-1)*t,D=(0,o.useMemo)(()=>i(e,t,S),[e,t,S]),{data:O,...P}=(u?eg():T())(D,f,c);O?.data&&(m.current=a(O?.data),y.current=s(O?.data),g.current=!0);let C=Math.ceil(m.current/t),j=(0,o.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(m.current/t);!g.current||Number.isNaN(r)||e<=r?(v.current=e,h(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,o.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(m.current)){b.current||(b.current=!0,console.warn(`useServerPagination: ${w} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(m.current/t));p>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${p}; returning to page ${e}.`),v.current=e,h(e))},[p,t,w,O]);let A=(0,o.useCallback)(()=>{j(v.current+1)},[j]),k=(0,o.useCallback)(()=>{j(v.current-1)},[j]);return{data:l(O?.data),totalPages:C,totalCount:m.current,currentPage:p,currentPageSize:y.current,paginated:C>1,showNextButton:p<C,showPreviousButton:p>1,goTo:j,goToNext:A,goToPrevious:k,...P}}function ek(e,t,r={}){return eA(e,t,eT(),r)}function eT(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL((0,d.Gm)(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);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 eR=r(99970),eN=r.n(eR);function eI(e,t={}){return eM(e,ej,t)}function eM(e,t,r={}){let{swrInfiniteConfig:n,immutable:i}=r,{getNextUrl:a,getTotalCount:s,getData:l}=t,u=r.fetcher??d.lo,c=(0,o.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:f,size:p,setSize:h,...m}=eN()(c,u,{...n,...i?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),y=a(f?.[f.length-1].data),v=s(f?.[0]?.data);return{data:f?.flatMap(e=>l(e.data)),totalCount:v,hasMore:null!=y,loadMore:()=>{h((f?.length??0)+1)},nextUri:y,...m}}function e$(e,t={}){return eL(e,ej,t)}function eL(e,t,r={}){let n=eM(e,t,r),{hasMore:i,error:a,data:s,loadMore:l,isLoading:u,nextUri:c}=n;return((0,o.useEffect)(()=>{i&&!a&&l()},[i,c]),r.partialData)?n:{...n,data:i||a?void 0:s,isLoading:u||i}}function eF(e,t={}){return eL(e,eT(),t)}function eB(e,t={}){return eM(e,eT(),t)}function eV(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){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 eU(){let[e,t]=(0,o.useState)(eV);return(0,o.useEffect)(()=>{let e=()=>{t(eV())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let eW=e=>"small-desktop"===e||"large-desktop"===e;function ez(e){let t=(0,o.useContext)(a);(0,o.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),(0,u.Vx)(e),()=>{(0,u.sr)(e.name)}),[t,e])}function eK(){return y(u.Gp)}function eH(e=null,t=null){let[r,n]=(0,o.useState)([]);return(0,o.useEffect)(()=>{let r=(0,eo.Vs)(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function eG(e,t=!0){let r=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function eq(e){let t=(0,o.useRef)();return(0,o.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function eZ(e,t={}){let{abortController:r,fetchInit:n,url:i,swrConfig:a}=t,s=X(),l=(0,o.useMemo)(()=>n?.signal??r?.signal??s.signal,[r?.signal,n?.signal,s.signal]),u=(0,o.useCallback)(e=>{let t=function(e,t){if(t)return"function"==typeof t?t(e):t;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,i);return(0,d.lo)(t,{...n,signal:l})},[l,n,i]);return T()(e,u,a)}function eY(e=[],t=10){let[r,n]=(0,o.useState)(1),i=(0,o.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>i&&n(i);let a=Math.min(Math.max(1,r),i),s=(0,o.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),l=(0,o.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),u=(0,o.useCallback)(()=>{n(e=>e+1)},[]),c=(0,o.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,o.useMemo)(()=>({results:s,totalPages:i,currentPage:a,paginated:e.length>t,showNextButton:a<i,showPreviousButton:a>1,goTo:l,goToNext:u,goToPrevious:c}),[s,i,e.length,t,a,l,u,c])}function eJ(e,t,r,n){return{pageSizes:(0,o.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,o.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function eQ(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function eX(e){let[t,r]=(0,o.useState)(e??eQ()),{data:n,error:i,isValidating:a}=T()(t?["patient",t]:null,()=>(0,eo.hG)(t,{}));return(0,o.useEffect)(()=>{let e=()=>{let e=eQ();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,o.useMemo)(()=>({isLoading:a&&!i&&!n,patient:n,patientUuid:t,error:i}),[a,i,n,t])}function e0(){let e=`${d.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=T()(e,d.lo);return(0,o.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function e1(e){let{extensions:t,extensionSlotModuleName:r}=D(e);return e?t.map(t=>({state:n})=>i().createElement(a.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},i().createElement(c,{state:n}))):[]}function e4(){let e=(0,o.useRef)(),[t,r]=(0,o.useState)(null),i=null;if(!t){if(n){let e=(0,d.EW)().getState();e.loaded&&(i=e.session)}else n=new Promise(t=>{let r=({loaded:r,session:n})=>{r&&(t(n),i=n,e.current&&(e.current(),e.current=void 0))};r((0,d.EW)().getState()),i||(e.current=(0,d.EW)().subscribe(r))});if(i)r(i);else throw n}(0,o.useEffect)(()=>(e.current||(e.current=(0,d.EW)().subscribe(({loaded:e,session:t})=>{e&&(i=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let a=t||i;if(!a)if(n)throw console.warn("useSession is in an unexpected state. Attempting to recover."),n;else throw Error("useSession is in an invalid state.");return a}let e2=({privilege:e,fallback:t,children:r})=>{let[n,a]=(0,o.useState)(null);return((0,o.useEffect)(()=>{let e=(0,d.HW)({includeAuthStatus:!1}).subscribe(a);return()=>e.unsubscribe()},[]),n&&(0,d.st)(e,n))?i().createElement(i().Fragment,null,r):t?i().createElement(i().Fragment,null,t):null};var e3=r(11712),e6=r.n(e3),e5=r(68558);let e9=new Map;function e8(){for(let e of Array.from(e9.values()))e()}let e7={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function te(e){let t=(0,o.useId)();return(0,o.useEffect)(()=>{if(e)return e9.set(t,e),()=>{e9.delete(t)}},[t,e]),{...v((0,eo.BX)(),e7),mutateVisit:e8}}function tt(e,t=eo.Rb){let r=(0,o.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:i,setVisitContext:a}=te((0,o.useCallback)(()=>r.current?.(),[])),s=e&&n==e?i:null,l=`?patient=${e}&v=${t}&includeInactive=false`,u=`/${s}?v=${t}`,{data:c,error:f,mutate:p,isValidating:h}=T()(e?`${d.Jj}/visit${l}`:null,d.lo),{data:m,error:y,mutate:v,isValidating:g}=T()(e&&s?`${d.Jj}/visit${u}`:null,d.lo),b=(0,o.useMemo)(()=>c?.data.results.find(e=>null===e.stopDatetime)??null,[c]),w=(0,o.useMemo)(()=>s&&m?m.data:null,[m,s]),x=(0,o.useRef)(null);(0,o.useEffect)(()=>{!h&&b&&n===e&&null===i&&a(b),g||(x.current&&w&&x.current.uuid===w.uuid&&!x.current.stopDatetime&&w.stopDatetime&&a(null),x.current=w)},[w,i,b,h,g,n]);let E=(0,o.useCallback)(()=>{p(),v()},[p,v]);(0,o.useEffect)(()=>{r.current=E},[E]);let S=!!(!c||s&&!m),D=!!(s?y:f);return{error:f||y,mutate:E,isValidating:h||g,activeVisit:b,currentVisit:w,currentVisitIsRetrospective:!!s,isLoading:S&&!D}}function tr(){let[e,t]=(0,o.useState)([]);return(0,o.useEffect)(()=>{let e=(0,eo.Pu)().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}e6().extend(e5)},61841(e,t,r){"use strict";r.d(t,{i7:()=>m,jf:()=>h,CE:()=>p,Zd:()=>f});var n=r(92424);function o(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}let i=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>i(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>i(t)(e)}}};var a=r(19167);function s(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let l={},u=Symbol.for("openmrs.esm-state.instanceCount"),c=globalThis,d=(c[u]??0)+1;function f(e,t,r="none"){let n=l[e];if(n)return n.active?s()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=y(e,t,r);return l[e]={value:n,active:!0},n}}function p(e,t){let r=l[e];return r?(r.active?s()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(l[e]={value:t,active:!0},t)}function h(e,t,r="none"){let n=l[e];if(!n){let n=y(e,t??{},r);return l[e]={value:n,active:!1},n}return n.value}function m(...e){let[t,r,o]=e,i=void 0===o?r:o,a=void 0===o?e=>e:r,s=a(t.getState());return i(s),t.subscribe(e=>{let t=a(e);(0,n.b)(s,t)||(s=t,i(t))})}function y(e,t,r){return"sessionStorage"===r?(0,a.y)()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let a,s,l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set;try{a=l.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,o);let f=i(l.serialize),p=()=>{let e,t=f({state:l.partialize({...n()}),version:l.version}).then(e=>a.setItem(l.name,e)).catch(t=>{e=t});if(e)throw e;return t},h=o.setState;o.setState=(e,t)=>{h(e,t),p()};let m=e((...e)=>{r(...e),p()},n,o),y=()=>{var e;if(!a)return;u=!1,c.forEach(e=>e(n()));let t=(null==(e=l.onRehydrateStorage)?void 0:e.call(l,n()))||void 0;return i(a.getItem.bind(a))(l.name).then(e=>{if(e)return l.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return e.state;else{if(l.migrate)return l.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=l.merge(e,null!=(t=n())?t:m),!0),p()}).then(()=>{null==t||t(s,void 0),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{l={...l,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},y(),s||m};return(r,n,a)=>{let s,l={storage:o(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set,f=l.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,a);let p=()=>{let e=l.partialize({...n()});return f.setItem(l.name,{state:e,version:l.version})},h=a.setState;a.setState=(e,t)=>{h(e,t),p()};let m=e((...e)=>{r(...e),p()},n,a);a.getInitialState=()=>m;let y=()=>{var e,t;if(!f)return;u=!1,c.forEach(e=>{var t;return e(null!=(t=n())?t:m)});let o=(null==(t=l.onRehydrateStorage)?void 0:t.call(l,null!=(e=n())?e:m))||void 0;return i(f.getItem.bind(f))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate)return[!0,l.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,i]=e;if(r(s=l.merge(i,null!=(t=n())?t:m),!0),o)return p()}).then(()=>{null==o||o(s,void 0),s=n(),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==o||o(void 0,e)})};return a.persist={setOptions:e=>{l={...l,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},l.skipHydration||y(),s||m}})(()=>t,{name:e,storage:o(()=>sessionStorage)})):(0,a.y)()(()=>t)}c[u]=d,d>1&&!s()&&console.error(`Detected ${d} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=l)},1e3)},42007(e,t,r){"use strict";r.d(t,{V:()=>l,t:()=>s});let n={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",localVersion:"Local Build",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}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var o=r(26543),i=r.n(o);let a=i().default||i();function s(e,t,r,n){return a.t(t,{ns:e,defaultValue:r,...n})}function l(e,t,r){return n[e]?s("core",e,t??n[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}a.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},27934(e,t,r){"use strict";function n(e){return!window.offlineEnabled||(e??navigator.onLine)}r.d(t,{s:()=>n})},92424(e,t,r){"use strict";function n(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}r.d(t,{b:()=>n})}}]);
|
|
31
|
+
To fix this, ensure that you define the "component" field inside the page definition.`,e);let n=function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!(0,eg.jj)(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?(0,ex.pathToActiveWhen)(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t);(0,ex.registerApplication)(e,()=>eS(t.appName,t.component),n)}(n,t)}}var ek=r(61841);let eT={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 eR(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<eT.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>eT.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>eT.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<eT.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<eT.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<eT.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>eT.SMALL_DESKTOP_MAX)}let eN=!1;function eI(){eN||(window.addEventListener("resize",eR),eR(),eN=!0)}var eM=r(50457),e$=r(46925),eL=r.n(e$),eF=r(46073),eB=r.n(eF);function eV({title:e,children:t}){let r="tablet"===(0,e_.qv)();return(0,eM.jsxs)("div",{className:eB()({"Vkmd-M3ZdPZe+c6OloVbnw==":r,"ocWGqN+S6wY3-wV0QG3pOw==":!r}),children:[(0,eM.jsx)("h4",{children:e}),t]})}var eU=r(3855),eW=r(18326);let ez={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},eK=e=>(0,eM.jsx)(eW.TableBatchActions,{translateWithId:(e,t)=>{let r=ez[e];return r?(0,h.V)(r,e,t):e},...e}),eH="_8PykSzSXNNdifN25ybqq3w==",eG="qsOLntRcFqCu-mnZH0czJA==",eq="BserJewmzluWUcq5q8a0yw==",eZ="n86GzT7Rs8Kf8e25ihYZPg==",eY=(0,e$.createContext)(null);function eJ(){let e=(0,e$.useContext)(eY);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function eQ({menuTitle:e,children:t}){let[r,n]=eL().useState(!1),o=(0,e_.Wr)(()=>n(!1),r),i="tablet"===(0,e_.qv)(),a=(0,e$.useCallback)(()=>n(e=>!e),[]),s=(0,e$.useRef)(null),l=(0,e$.useRef)(null),u=(0,e$.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,e$.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,e$.useMemo)(()=>({closeMenu:f}),[f]),h=(0,e$.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=e$.Children.toArray(t);(0,e$.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,e$.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),v=m.map((e,t)=>(0,e$.isValidElement)(e)?(0,e$.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,eM.jsxs)("div",{"data-overflow-menu":!0,className:eB()("cds--overflow-menu",eH),ref:o,children:[(0,eM.jsx)("button",{className:eB()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},eZ),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,eM.jsxs)("div",{className:eB()("cds--overflow-menu-options","cds--overflow-menu--flip",eG,{[eq]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,eM.jsx)("ul",{className:eB()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,eM.jsx)(eY.Provider,{value:p,children:v})}),(0,eM.jsx)("span",{})]})]})}function eX(e){let t=(0,e$.useContext)(eY);return(0,eM.jsx)(eW.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var e0=r(99737),e1=r(47665);let e4=["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-mobile-check","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-two-factor-authentication","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"],e2=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),e3=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-add",iconProps:e})})),e6=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),e5=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),e9=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),e8=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),e7=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),te=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),tt=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),tr=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),tn=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),to=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),ti=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),ta=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),ts=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),tl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),tu=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),tc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),td=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),tf=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),tp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),th=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),tm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close",iconProps:e})})),ty=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),tv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),tg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-document",iconProps:e})})),tb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),tw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-download",iconProps:e})})),t_=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),tx=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),tE=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),tS=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-events",iconProps:e})})),tD=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),tO=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),tP=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),tC=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),tj=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),tA=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-group",iconProps:e})})),tk=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),tT=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),tR=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),tN=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information",iconProps:e})})),tI=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),tM=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),t$=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),tL=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),tF=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),tB=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-location",iconProps:e})})),tV=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),tU=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),tW=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),tz=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),tK=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),tH=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),tG=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-money",iconProps:e})})),tq=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),tZ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),tY=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),tJ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),tQ=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-password",iconProps:e})})),tX=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),t0=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),t1=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),t4=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),t2=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),t3=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),t6=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),t5=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-report",iconProps:e})})),t9=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),t8=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-save",iconProps:e})})),t7=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-search",iconProps:e})})),re=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),rt=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),rr=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),rn=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),ro=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),ri=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),ra=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),rs=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-table",iconProps:e})})),rl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-time",iconProps:e})})),ru=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),rc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),rd=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),rf=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),rp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),rh=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),rm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),ry=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),rv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-user",iconProps:e})})),rg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),rb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-view",iconProps:e})})),rw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(rP,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),r_=rw,rx=tb,rE=tF,rS=tR,rD=rn,rO=(0,e$.memo)((0,e$.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,e$.useRef)(e?document.getElementById(e):void 0);return(0,e$.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,eM.jsx)(e_.fS,{value:o.current,fallback:t,children:(0,eM.jsx)(rP,{ref:n,icon:e,iconProps:r})})})),rP=(0,e$.memo)((0,e$.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,e$.useRef)(null);return(0,e$.useImperativeHandle)(r,()=>a.current),(0,e$.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,eM.jsx)("svg",{ref:a,className:eB()("omrs-icon","BfFhdfwf1e98NnHqJTMOmw==",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,eM.jsx)("use",{href:`#${e}`})})})),rC=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,e0.useTranslation)(),i=(0,e1.useLocation)(),a=(0,e$.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,eM.jsx)("div",{children:(0,eM.jsx)(e_.i_,{className:eB()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,eM.jsxs)("span",{className:"ds1tfuMnfJ+PmahVRNLpnQ==",children:[(0,eM.jsx)(rO,{icon:n,className:"_4ZrrhAdbDQb3EuiAijKGFw==",size:16}),(0,eM.jsx)("span",{children:o(t)})]})})},e)};function rj(e){return function({basePath:t}){return(0,eM.jsx)(e1.BrowserRouter,{children:(0,eM.jsx)(rC,{basePath:t,...e})})}}function rA(e){let t=(0,e$.useRef)(null);return(0,e$.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function rk(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let rT="u">typeof document?eL().useLayoutEffect:()=>{};function rR(e){let t=(0,e$.useRef)(null);return rT(()=>{t.current=e},[e]),(0,e$.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let rN={prefix:String(Math.round(1e10*Math.random())),current:0},rI=eL().createContext(rN),rM=eL().createContext(!1),r$=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),rL="function"==typeof eL().useId?function(e){let t=eL().useId(),[r]=(0,e$.useState)(rU()),n=r?"react-aria":`react-aria${rN.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,e$.useContext)(rI),r=function(e=!1){let t=(0,e$.useContext)(rI),r=(0,e$.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=eL().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=r$.get(e);null==r?r$.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,r$.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function rF(){return!1}function rB(){return!0}function rV(e){return()=>{}}function rU(){return"function"==typeof eL().useSyncExternalStore?eL().useSyncExternalStore(rV,rF,rB):(0,e$.useContext)(rM)}let rW=!!("u">typeof window&&window.document&&window.document.createElement),rz=new Map;function rK(e){let[t,r]=(0,e$.useState)(e),o=(0,e$.useRef)(null),i=rL(t),a=(0,e$.useRef)(null);if(n&&n.register(a,i),rW){let e=rz.get(i);e&&!e.includes(o)?e.push(o):rz.set(i,[o])}return rT(()=>()=>{n&&n.unregister(a),rz.delete(i)},[i]),(0,e$.useEffect)(()=>{let e=o.current;return e&&r(e),()=>{e&&(o.current=null)}}),i}function rH(e=[]){let t=rK(),[r,n]=function(e){let[t,r]=(0,e$.useState)(e),n=(0,e$.useRef)(null),o=rR(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});rT(()=>{n.current&&o()});let i=rR(e=>{n.current=e(t),o()});return[t,i]}(t),o=(0,e$.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return rT(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(n=new FinalizationRegistry(e=>{rz.delete(e)}));let rG=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function rq(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=rk(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=rG(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=rz.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=rz.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let rZ=Symbol("default");function rY({values:e,children:t}){for(let[r,n]of e)t=eL().createElement(r.Provider,{value:n},t);return t}function rJ(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,e$.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function rQ(e,t){let r=(0,e$.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||rZ;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function rX(e,t,r){let{ref:n,...o}=rQ(r,e.slot)||{},i=rA((0,e$.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),a=rq(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function r0(e=!0){let[t,r]=(0,e$.useState)(e),n=(0,e$.useRef)(!1),o=(0,e$.useCallback)(e=>{n.current=!0,r(!!e)},[]);return rT(()=>{n.current||r(!1)},[]),[o,t]}function r1(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let r4=(0,e$.createContext)(null),r2=null;function r3(e,t="assertive",r=7e3){r2?r2.announce(e,t,r):(r2=new r6,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?r2.announce(e,t,r):setTimeout(()=>{(null==r2?void 0:r2.isAttached())&&(null==r2||r2.announce(e,t,r))},100))}class r6{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}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 r5=new Set(["id"]),r9=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),r8=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),r7=/^(data-.*)$/;function ne(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r5.has(t)||r&&r9.has(t)||n&&r8.has(t)||(null==o?void 0:o.has(t))||r7.test(t))&&(i[t]=e[t]);return i}let nt=["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"])'],nr=nt.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";nt.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let nn=nt.join(':not([hidden]):not([tabindex="-1"]),');function no(e){return e.matches(nr)}function ni(e){return e.matches(nn)}let na=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},ns=e=>e&&"window"in e&&e.window===e?e:na(e).defaultView||window;function nl(e){if(function(){if(null==nu){nu=!1;try{document.createElement("div").focus({get preventScroll(){return nu=!0,!0}})}catch{}}return nu}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let nu=null;function nc(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function nd(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function nf(e){let t=(0,e$.useRef)({isFocused:!1,observer:null});rT(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=rR(t=>{null==e||e(t)});return(0,e$.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(nc(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let np=!1;function nh(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function nm(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ny(e){let t=null;return()=>(null==t&&(t=e()),t)}let nv=ny(function(){return nm(/^Mac/i)}),ng=ny(function(){return nm(/^iPhone/i)}),nb=ny(function(){return nm(/^iPad/i)||nv()&&navigator.maxTouchPoints>1}),nw=ny(function(){return ng()||nb()});ny(function(){return nv()||nw()});let n_=ny(function(){return nh(/AppleWebKit/i)&&!nx()}),nx=ny(function(){return nh(/Chrome/i)}),nE=ny(function(){return nh(/Android/i)}),nS=ny(function(){return nh(/Firefox/i)}),nD=new Map,nO=new Set;function nP(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=nD.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),nD.delete(r.target)),0===nD.size)){for(let e of nO)e();nO.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=nD.get(r.target);n||(n=new Set,nD.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function nC(e){requestAnimationFrame(()=>{0===nD.size?e():nO.add(e)})}"u">typeof document&&("loading"!==document.readyState?nP():document.addEventListener("DOMContentLoaded",nP));let nj="default",nA="",nk=new WeakMap;function nT(e){if(nw())"disabled"===nj&&(nj="restoring",setTimeout(()=>{nC(()=>{if("restoring"===nj){let t=na(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=nA||""),nA="",nj="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&nk.has(e)){let t=nk.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),nk.delete(e)}}let nR=eL().createContext({register:()=>{}});function nN(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function nI(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function nM(e,t,r){var n=nN(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function n$(e,t){rT(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function nL(){let e=(0,e$.useRef)(new Map),t=(0,e$.useCallback)((t,r,n,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,e$.useCallback)((t,r,n,o)=>{var i;let a=(null==(i=e.current.get(n))?void 0:i.fn)||n;t.removeEventListener(r,a,o),e.current.delete(n)},[]),n=(0,e$.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,e$.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}nR.displayName="PressResponderContext";function nF(e,t){return!!t&&!!e&&e.contains(t)}function nB(e){return e.target}function nV(e,t,r=!0){var n,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;nS()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(nv()?i=!0:a=!0);let u=n_()&&nv()&&!nb()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});nV.isOpening=r,nl(e),e.dispatchEvent(u),nV.isOpening=!1}function nU(e){return 0===e.mozInputSource&&!!e.isTrusted||(nE()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}nV.isOpening=!1;var nW=r(22065),nz=r.n(nW),nK=new WeakMap;class nH{continuePropagation(){nM(this,nK,!1)}get shouldStopPropagation(){var e;return e=nN(this,nK,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;nI(this,nK,{writable:!0,value:void 0}),nM(this,nK,!0);let i=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),a&&(null!=u&&null!=c?(s=u-a.left,l=c-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let nG=Symbol("linkClicked");function nq(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,e$.useContext)(nR);if(t){let{register:r,...n}=t;e=rq(n,e),r()}return n$(t,e.ref),e}(e),[h,m]=(0,e$.useState)(!1),y=(0,e$.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:v,removeAllGlobalListeners:g}=nL(),b=rR((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new nH("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),w=rR((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new nH("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new nH("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),x=rR((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new nH("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=rR(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(nJ(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,g(),d||nT(t.target),t.disposables))r();t.disposables=[]}}),S=rR(e=>{c&&E(e)}),D=rR(e=>{null==a||a(e)}),O=rR((e,t)=>{if(a){let r=new MouseEvent("click",e);nd(r,t),a(nc(r))}}),P=(0,e$.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(nY(t.nativeEvent,t.currentTarget)&&nF(t.currentTarget,nB(t.nativeEvent))){var n;nQ(nB(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;v(na(t.currentTarget),"keyup",rk(t=>{nY(t,n)&&!t.repeat&&nF(n,nB(t))&&e.target&&x(nJ(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&nv()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||nF(t.currentTarget,nB(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!nV.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||nU(t.nativeEvent))){let e=b(t,"virtual"),n=x(t,"virtual"),o=w(t,"virtual");D(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(nJ(t.currentTarget,t),n,!0),e.isOverTarget=!1,D(t),E(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&nY(t,e.target)){nQ(nB(t),t.key)&&t.preventDefault();let r=nB(t),o=nF(e.target,nB(t));w(nJ(e.target,t),"keyboard",o),o&&O(t,e.target),g(),"Enter"!==t.key&&nZ(e.target)&&nF(e.target,r)&&!t[nG]&&(t[nG]=!0,nV(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!nF(t.currentTarget,nB(t.nativeEvent)))return;if(o=t.nativeEvent,!nE()&&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=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(nw()){if("default"===nj){let t=na(e);nA=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}nj="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";nk.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=b(t,e.pointerType);let o=nB(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),v(na(t.currentTarget),"pointerup",r,!1),v(na(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(nF(t.currentTarget,nB(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!no(e);)e=e.parentElement;let t=ns(e),r=t.document.activeElement;if(!r||r===e)return;np=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},i=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,nl(r),l()))},a=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,nl(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),np=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{nF(t.currentTarget,nB(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(nJ(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(nJ(e.target,t),e.pointerType,!1),S(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(nF(e.target,nB(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?E(t):(nl(e.target),e.target.click()))},80);v(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else E(t);e.isOverTarget=!1}},n=e=>{E(e)};t.onDragStart=e=>{nF(e.currentTarget,nB(e.nativeEvent))&&E(e)}}return t},[v,s,u,g,d,E,S,w,b,x,D,O]);return(0,e$.useEffect)(()=>{let e=null==f?void 0:f.current;e&&e instanceof ns(e).Element&&"auto"===ns(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[f]),(0,e$.useEffect)(()=>{let e=y.current;return()=>{var t;for(let r of(d||nT(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:rq(p,P)}}function nZ(e){return"A"===e.tagName&&e.hasAttribute("href")}function nY(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof ns(t).HTMLInputElement&&!n0(t,r)||t instanceof ns(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&nZ(t))&&"Enter"!==r)}function nJ(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function nQ(e,t){return e instanceof HTMLInputElement?!n0(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!nZ(e))}let nX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function n0(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:nX.has(e.type)}let n1=null,n4=new Set,n2=new Map,n3=!1,n6=!1,n5={Tab:!0,Escape:!0};function n9(e,t){for(let r of n4)r(e,t)}function n8(e){n3=!0,e.metaKey||!nv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(n1="keyboard",n9("keyboard",e))}function n7(e){n1="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(n3=!0,n9("pointer",e))}function oe(e){nU(e)&&(n3=!0,n1="virtual")}function ot(e){e.target!==window&&e.target!==document&&!np&&e.isTrusted&&(n3||n6||(n1="virtual",n9("virtual",e)),n3=!1,n6=!1)}function or(){np||(n3=!1,n6=!0)}function on(e){if("u"<typeof window||n2.get(ns(e)))return;let t=ns(e),r=na(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){n3=!0,n.apply(this,arguments)},r.addEventListener("keydown",n8,!0),r.addEventListener("keyup",n8,!0),r.addEventListener("click",oe,!0),t.addEventListener("focus",ot,!0),t.addEventListener("blur",or,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",n7,!0),r.addEventListener("pointermove",n7,!0),r.addEventListener("pointerup",n7,!0)),t.addEventListener("beforeunload",()=>{oo(e)},{once:!0}),n2.set(t,{focus:n})}let oo=(e,t)=>{let r=ns(e),n=na(e);t&&n.removeEventListener("DOMContentLoaded",t),n2.has(r)&&(r.HTMLElement.prototype.focus=n2.get(r).focus,n.removeEventListener("keydown",n8,!0),n.removeEventListener("keyup",n8,!0),n.removeEventListener("click",oe,!0),r.removeEventListener("focus",ot,!0),r.removeEventListener("blur",or,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",n7,!0),n.removeEventListener("pointermove",n7,!0),n.removeEventListener("pointerup",n7,!0)),n2.delete(r))};function oi(){return"pointer"!==n1}"u">typeof document&&("loading"!==(s=na(void 0)).readyState?on(void 0):s.addEventListener("DOMContentLoaded",()=>{on(void 0)}));let oa=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function os(e){let t=na(e),r=((e=document)=>e.activeElement)(t);"virtual"===n1?nC(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&nl(e)}):nl(e)}function ol(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,e$.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=nf(i),s=(0,e$.useCallback)(e=>{let t=na(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===nB(e.nativeEvent)&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function ou(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let oc=eL().createContext(null);function od(e,t){let{focusProps:r}=ol(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:ou(e.onKeyDown),onKeyUp:ou(e.onKeyUp)}},o=rq(r,n),i=function(e){let t=(0,e$.useContext)(oc)||{};n$(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,e$.useRef)(e.autoFocus);(0,e$.useEffect)(()=>{s.current&&t.current&&os(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:rq({...o,tabIndex:l},a)}}function of(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,e$.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=nL(),l=(0,e$.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=nf(l),c=(0,e$.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=na(e.target),r=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&r===nB(e.nativeEvent)){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let r=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!nF(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});nd(n,r),l(nc(n))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function op(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,e$.useRef)({isFocused:!1,isFocusVisible:r||oi()}),[a,s]=(0,e$.useState)(!1),[l,u]=(0,e$.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,e$.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,e$.useCallback)(e=>{i.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},on(),(0,e$.useEffect)(()=>{let e=(e,r)=>{var n;let o,a,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=na(null==r?void 0:r.target),a="u">typeof window?ns(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?ns(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?ns(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?ns(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof a&&!oa.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!n5[r.key]||(e=>{i.current.isFocusVisible=e,c()})(oi())};return n4.add(e),()=>{n4.delete(e)}},[]);let{focusProps:f}=ol({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=of({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?p:f}}eL().forwardRef(function(e,t){let{children:r,...n}=e,o=rA(t),i={...n,ref:o};return eL().createElement(oc.Provider,{value:i},r)});let oh=!1,om=0;function oy(e){"touch"===e.pointerType&&(oh=!0,setTimeout(()=>{oh=!1},50))}function ov(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",oy),om++,()=>{!(--om>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",oy)}}function og(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,e$.useState)(!1),s=(0,e$.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,e$.useEffect)(ov,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=nL(),{hoverProps:c,triggerHoverEnd:d}=(0,e$.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{oh&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(na(n.target),"pointerover",t=>{s.isHovered&&s.target&&!nF(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,e$.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 ob=(0,e$.createContext)(!1);function ow(e){let t=(t,r)=>(0,e$.useContext)(ob)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,e$.forwardRef)(t)}let o_=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),ox=(0,e$.createContext)({}),oE=ow(function(e,t){var r;[e,t]=rX(e,t,ox);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:v,isPressed:g}=nq({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=od(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=rq(b,v,ne(e,{labelable:!0}));return{isPressed:g,buttonProps:rq(r,w,{"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,t),{focusProps:s,isFocused:l,isFocusVisible:u}=op(e),{hoverProps:c,isHovered:d}=og({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=rJ({...e,values:f,defaultClassName:"react-aria-Button"}),h=rK(i.id),m=rK(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let v=(0,e$.useRef)(o);return(0,e$.useEffect)(()=>{let e={"aria-labelledby":y||h};!v.current&&l&&o?r3(e,"assertive"):v.current&&l&&!o&&r3(e,"assertive"),v.current=o},[o,l,y,h]),eL().createElement("button",{...ne(e,{propNames:o_}),...rq(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},eL().createElement(r4.Provider,{value:{id:m}},p.children))});(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null),(0,e$.createContext)(null);let oS=(0,e$.createContext)({}),oD=(0,e$.createContext)({}),oO=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,oD);let{elementType:r="span",...n}=e;return eL().createElement(r,{className:"react-aria-Text",...n,ref:t})}),oP=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),oC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function oj(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return oP.has(t.script)}let t=e.split("-")[0];return oC.has(t)}let oA=Symbol.for("react-aria.i18n.locale");function ok(){let e="u">typeof window&&window[oA]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:oj(e)?"rtl":"ltr"}}let oT=ok(),oR=new Set;function oN(){for(let e of(oT=ok(),oR))e(oT)}function oI(){let e=rU(),[t,r]=(0,e$.useState)(oT);return((0,e$.useEffect)(()=>(0===oR.size&&window.addEventListener("languagechange",oN),oR.add(r),()=>{oR.delete(r),0===oR.size&&window.removeEventListener("languagechange",oN)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let oM=eL().createContext(null);function o$(e){let{locale:t,children:r}=e,n=oI(),o=eL().useMemo(()=>t?{locale:t,direction:oj(t)?"rtl":"ltr"}:n,[n,t]);return eL().createElement(oM.Provider,{value:o},r)}function oL(){let e=oI();return(0,e$.useContext)(oM)||e}var oF={};function oB(e,t){return e-t*Math.floor(e/t)}function oV(e,t,r,n){let o=(t=oW(e,t))-1,i=-2;return r<=2?i=0:oU(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function oU(e){return e%4==0&&(e%100!=0||e%400==0)}function oW(e,t){return"BC"===e?1-t:t}function oz(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}oF={"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 oK={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 oH{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=oB(t,146097),o=Math.floor(n/36524),i=oB(n,36524),a=Math.floor(i/1461),s=Math.floor(oB(i,1461)/365),[l,u]=oz(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-oV(l,u,1,1),d=2;e<oV(l,u,3,1)?d=0:oU(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-oV(l,u,f,1)+1;return new ii(l,u,f,p)}toJulianDay(e){return oV(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return oK[oU(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return oU(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 oG(e,t){let r=e.copy(),n="hour"in r?o2(r,t):0;oq(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,oZ(r),oY(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,oZ(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,oZ(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var i,a;let e=null==(i=(a=r.calendar).isInverseEra)?void 0:i.call(a,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function oq(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function oZ(e){for(;e.month<1;)oq(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,oq(e,1)}function oY(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 oJ(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),oY(e)}function oQ(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function oX(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),oJ(r),r}function o0(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),o1(r),r}function o1(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 o4(e,t){let r=e%t;return r<0&&(r+=t),r}function o2(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=o4(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=o4(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=o4(e.minute,60),r=Math.floor(e.hour/24),e.hour=o4(e.hour,24),r}function o3(e,t){let r=e.copy();return o2(r,t),r}function o6(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=o9(i,r,0,t.length-1,null==n?void 0:n.round),o.era=t[i],oJ(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(r=-r),o.year=o9(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=o9(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=o9(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),oJ(o),o}function o5(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=o9(t,r,i,a,null==n?void 0:n.round);break}case"minute":o.minute=o9(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=o9(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=o9(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function o9(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function o8(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?ig(oG(ix(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):ip(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),iE(iw(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function o7(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 ie(e){let t,r=iE(e,new oH);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function it(e){return`${ie(e)}T${o7(e)}`}function ir(e){let t,r="object"==typeof e[0]?e.shift():new oH;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var io=new WeakMap;class ii{copy(){return this.era?new ii(this.calendar,this.era,this.year,this.month,this.day):new ii(this.calendar,this.year,this.month,this.day)}add(e){return oG(this,e)}subtract(e){return oG(this,oQ(e))}set(e){return oX(this,e)}cycle(e,t,r){return o6(this,e,t,r)}toDate(e){return ib(this,e)}toString(){return ie(this)}compare(e){return iT(this,e)}constructor(...e){nI(this,io,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,oJ(this)}}var ia=new WeakMap;class is{copy(){return new is(this.hour,this.minute,this.second,this.millisecond)}add(e){return o3(this,e)}subtract(e){return o3(this,oQ(e))}set(e){return o0(this,e)}cycle(e,t,r){return o5(this,e,t,r)}toString(){return o7(this)}compare(e){var t,r;return t=this,r=e,iR(t)-iR(r)}constructor(e=0,t=0,r=0,n=0){nI(this,ia,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,o1(this)}}var il=new WeakMap;class iu{copy(){return this.era?new iu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new iu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return oG(this,e)}subtract(e){return oG(this,oQ(e))}set(e){return oX(o0(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return o6(this,e,t,r);default:return o5(this,e,t,r)}}toDate(e,t){return ib(this,e,t)}toString(){return it(this)}compare(e){var t,r;let n=iT(this,e);return 0===n?(t=this,r=ix(e),iR(t)-iR(r)):n}constructor(...e){nI(this,il,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,oJ(this)}}var ic=new WeakMap;class id{copy(){return this.era?new id(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new id(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return o8(this,e)}subtract(e){return o8(this,oQ(e))}set(e,t){let r,n;return 0===(n=o0(oX(r=ix(this),e),e)).compare(r)?this:iE(iw(ig(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=ix(e),a=iE(o0(i,{hour:t}),new oH),s=[ig(a,e.timeZone,"earlier"),ig(a,e.timeZone,"later")].filter(t=>iw(t,e.timeZone).day===a.day)[0],l=iE(o0(i,{hour:o}),new oH),u=[ig(l,e.timeZone,"earlier"),ig(l,e.timeZone,"later")].filter(t=>iw(t,e.timeZone).day===l.day).pop(),c=ip(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return iE(iw(c=36e5*o9(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return o5(e,t,r,n);case"era":case"year":case"month":case"day":return iE(iw(ig(o6(ix(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(ip(e)-e.offset)}toString(){var e;let t,r,n;return`${it(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof id){var r,n;return e.timeZone===t?e:(r=e,n=t,iE(iw(ip(r)-r.offset,n),r.calendar))}return iw(ig(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){nI(this,ic,{writable:!0,value:void 0});let[t,r,n,o,i]=ir(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,oJ(this)}}function ip(e){return ih(oW((e=iE(e,new oH)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ih(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function im(e,t){if("UTC"===t)return 0;if(e>0&&t===iI())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=iv(e,t);return ih(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let iy=new Map;function iv(e,t){let r=iy.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),iy.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"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 ig(e,t,r="compatible"){var n,o,i;let a=ix(e);if("UTC"===t)return ip(a);if(t===iI()&&"compatible"===r){a=iE(a,new oH);let e=new Date,t=oW(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=ip(a),l=im(s-864e5,t),u=im(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=iv(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function ib(e,t,r="compatible"){return new Date(ig(e,t,r))}function iw(e,t){let r=im(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new id(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function i_(e){return new ii(e.calendar,e.era,e.year,e.month,e.day)}function ix(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new iu(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function iE(e,t){if(iP(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,oJ(n),n}let iS={"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 iD(e,t){return t=iE(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function iO(e,t){return iP(e.calendar,t.calendar)&&iD(e,t)}function iP(e,t){var r,n,o,i;return null!=(i=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?i:e.identifier===t.identifier}let iC={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function ij(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?iC[r]:(n=function(e){if(Intl.Locale){let t=iF.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&iF.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&iS[n]||0))%7;return o<0&&(o+=7),o}function iA(e){return iw(Date.now(),e)}function ik(e){return i_(iA(e))}function iT(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function iR(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let iN=null;function iI(){return null==iN&&(iN=new Intl.DateTimeFormat().resolvedOptions().timeZone),iN}function iM(e){return e.subtract({days:e.day-1})}function i$(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function iL(e,t,r){let n=ij(e,t,r);return e.subtract({days:n})}let iF=new Map;function iB(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function iV(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let iU=Symbol.for("react-aria.i18n.locale"),iW=Symbol.for("react-aria.i18n.strings");class iz{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[iU];if(void 0===l){let e=window[iW];if(!e)return null;for(let r in l={},e)l[r]=new iz({[t]:e[r]},t)}let r=null==l?void 0:l[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let iK=new Map,iH=new Map;class iG{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=iK.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),iK.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=iH.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),iH.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let iq=new WeakMap;function iZ(e,t){let r;return t&&iz.getGlobalDictionaryForPackage(t)||((r=iq.get(e))||(r=new iz(e),iq.set(e,r)),r)}function iY(e,t){let{locale:r}=oL(),n=iZ(e,t);return(0,e$.useMemo)(()=>new iG(r,n),[r,n])}let iJ=new Map;class iQ{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==i4&&(i4="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),i4&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=i0(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&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,t={}){this.formatter=i0(e,t),this.options=t}}let iX={true:{ja:"h11"},false:{}};function i0(e,t={}){if("boolean"==typeof t.hour12&&(null==i1&&(i1="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),i1)){let r=iX[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(iJ.has(r))return iJ.get(r);let n=new Intl.DateTimeFormat(e,t);return iJ.set(r,n),n}let i1=null,i4=null;function i2(e,t){let r=(0,e$.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function i3(e){e=i2(null!=e?e:{},i6);let{locale:t}=oL();return(0,e$.useMemo)(()=>new iQ(t,e),[t,e])}function i6(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function i5(e){return e&&e.__esModule?e.default:e}let i9=new WeakMap;function i8(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function i7(e,t,r,n){let o=iY(i5(oF),"@react-aria/calendar"),i=i8(e)||i8(t),a=i3({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=i3({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,e$.useMemo)(()=>{if(iD(e,iM(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),iD(t,i$(e)))return a.format(i.toDate(r));if(iD(t,i$(t)))return n?ae(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?ae(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function ae(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function at(e,t){let r=(0,e$.useRef)(!0),n=(0,e$.useRef)(null);(0,e$.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,e$.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function ar(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=rK(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function an(e,t){var r,n;let o,i,a,s,l,u=iY((r=oF)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=ne(e),d=i7(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),f=i7(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);at(()=>{t.isFocused||r3(f)},[f]);let p=(a=iY(i5(oF),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(n=t.value)?n:void 0,s=i3({weekday:"long",month:"long",year:"numeric",day:"numeric",era:i8(o)||i8(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,e$.useMemo)(()=>{if(!l&&o&&i)if(iD(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=ae(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));at(()=>{p&&r3(p,"polite",4e3)},[p]);let h=rH([!!e.errorMessage,e.isInvalid,e.validationState]);i9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:p});let[m,y]=(0,e$.useState)(!1),v=e.isDisabled||t.isNextVisibleRangeInvalid();v&&m&&(y(!1),t.setFocused(!0));let[g,b]=(0,e$.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&g&&(b(!1),t.setFocused(!0)),{calendarProps:rq(c,ar({id:e.id,"aria-label":[e["aria-label"],f].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:v,onFocusChange:y},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:h},title:d}}let ao={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 ai(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,e$.useState)(!1),{focusWithinProps:i}=of({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,e$.useMemo)(()=>n?t:t?{...ao,...t}:ao,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return eL().createElement(r,rq(i,a),t)}function aa(e,t,r,n){let o=rR(r),i=null==r;(0,e$.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i,o])}let as=0,al=new Map;function au(e){let[t,r]=(0,e$.useState)();return rT(()=>{if(!e)return;let t=al.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${as++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},al.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),al.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function ac(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function ad(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function af(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(a).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)ac(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=ad(e,t,"left"),n=ad(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),h=a+parseInt(u,10),m=s+parseInt(l,10),y=h+e.clientWidth,v=m+e.clientHeight,g=parseInt(c,10)||0,b=parseInt(f,10)||0,w=parseInt(d,10)||0,x=parseInt(p,10)||0;r<=a+x?a=r-parseInt(u,10)-x:r+o>y-w&&(a+=r+o-y+w),n<=m+g?s=n-parseInt(l,10)-g:n+i>v-b&&(s+=n+i-v+b),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var r,n,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(a-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function ap(e,t){let r=e;for(ac(r,t)&&(r=r.parentElement);r&&!ac(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class ah extends oH{fromJulianDay(e){let t=super.fromJulianDay(e);return new ii(this,oW(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(am(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(am(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function am(e){let[t,r]=oz(e.year+-543);return new ii(t,r,e.month,e.day)}function ay(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function av(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-ay(e,r,1,1))/30),o=t+1-ay(e,r,n,1);return[r,n,o]}function ag(e){return Math.floor(e%4/3)}function ab(e,t){return t%13!=0?30:ag(e)+5}class aw{fromJulianDay(e){let[t,r,n]=av(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new ii(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),ay(1723856,t,e.month,e.day)}getDaysInMonth(e){return ab(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+ag(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class a_ extends aw{fromJulianDay(e){let[t,r,n]=av(1723856,e);return new ii(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class ax extends aw{fromJulianDay(e){let[t,r,n]=av(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new ii(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ay(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ab(t,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 aE=765433;function aS(e){return 7>oB(7*e+1,19)}function aD(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>oB(3*(r+1),7)&&(r+=1),r}function aO(e){let t,r;return aD(e)+(t=aD(e-1),r=aD(e),aD(e+1)-r==356?2:+(r-t==382))}function aP(e){return aO(e+1)-aO(e)}function aC(e,t){if(t>=6&&!aS(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=aP(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!aS(e):30}class aj{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/aE*19+234)/235)+1,n=aO(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=aO(--r)));let i=1,a=0;for(;a<o;)a+=aC(r,i),i++;let s=o-(a-=aC(r,--i));return new ii(this,r,i,s)}toJulianDay(e){let t=aO(e.year);for(let r=1;r<e.month;r++)t+=aC(e.year,r);return t+e.day+347997}getDaysInMonth(e){return aC(e.year,e.month)}getMonthsInYear(e){return aS(e.year)?13:12}getDaysInYear(e){return aP(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(aS(t.year)&&!aS(e.year)&&t.month>6?e.month--:!aS(t.year)&&aS(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class aA extends oH{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-oV(o.era,o.year,1,1);if(a<80?(i--,a+=(t=oU(o.year-1)?31:30)+155+90+10):(t=oU(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new ii(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=oz(e.year+78);return(oU(o)?(t=31,r=oV(n,o,3,21)):(t=30,r=oV(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&oU(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 ak(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function aT(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+ak(t,n,1,1)))/29.5)+1),i=r-ak(t,n,o,1)+1;return new ii(e,n,o,i)}function aR(e){return(14+11*e)%30<11}class aN{fromJulianDay(e){return aT(this,1948440,e)}toJulianDay(e){return ak(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&aR(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return aR(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class aI extends aN{fromJulianDay(e){return aT(this,1948439,e)}toJulianDay(e){return ak(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function aM(e){return 460322+i[e-1300]}function a$(e,t){return(o[e-1300]&1<<11-(t-1))==0?29:30}function aL(e,t){let r=aM(e);for(let n=1;n<t;n++)r+=a$(e,n);return r}function aF(e){return i[e+1-1300]-i[e-1300]}class aB extends aN{fromJulianDay(e){let t=e-1948440,r=aM(1300),n=aM(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-aM(++e)+1;let o=aF(e);if(n===o){r=12;break}if(n<o){let t=a$(e,r);for(r=1;n>t;)n-=t,t=a$(e,++r);break}}return new ii(this,e,r,t-aL(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+aL(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):a$(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):aF(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",o||(o=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!i){i=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){i[t-1300]=e;for(let r=1;r<=12;r++)e+=a$(t,r)}}}}let aV=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],aU=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],aW=[1867,1911,1925,1988,2018],az=["meiji","taisho","showa","heisei","reiwa"];function aK(e){let t=aV.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?aV.length-1:0===t?0:t-1}function aH(e){let t=aW[az.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new ii(e.year+t,e.month,e.day)}class aG extends oH{fromJulianDay(e){let t=super.fromJulianDay(e),r=aK(t);return new ii(this,az[r],t.year-aW[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(aH(e))}balanceDate(e){let t=aH(e),r=aK(t);az[r]!==e.era&&(e.era=az[r],e.year=t.year-aW[r]),this.constrainDate(e)}constrainDate(e){let t=az.indexOf(e.era),r=aU[t];if(null!=r){let[n,o,i]=r,a=n-aW[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=aV[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return az}getYearsInEra(e){let t=az.indexOf(e.era),r=aV[t],n=aV[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(aH(e))}getMinimumMonthInYear(e){let t=aq(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=aq(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function aq(e){if(1===e.year)return aV[az.indexOf(e.era)]}let aZ=[0,31,62,93,124,155,186,216,246,276,306,336];class aY{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-aZ[o]+1;return new ii(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=aZ[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>oB(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function aJ(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function aQ(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class aX extends oH{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=aQ(oW(t.era,t.year));return new ii(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(a0(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=aQ(aJ(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(a0(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function a0(e){let[t,r]=oz(aJ(e));return new ii(t,r,e.month,e.day)}function a1(e){switch(e){case"buddhist":return new ah;case"ethiopic":return new aw;case"ethioaa":return new a_;case"coptic":return new ax;case"hebrew":return new aj;case"indian":return new aA;case"islamic-civil":return new aN;case"islamic-tbla":return new aI;case"islamic-umalqura":return new aB;case"japanese":return new aG;case"persian":return new aY;case"roc":return new aX;default:return new oH}}function a4(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function a2(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=a3(e,t,r).subtract(i);return a5(e,a,t,r,n,o)}function a3(e,t,r,n,o){let i=e;if(t.years)i=iM(e.subtract({months:e.month-1}));else t.months?i=iM(e):t.weeks&&(i=iL(e,r));return a5(e,i,t,r,n,o)}function a6(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=a3(e,t,r).subtract(i);return a5(e,a,t,r,n,o)}function a5(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=iV(t,a3(i_(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=iB(t,a6(i_(i),r,n));e&&(t=e)}return t}function a9(e,t,r){if(t){let r=iV(e,i_(t));r&&(e=r)}if(r){let t=iB(e,i_(r));t&&(e=t)}return e}function a8(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function a7(e,t,r){let[n,o]=(0,e$.useState)(e||t),i=(0,e$.useRef)(void 0!==e),a=void 0!==e;(0,e$.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:n,l=(0,e$.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),a||(s=e)};"function"==typeof e?o((r,...o)=>{let i=e(a?s:r,...o);return(n(i,...t),a)?r:i}):(a||o(e),n(e,...t))},[a,s,r]);return[s,l]}function se(e){var t,r,n;let o=(0,e$.useMemo)(()=>new iQ(e.locale),[e.locale]),i=(0,e$.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:f,pageBehavior:p="visible",firstDayOfWeek:h}=e,m=(0,e$.useMemo)(()=>s(i.calendar),[s,i.calendar]),[y,v]=a7(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),g=(0,e$.useMemo)(()=>y?iE(i_(y),m):null,[y,m]),b=(0,e$.useMemo)(()=>y&&"timeZone"in y?y.timeZone:i.timeZone,[y,i.timeZone]),[w,x]=a7((0,e$.useMemo)(()=>e.focusedValue?a9(iE(i_(e.focusedValue),m),u,c):void 0,[e.focusedValue,m,u,c]),(0,e$.useMemo)(()=>a9(e.defaultFocusedValue?iE(i_(e.defaultFocusedValue),m):g||iE(ik(b),m),u,c),[e.defaultFocusedValue,g,b,m,u,c]),e.onFocusChange),[E,S]=(0,e$.useState)(()=>{switch(d){case"start":return a3(w,l,a,u,c);case"end":return a6(w,l,a,u,c);default:return a2(w,l,a,u,c)}}),[D,O]=(0,e$.useState)(e.autoFocus||!1),P=(0,e$.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,E.add(e)},[E,l]),[C,j]=(0,e$.useState)(m);if(!iP(m,C)){let e=iE(w,m);S(a2(e,l,a,u,c)),x(e),j(m)}function A(e){x(e=a9(e,u,c))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void v(null);(e=a8(e=a9(e,u,c),E,f))&&(e=iE(e,(null==y?void 0:y.calendar)||new oH),y&&"hour"in y?v(y.set(e)):v(e))}}a4(w,u,c)?x(a9(w,u,c)):0>w.compare(E)?S(a6(w,l,a,u,c)):w.compare(P)>0&&S(a3(w,l,a,u,c));let T=(0,e$.useMemo)(()=>!!g&&(!!(f&&f(g))||a4(g,u,c)),[g,f,u,c]),R=e.isInvalid||"invalid"===e.validationState||T,N=(0,e$.useMemo)(()=>"visible"===p?l:st(l),[p,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:g,setValue:k,visibleRange:{start:E,end:P},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:R?"invalid":null,isValueInvalid:R,setFocusedDate(e){A(e),O(!0)},focusNextDay(){A(w.add({days:1}))},focusPreviousDay(){A(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&A(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&A(w.subtract({weeks:1}))},focusNextPage(){let e=E.add(N);x(a9(w.add(N),u,c)),S(a3(a5(w,e,N,a,u,c),N,a))},focusPreviousPage(){let e=E.subtract(N);x(a9(w.subtract(N),u,c)),S(a3(a5(w,e,N,a,u,c),N,a))},focusSectionStart(){l.days?A(E):l.weeks?A(iL(w,a)):(l.months||l.years)&&A(iM(w))},focusSectionEnd(){l.days?A(P):l.weeks?A(iL(w,a,void 0).add({days:6})):(l.months||l.years)&&A(i$(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?A(w.add({months:1})):(l.months||l.years)&&A(w.add({years:1})):A(w.add(st(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?A(w.subtract({months:1})):(l.months||l.years)&&A(w.subtract({years:1})):A(w.subtract(st(l)))},selectFocusedDate(){f&&f(w)||k(w)},selectDate(e){k(e)},isFocused:D,setFocused:O,isInvalid:e=>a4(e,u,c),isSelected(e){return null!=g&&iD(e,g)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>D&&w&&iD(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(E)||t.compare(P)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=E.subtract({days:1});return iD(e,E)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=P.add({days:1});return iD(e,P)||this.isInvalid(e)},getDatesInWeek(e,t=E){let r=t.add({weeks:e}),n=[],o=ij(r=iL(r,a,h),a,h);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(iD(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function st(e){let t={...e};for(let r in e)t[r]=1;return t}function sr(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:i_(e),end:i_(t)}):null}function sn(e,t){return(e=iE(e,(null==t?void 0:t.calendar)||new oH),t&&"hour"in t)?t.set(e):e}function so(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let si=(0,e$.createContext)(null),sa=(0,e$.createContext)(null),ss=(0,e$.createContext)(null),sl=(0,e$.createContext)(null),su=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,si);let{locale:r}=oL(),n=se({...e,locale:r,createCalendar:e.createCalendar||a1}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=an(e,n),u=rJ({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return eL().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},eL().createElement(rY,{values:[[ox,{slots:{previous:i,next:a}}],[oS,{"aria-hidden":!0,level:2,children:l}],[ss,n],[si,e],[oD,{slots:{errorMessage:s}}]]},eL().createElement(ai,null,eL().createElement("h2",null,o["aria-label"])),u.children,eL().createElement(ai,null,eL().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),sc=(0,e$.forwardRef)(function(e,t){var r,n;let o,i,a;[e,t]=rX(e,t,sa);let{locale:s}=oL(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=a7(t,r||null,n),[f,p]=(0,e$.useState)(null),h="center";if(c&&c.start&&c.end){let e=a2(i_(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,e$.useRef)(null),[y,v]=(0,e$.useState)(null),g=(0,e$.useMemo)(()=>iV(s,null==y?void 0:y.start),[s,y]),b=(0,e$.useMemo)(()=>iB(l,null==y?void 0:y.end),[l,y]),w=se({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:g,maxValue:b,selectionAlignment:h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:so(t,w,-1),end:so(t,w,1)},v(m.current)):(m.current=null,v(null))},[E,S]=(0,e$.useState)(w.visibleRange);iO(w.visibleRange.start,E.start)&&iO(w.visibleRange.end,E.end)||(x(f),S(w.visibleRange));let D=e=>{e?(p(e),x(e)):(p(null),x(null))},O=f?sr(f,w.focusedDate):c&&sr(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=a8(a9(t,g,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=sr(f,r);e&&d({start:sn(e.start,null==c?void 0:c.start),end:sn(e.end,null==c?void 0:c.end)}),D(null)}else D(r)},[C,j]=(0,e$.useState)(!1),{isDateUnavailable:A}=e,k=(0,e$.useMemo)(()=>!!c&&!f&&(!!(A&&(A(c.start)||A(c.end)))||a4(c.start,s,l)||a4(c.end,s,l)),[A,c,f,s,l]),T=e.isInvalid||"invalid"===e.validationState||k;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:D,highlightedRange:O,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||a4(e,null==(t=m.current)?void 0:t.start,null==(r=m.current)?void 0:r.end)},isDragging:C,setDragging:j}}({...e,locale:s,createCalendar:e.createCalendar||a1}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:f,title:p}=(r=e,n=t,o=an(r,l),i=(0,e$.useRef)(!1),aa(a=(0,e$.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),aa(a,"pointerup",e=>{if(i.current){i.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},aa(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=rJ({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return eL().createElement("div",{...h,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},eL().createElement(rY,{values:[[ox,{slots:{previous:c,next:d}}],[oS,{"aria-hidden":!0,level:2,children:p}],[sl,l],[sa,e],[oD,{slots:{errorMessage:f}}]]},eL().createElement(ai,null,eL().createElement("h2",null,u["aria-label"])),h.children,eL().createElement(ai,null,eL().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),sd=(0,e$.createContext)(null),sf=(0,e$.forwardRef)(function(e,t){var r,n;let o=(0,e$.useContext)(ss),i=(0,e$.useContext)(sl),a=rQ(si),s=rQ(sa),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=oL(),s=i7(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=i9.get(t),c=ar({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=i3({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=oL(),p=(0,e$.useMemo)(()=>{let e=iL(ik(t.timeZone),f,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((ij(iM(n),f,i)+r)/7));return{gridProps:rq(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:p,weeksInMonth:h}}({startDate:u,endDate:i$(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return eL().createElement(sd.Provider,{value:{headerProps:f,weekDays:p,startDate:u,weeksInMonth:h}},eL().createElement("table",{...ne(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:eL().createElement(eL().Fragment,null,eL().createElement(sp,null,e=>eL().createElement(sh,null,e)),eL().createElement(sm,null,e.children))))}),sp=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,e$.useContext)(sd);return eL().createElement("thead",{...ne(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},eL().createElement("tr",null,a.map((e,t)=>eL().cloneElement(r(e),{key:t}))))}),sh=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return eL().createElement("th",{...ne(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),sm=(0,e$.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,e$.useContext)(ss),a=(0,e$.useContext)(sl),s=null!=i?i:a,{startDate:l,weeksInMonth:u}=(0,e$.useContext)(sd);return eL().createElement("tbody",{...ne(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>eL().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?eL().cloneElement(r(e),{key:t}):eL().createElement("td",{key:t})))))}),sy=(0,e$.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,e$.useContext)(ss),s=(0,e$.useContext)(sl),l=null!=a?a:s,{startDate:u}=null!=(n=(0,e$.useContext)(sd))?n:{startDate:l.visibleRange.start},c=(0,e$.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=i9.get(t),u=iY((n=oF)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=i3({weekday:"long",day:"numeric",month:"long",year:"numeric",era:i8(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i);a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&iD(t.value,i));m&&(d=!0),i=i2(i,iO);let y=(0,e$.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),v=iD(i,ik(t.timeZone)),g=(0,e$.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(iD(i,t.value.start)||iD(i,t.value.end))&&(e=l+", "),e+=c.format(y),v?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&iD(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&iD(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,v,i,t,l]),b="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=au(b),x=(0,e$.useRef)(!1),E=(0,e$.useRef)(!1),S=(0,e$.useRef)(void 0),{pressProps:D,isPressed:O}=nq({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(i);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(iD(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}else if(iD(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});a||(o=iD(i,t.focusedDate)?0:-1),(0,e$.useEffect)(()=>{f&&r.current&&(nl(r.current),"pointer"!==n1&&document.activeElement===r.current&&af(r.current,{containingElement:ap(r.current)}))},[f,r]);let P=i3({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),C=(0,e$.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:rq(D,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":g,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:C}}({date:e},l,c),{hoverProps:h,isHovered:m}=og({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:v}=op();v&&(v=p.isFocused);let g=(o=u,i=iE(i=e,o.calendar),o=iM(o),i=iM(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=iD(e,l.highlightedRange.start),w=iD(e,l.highlightedRange.end));let x=rJ({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:g,isFocusVisible:v,isSelectionStart:b,isSelectionEnd:w,...p}}),E={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":v||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":g||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return eL().createElement("td",{...d,ref:r},eL().createElement("div",{...rq(ne(t),f,y,h,E,x),ref:c}))}),sv=(0,e$.createContext)({}),sg=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,sv);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=og({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=op({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=rJ({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return eL().createElement("div",{...rq(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),sb=(0,e$.createContext)({}),sw=ow(function(e,t){[e,t]=rX(e,t,sb);let{hoverProps:r,isHovered:n}=og(e),{isFocused:o,isFocusVisible:i,focusProps:a}=op({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=rJ({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return eL().createElement("input",{...rq((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var s_={};s_={"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 sx=eL().createContext(null),sE="react-aria-focus-scope-restore",sS=null;function sD(e){var t,r,n,o,i,a,s,l,u,c;let d,f,p,h,{children:m,contain:y,restoreFocus:v,autoFocus:g}=e,b=(0,e$.useRef)(null),w=(0,e$.useRef)(null),x=(0,e$.useRef)([]),{parentNode:E}=(0,e$.useContext)(sx)||{},S=(0,e$.useMemo)(()=>new sB({scopeRef:x}),[x]);rT(()=>{let e=E||sV.root;if(sV.getTreeNode(e.scopeRef)&&sS&&!sA(sS,e.scopeRef)){let t=sV.getTreeNode(sS);t&&(e=t)}e.addChild(S),sV.addNode(S)},[S,E]),rT(()=>{let e=sV.getTreeNode(x);e&&(e.contain=!!y)},[y]),rT(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(sE,n),t=t.nextSibling;return x.current=r,()=>{for(let e of r)e.removeEventListener(sE,n)}},[m]),rT(()=>{if(r||n)return;let e=t.current,o=na(e?e[0]:void 0),i=e=>{let r=nB(e);sC(r,t.current)?sS=t:sj(r)||(sS=null)};return o.addEventListener("focusin",i,!1),null==e||e.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=v,n=y]),o=x,i=y,d=(0,e$.useRef)(void 0),f=(0,e$.useRef)(void 0),rT(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=na(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!sP(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!sC(r,n))return;let i=sM(sO(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&sk(a,!0)},n=e=>{(!sS||sA(sS,o))&&sC(nB(e),o.current)?(sS=o,d.current=nB(e)):sP(o)&&!sj(nB(e),o)?d.current?d.current.focus():sS&&sS.current&&sR(sS.current):sP(o)&&(d.current=nB(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=n1,n=("virtual"===r||null===r)&&nE()&&nx(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&sP(o)&&!sj(i,o)){sS=o;let t=nB(e);if(t&&t.isConnected){var a;d.current=t,null==(a=d.current)||a.focus()}else sS.current&&sR(sS.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),rT(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=v,l=y,p=(0,e$.useRef)("u">typeof document?((e=document)=>e.activeElement)(na(a.current?a.current[0]:void 0)):null),rT(()=>{let e=a.current,t=na(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!sS||sA(sS,a))&&sC(((e=document)=>e.activeElement)(t),a.current)&&(sS=a)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,l]),rT(()=>{let e=na(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!sP(a)||t.isComposing)return;let r=e.activeElement;if(!sj(r,a)||!sN(a))return;let n=sV.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=sM(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!sj(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(sj(s,a));(t.preventDefault(),t.stopPropagation(),s)?sk(s,!0):sj(o)?sk(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),rT(()=>{var e;let t=na(a.current?a.current[0]:void 0);if(!s)return;let r=sV.getTreeNode(a);if(r)return r.nodeToRestore=null!=(e=p.current)?e:void 0,()=>{let e=sV.getTreeNode(a);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&sj(n,a)||n===t.body&&sN(a))){let e=sV.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void sI(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&sV.getTreeNode(t.scopeRef))return void sI(sT(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),u=x,c=g,h=eL().useRef(c),(0,e$.useEffect)(()=>{h.current&&(sS=u,!sC(((e=document)=>e.activeElement)(na(u.current?u.current[0]:void 0)),sS.current)&&u.current&&sR(u.current)),h.current=!1},[u]),(0,e$.useEffect)(()=>{let e=((e=document)=>e.activeElement)(na(x.current?x.current[0]:void 0)),t=null;if(sC(e,x.current)){for(let r of sV.traverse())r.scopeRef&&sC(e,r.scopeRef.current)&&(t=r);t===sV.getTreeNode(x)&&(sS=t.scopeRef)}},[x]),rT(()=>()=>{var e,t,r;let n=null!=(r=null==(t=sV.getTreeNode(x))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(x===sS||sA(x,sS))&&(!n||sV.getTreeNode(n))&&(sS=n),sV.removeTreeNode(x)},[x]);let D=(0,e$.useMemo)(()=>{var e;return e=x,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(na(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=sM(sO(n),{tabbable:i,accept:s},n);c.currentNode=sC(l,n)?l:u;let d=c.nextNode();return!d&&a&&(c.currentNode=u,d=c.nextNode()),d&&sk(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(na(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=sM(sO(n),{tabbable:i,accept:s},n);c.currentNode=sC(l,n)?l:u;let d=c.previousNode();return!d&&a&&(c.currentNode=u,d=c.previousNode()),d&&sk(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=sM(sO(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&sk(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=sM(sO(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&sk(a,!0),a}}},[]),O=(0,e$.useMemo)(()=>({focusManager:D,parentNode:S}),[S,D]);return eL().createElement(sx.Provider,{value:O},eL().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),m,eL().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function sO(e){return e[0].parentElement}function sP(e){let t=sV.getTreeNode(sS);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function sC(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function sj(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of sV.traverse(sV.getTreeNode(t)))if(r&&sC(e,r.current))return!0;return!1}function sA(e,t){var r;let n=null==(r=sV.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function sk(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{os(e)}catch{}}function sT(e,t=!0){let r=e[0].previousElementSibling,n=sO(e),o=sM(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=sM(n=sO(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function sR(e,t=!0){sk(sT(e,t))}function sN(e){let t=sV.getTreeNode(sS);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function sI(e){e.dispatchEvent(new CustomEvent(sE,{bubbles:!0,cancelable:!0}))&&sk(e)}function sM(e,t,r){var n,o,i;let a=(null==t?void 0:t.tabbable)?ni:no,s=na((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=ns(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||sC(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function s$(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(na(n)),u=sM(n,{tabbable:i,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&sk(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(na(n)),u=sM(n,{tabbable:i,accept:s});if(n.contains(l))u.currentNode=l;else{let e=sL(u);return e&&sk(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=sL(u);if(!e)return null;c=e}return c&&sk(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=sM(n,{tabbable:o,accept:i}).nextNode();return a&&sk(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=sL(sM(n,{tabbable:o,accept:i}));return a&&sk(a,!0),null!=a?a:null}}}function sL(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class sF{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new sB({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&sC(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new sF;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new sB({scopeRef:null}),this.fastMap.set(null,this.root)}}class sB{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 sV=new sF;function sU(e,t,r){let{direction:n}=oL(),o=(0,e$.useMemo)(()=>s$(t),[t]),i=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=sM(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:a}=nq({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return rq(a,{onKeyDown:i=>{if(i.currentTarget.contains(i.target)&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=sW(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=i.target,r=sW(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function sW(e,t,r){let n=sM(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function sz(e,t,r){let n=(0,e$.useRef)(t),o=rR(()=>{r&&r(n.current)});(0,e$.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function sK(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=rK(t);let a=rK(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:ar({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=rH([!!t,!!r,n,o]),l=rH([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=rq(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function sH(e,t,r){let{validationBehavior:n,focus:o}=e;rT(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=rR(()=>{t.resetValidation()}),a=rR(e=>{var n,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&a&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(a)===r.current&&(o?o():null==(i=r.current)||i.focus(),n1="keyboard",n9("keyboard",null)),e.preventDefault()}),s=rR(()=>{t.commitValidation()});(0,e$.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",a),e.addEventListener("change",s),null==t||t.addEventListener("reset",i),()=>{e.removeEventListener("invalid",a),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",i)}},[r,a,s,i,n])}let sG=new WeakMap,sq="__role_"+Date.now(),sZ="__focusManager_"+Date.now();function sY(e,t,r){var n,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=sK({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),p=(0,e$.useRef)(null),{focusWithinProps:h}=of({...e,onFocusWithin(r){var n;p.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),m=iY((o=s_)&&o.__esModule?o.default:o,"@react-aria/datepicker"),y="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",v="hour"===t.maxGranularity?"time":"date",g=au(t.value?m.format(y,{[v]:t.formatValue({month:"long"})}):""),b="presentation"===e[sq]?c["aria-describedby"]:[g["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[sZ],x=(0,e$.useMemo)(()=>w||s$(r),[w,r]),E=sU(t,r,"presentation"===e[sq]);sG.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:x});let S=(0,e$.useRef)(e.autoFocus);i="presentation"===e[sq]?{role:"presentation"}:rq(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,e$.useEffect)(()=>{S.current&&x.focusFirst(),S.current=!1},[x]),sz(e.inputRef,t.value,t.setValue),sH({...e,focus(){x.focusFirst()}},t,e.inputRef);let D={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(D.type="text",D.hidden=!0,D.required=e.isRequired,D.onChange=()=>{});let O=ne(e);return{labelProps:{...u,onClick:()=>{x.focusFirst()}},fieldProps:rq(O,i,E,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:D,descriptionProps:d,errorMessageProps:f,isInvalid:a,validationErrors:s,validationDetails:l}}var sJ={};sJ={"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 sQ={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},sX={...sQ,customError:!0,valid:!1},s0={isInvalid:!1,validationDetails:sQ,validationErrors:[]},s1=(0,e$.createContext)({}),s4="__formValidationState"+Date.now();function s2(e){if(e[s4]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[s4];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:sX}:null,u=(0,e$.useMemo)(()=>a&&null!=o?s6(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return s3(r)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let c=(0,e$.useContext)(s1),d=(0,e$.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>s3(c[e])):s3(c[n]):[],[c,n]),[f,p]=(0,e$.useState)(c),[h,m]=(0,e$.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,e$.useMemo)(()=>s6(h?[]:d),[h,d]),v=(0,e$.useRef)(s0),[g,b]=(0,e$.useState)(s0),w=(0,e$.useRef)(s0),[x,E]=(0,e$.useState)(!1);return(0,e$.useEffect)(()=>{if(!x)return;E(!1);let e=u||i||v.current;s5(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||y||u||i||s0,displayValidation:"native"===s?l||y||g:l||y||u||i||g,updateValidation(e){"aria"!==s||s5(g,e)?v.current=e:b(e)},resetValidation(){s5(s0,w.current)||(w.current=s0,b(s0)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function s3(e){return e?Array.isArray(e)?e:[e]:[]}function s6(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:sX}:null}function s5(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function s9(...e){let t=new Set,r=!1,n={...sQ};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let s8=new iz((u=sJ)&&u.__esModule?u.default:u);function s7(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function le(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=i||a||s,u=[];if(l){let e=s7(),n=new iG(e,iz.getGlobalDictionaryForPackage("@react-stately/datepicker")||s8),l=new iQ(e,ln({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let lt={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},lr={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ln(e,t){var r;e={...t.shouldForceLeadingZeros?lr:lt,...e};let n=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(r=t.maxGranularity)?r:"year");i<0&&(i=0);let a=o.indexOf(n);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===i&&(s.era="short"),s}function lo(e){return e&&"hour"in e?e:new is}function li(e,t){return null===e?null:e?iE(e,t):void 0}function la(e,t,r,n){if(e)return li(e,r);let o=iE(iA(null!=n?n:iI()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?i_(o):n?o:ix(o)}function ls(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,e$.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let ll=new iz({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"),lu={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},lc={year:5,month:2,day:7,hour:2,minute:15,second:15},ld={dayperiod:"dayPeriod"};function lf(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,f=e.value||e.defaultValue||e.placeholderValue||null,[p,h]=ls(f,e.granularity),m=h||"UTC";if(f&&!(p in f))throw Error("Invalid granularity "+p+" for value "+f.toString());let y=(0,e$.useMemo)(()=>new iQ(n),[n]),v=(0,e$.useMemo)(()=>o(y.resolvedOptions().calendar),[o,y]),[g,b]=a7(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,e$.useMemo)(()=>{var e;return null!=(e=li(g,v))?e:null},[g,v]),[x,E]=(0,e$.useState)(()=>la(e.placeholderValue,p,v,h)),S="gregory"===v.identifier&&"BC"===(w||x).era,D=(0,e$.useMemo)(()=>{var t;return{granularity:p,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,p,e.hourCycle,e.shouldForceLeadingZeros,h,i,S]),O=(0,e$.useMemo)(()=>ln({},D),[D]),P=(0,e$.useMemo)(()=>new iQ(n,O),[n,O]),C=(0,e$.useMemo)(()=>P.resolvedOptions(),[P]),j=(0,e$.useMemo)(()=>P.formatToParts(new Date).filter(e=>lu[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[P]),[A,k]=(0,e$.useState)(()=>e.value||e.defaultValue?{...j}:{}),T=(0,e$.useRef)(null),R=(0,e$.useRef)(v);(0,e$.useEffect)(()=>{iP(v,R.current)||(R.current=v,E(t=>Object.keys(A).length>0?iE(t,v):la(e.placeholderValue,p,v,h)))},[v,p,A,h,e.placeholderValue]),g&&Object.keys(A).length<Object.keys(j).length&&k(A={...j}),null==g&&Object.keys(A).length===Object.keys(j).length&&(k(A={}),E(la(e.placeholderValue,p,v,h)));let N=w&&Object.keys(A).length>=Object.keys(j).length?w:x,I=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(A),n=Object.keys(j);null==t?(b(null),E(la(e.placeholderValue,p,v,h)),k({})):r.length>=n.length||r.length===n.length-1&&j.dayPeriod&&!A.dayPeriod&&"dayPeriod"!==T.current?b(t=iE(t,(null==f?void 0:f.calendar)||new oH)):E(t),T.current=null},M=(0,e$.useMemo)(()=>N.toDate(m),[N,m]),$=(0,e$.useMemo)(()=>(function(e,t,r,n,o,i,a,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,f;let r=lu[e.type];"era"===e.type&&1===i.getEras().length&&(r=!1);let u=lu[e.type]&&!t[e.type],p=lu[e.type]?(d=e.type,f=e.value,"era"===d||"dayPeriod"===d?f:"year"===d||"month"===d||"day"===d?ll.getStringForLocale(d,a):"––"):null,h={type:ld[e.type]||e.type,text:u?p:e.value,...lp(o,e.type,n),isPlaceholder:u,placeholder:p,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(h),e.type===s&&c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(h),c.push({type:"literal",text:"",...lp(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(h)}return c})(M,A,P,C,N,v,n,p),[M,A,P,C,N,v,n,p]);j.era&&A.year&&!A.era?(A.era=!0,k({...A})):!j.era&&A.era&&(delete A.era,k({...A}));let L=e=>{A[e]=!0,"year"===e&&j.era&&(A.era=!0),k({...A})},F=(e,t)=>{if(A[e])I(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(N,e,t,C));else{L(e);let t=Object.keys(A),r=Object.keys(j);(t.length>=r.length||t.length===r.length-1&&j.dayPeriod&&!A.dayPeriod)&&I(N)}},B=(0,e$.useMemo)(()=>le(g,u,c,d,D),[g,u,c,d,D]),V=s2({...e,value:g,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:w,dateValue:M,calendar:v,setValue:I,segments:$,dateFormatter:P,validationState:W,isInvalid:U,granularity:p,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,lc[e]||1)},decrementPage(e){F(e,-(lc[e]||1))},setSegment(e,t){L(e),I(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(N,e,t,C))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(A),r=Object.keys(j);t.length===r.length-1&&j.dayPeriod&&!A.dayPeriod&&(k(A={...j}),I(N.copy()))},clearSegment(t){delete A[t],T.current=t,k({...A});let r=la(e.placeholderValue,p,v,h),n=N;if("dayPeriod"===t&&"hour"in N&&"hour"in r){let e=N.hour>=12,t=r.hour>=12;e&&!t?n=N.set({hour:N.hour-12}):!e&&t&&(n=N.set({hour:N.hour+12}))}else"hour"===t&&"hour"in N&&N.hour>=12&&A.dayPeriod?n=N.set({hour:r.hour+12}):t in N&&(n=N.set({[t]:r[t]}));b(null),I(n)},formatValue:e=>w?new iQ(n,ln(e,D)).format(M):"",getDateFormatter:(e,t)=>new iQ(e,ln({},{...D,...t}))}}function lp(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.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(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?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 lh=(0,e$.createContext)(null),lm=(0,e$.createContext)(null),ly=(0,e$.createContext)(null),lv=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(lm),n=(0,e$.useContext)(ly);return r||n?eL().createElement(lb,{...e,ref:t}):eL().createElement(lg,{...e,ref:t})}),lg=(0,e$.forwardRef)((e,t)=>{let[r,n]=rX({slot:e.slot},t,lh),{locale:o}=oL(),i=lf({...r,locale:o,createCalendar:a1}),a=(0,e$.useRef)(null),{fieldProps:s,inputProps:l}=sY({...r,inputRef:a},i,n);return eL().createElement(rY,{values:[[lm,i],[sb,{...l,ref:a}],[sv,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},eL().createElement(lb,e))}),lb=(0,e$.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,e$.useContext)(lm),i=(0,e$.useContext)(ly),a=null!=o?o:i;return eL().createElement(eL().Fragment,null,eL().createElement(sg,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,e$.cloneElement)(n(e),{key:t}))),eL().createElement(sw,null))}),lw=(0,e$.createContext)({});function l_({children:e}){let t=(0,e$.useMemo)(()=>({register:()=>{}}),[]);return eL().createElement(nR.Provider,{value:t},e)}eL().forwardRef(({children:e,...t},r)=>{let n=(0,e$.useRef)(!1),o=(0,e$.useContext)(nR);r=rA(r||(null==o?void 0:o.ref));let i=rq(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return n$(o,r),(0,e$.useEffect)(()=>{n.current||(n.current=!0)},[]),eL().createElement(nR.Provider,{value:i},e)});let lx=eL().createContext(null);function lE(e){var t;let r=rU(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[i,a]=(0,e$.useState)(!1),s=(0,e$.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,e$.useContext)(lw))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=eL().createElement(sD,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},u)),u=eL().createElement(lx.Provider,{value:s},eL().createElement(l_,null,u)),nz().createPortal(u,n)}let lS=(0,e$.createContext)(null),lD=(0,e$.createContext)(null),lO=(0,e$.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=rX(e,t,lS);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=rH();i=e["aria-label"]?void 0:i;let a=(0,e$.useRef)(!1);return(0,e$.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){os(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),os(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),rT(()=>{null==n||n(!0)},[n=null==(r=(0,e$.useContext)(lx))?void 0:r.setContain]),{dialogProps:{...ne(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,e$.useContext)(lD);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=rJ({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return eL().createElement("section",{...ne(e),...n,...a,ref:t,slot:e.slot||void 0},eL().createElement(rY,{values:[[oS,{slots:{[rZ]:{},title:{...o,level:2}}}],[ox,{slots:{[rZ]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),lP=(0,e$.createContext)(null),lC=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(lP);return(null==r?void 0:r.isInvalid)?eL().createElement(lj,{...e,ref:t}):null}),lj=(0,e$.forwardRef)((e,t)=>{let r=(0,e$.useContext)(lP),n=ne(e),o=rJ({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:eL().createElement(oO,{slot:"errorMessage",...n,...o,ref:t})}),lA=(0,e$.createContext)(null),lk=(0,e$.createContext)({}),lT=ow(function(e,t){[e,t]=rX(e,t,lk);let{elementType:r="label",...n}=e;return eL().createElement(r,{className:"react-aria-Label",...n,ref:t})}),lR=(0,e$.createContext)({placement:"bottom"}),lN=new WeakMap,lI=[];function lM(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function l$(e,t){let r=e,n=t.toString(),o=n.indexOf("."),i=o>=0?n.length-o:0;if(i>0){let e=Math.pow(10,i);r=Math.round(r*e)/e}return r}function lL(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=l$(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(l$(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(l$((r-t)/n,n))*n),i=l$(i,n)}let lF={top:"top",bottom:"top",left:"left",right:"left"},lB={top:"bottom",bottom:"top",left:"right",right:"left"},lV={top:"left",left:"top"},lU={top:"height",left:"width"},lW={width:"totalWidth",height:"totalHeight"},lz={},lK="u">typeof document?window.visualViewport:null;function lH(e){var t,r,n,o,i;let a=0,s=0,l=0,u=0,c=0,d=0,f={},p=(null!=(t=null==lK?void 0:lK.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,a=null!=(r=null==lK?void 0:lK.width)?r:l,s=null!=(n=null==lK?void 0:lK.height)?n:u,f.top=t.scrollTop||e.scrollTop,f.left=t.scrollLeft||e.scrollLeft,lK&&(c=lK.offsetTop,d=lK.offsetLeft)}else({width:a,height:s,top:c,left:d}=lJ(e)),f.top=e.scrollTop,f.left=e.scrollLeft,l=a,u=s;return n_()&&("BODY"===e.tagName||"HTML"===e.tagName)&&p&&(f.top=0,f.left=0,c=null!=(o=null==lK?void 0:lK.pageTop)?o:0,d=null!=(i=null==lK?void 0:lK.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:u,scroll:f,top:c,left:d}}function lG(e,t,r,n,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[lU[e]],c=n.scroll[lF[e]]+i,d=u+n.scroll[lF[e]]-i,f=t-l+a[e]-n[lF[e]],p=t-l+r+a[e]-n[lF[e]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function lq(e){if(lz[e])return lz[e];let[t,r]=e.split(" "),n=lF[t]||"right",o=lV[n];lF[r]||(r="center");let i=lU[n],a=lU[o];return lz[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},lz[e]}function lZ(e,t,r,n,o,i,a,s,l,u){var c,d,f,p,h;let{placement:m,crossPlacement:y,axis:v,crossAxis:g,size:b,crossSize:w}=n,x={};x[g]=null!=(c=e[g])?c:0,"center"===y?x[g]+=((null!=(d=e[w])?d:0)-(null!=(f=r[w])?f:0))/2:y!==g&&(x[g]+=(null!=(p=e[w])?p:0)-(null!=(h=r[w])?h:0)),x[g]+=i;let E=e[g]-r[w]+l+u,S=e[g]+e[w]-l-u;if(x[g]=lM(x[g],E,S),m===v){let r=s?a[b]:t[lW[b]];x[lB[v]]=Math.floor(r-e[v]+o)}else x[v]=Math.floor(e[v]+e[b]+o);return x}function lY(e,t,r,n,o,i){var a,s,l;let{placement:u,axis:c,size:d}=i;return u===c?Math.max(0,r[c]-e[c]-(null!=(a=e.scroll[c])?a:0)+t[c]-(null!=(s=n[c])?s:0)-n[lB[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[lB[c]]-o)}function lJ(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:r+a-l,width:n,height:o}}function lQ(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:i}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:i}}else{r=lJ(e);let n=lJ(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function lX(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let l0=new WeakMap;function l1(e){let{ref:t,box:r,onResize:n}=e;(0,e$.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let l4="u">typeof document?window.visualViewport:null;function l2(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let l3=[],l6="u">typeof document&&window.visualViewport,l5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),l9=0;function l8(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function l7(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function ue(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=ap(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var ut={};function ur(e){var t;let{onDismiss:r,...n}=e,o=ar(n,iY((t=ut)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return eL().createElement(ai,null,eL().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function un(e,t,r){rT(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,nW.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function uo(e){let[t,r]=a7(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,e$.useCallback)(()=>{r(!0)},[r]),o=(0,e$.useCallback)(()=>{r(!1)},[r]),i=(0,e$.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}ut={"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 ui=(0,e$.createContext)(null),ua=(0,e$.createContext)(null),us=(0,e$.forwardRef)(function(e,t){[e,t]=rX(e,t,ui);let r=(0,e$.useContext)(lD),n=uo(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,e$.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return un(e,o,(0,e$.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,e$.useContext)(ob),{direction:s}=oL();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),eL().createElement(eL().Fragment,null,t)}return!o||o.isOpen||i?eL().createElement(ul,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function ul({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let s=(0,e$.useRef)(null),[l,u]=(0,e$.useState)(0),c=(0,e$.useRef)(null),d=(0,e$.useContext)(ua),f=d&&"SubmenuTrigger"===n.trigger;rT(()=>{s.current&&e.isOpen&&u(s.current.getBoundingClientRect().width)},[e.isOpen,s]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l,...u}=e,c="SubmenuTrigger"===u.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,e$.useEffect)(()=>{if(o&&!l3.includes(t))return l3.push(t),()=>{let e=l3.indexOf(t);e>=0&&l3.splice(e,1)}},[o,t]);let l=()=>{l3[l3.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,e$.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=rR(e=>{r&&l2(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=rR(e=>{r&&r(e)});(0,e$.useEffect)(()=>{let e=i.current;if(n)return;let r=na(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&l2(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(l3[l3.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&l3[l3.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=of({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||sj(e.relatedTarget,sS))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||c,isKeyboardDismissDisabled:s,shouldCloseOnInteractOutside:l},null!=o?o:n),{overlayProps:p,arrowProps:h,placement:m}=function(e){var t,r,n;let{direction:o}=oL(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:f="u">typeof document?document.body:null,offset:p=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:y=!0,onClose:v,maxHeight:g,arrowBoundaryOffset:b=0}=e,[w,x]=(0,e$.useState)(null),E=[m,u,s.current,a.current,l.current,c,d,f,p,h,y,o,g,b,i],S=(0,e$.useRef)(null==l4?void 0:l4.scale);(0,e$.useEffect)(()=>{y&&(S.current=null==l4?void 0:l4.scale)},[y]);let D=(0,e$.useCallback)(()=>{var e,t,r,n,v,w;if(!1===m||!y||!s.current||!a.current||!f||(null==l4?void 0:l4.scale)!==S.current)return;let E=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(E={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(E.type="bottom",E.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let D=s.current;!g&&s.current&&(D.style.top="0px",D.style.bottom="",D.style.maxHeight=(null!=(v=null==(n=window.visualViewport)?void 0:n.height)?v:window.innerHeight)+"px");let O=function(e){var t,r,n,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:h,maxHeight:m,arrowSize:y=0,arrowBoundaryOffset:v=0}=e,g=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!lX(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!lX(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=g===document.documentElement,w=window.getComputedStyle(g).position,x=b?lJ(s):lQ(s,g);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);x.top+=parseInt(e,10)||0,x.left+=parseInt(t,10)||0}let E=lJ(l),S={top:parseInt((i=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(i.marginBottom,10)||0,left:parseInt(i.marginLeft,10)||0,right:parseInt(i.marginRight,10)||0};E.width+=(null!=(t=S.left)?t:0)+(null!=(r=S.right)?r:0),E.height+=(null!=(n=S.top)?n:0)+(null!=(o=S.bottom)?o:0);let D={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},O=lH(f),P=lH(g),C="BODY"===f.tagName?lJ(g):lQ(g,f);return"HTML"===g.tagName&&"BODY"===f.tagName&&(P.scroll.top=0,P.scroll.left=0),function(e,t,r,n,o,i,a,s,l,u,c,d,f,p,h,m){var y,v,g,b,w,x,E,S,D,O,P,C,j,A;let k,T,R,N=lq(e),{size:I,crossAxis:M,crossSize:$,placement:L,crossPlacement:F}=N,B=lZ(t,s,r,N,c,d,u,f,h,m),V=c,U=lY(s,u,t,o,i+c,N);if(a&&n[I]>U){let e=lq(`${lB[L]} ${F}`),n=lZ(t,s,r,e,c,d,u,f,h,m);lY(s,u,t,o,i+c,e)>U&&(N=e,B=n,V=c)}let W="bottom";"top"===N.axis?"top"===N.placement?W="top":"bottom"===N.placement&&(W="bottom"):"top"===N.crossAxis&&("top"===N.crossPlacement?W="bottom":"bottom"===N.crossPlacement&&(W="top"));let z=lG(M,B[M],r[$],s,l,i,u);B[M]+=z;let K=(w=B,x=r.height,E=W,k=f?u.height:s[lW.height],T=null!=w.top?u.top+w.top:u.top+(k-(null!=(S=w.bottom)?S:0)-x),R="top"!==E?Math.max(0,s.height+s.top+(null!=(D=s.scroll.top)?D:0)-T-((null!=(O=o.top)?O:0)+(null!=(P=o.bottom)?P:0)+i)):Math.max(0,T+x-(s.top+(null!=(C=s.scroll.top)?C:0))-((null!=(j=o.top)?j:0)+(null!=(A=o.bottom)?A:0)+i)),Math.min(s.height-2*i,R));p&&p<K&&(K=p),r.height=Math.min(r.height,K),z=lG(M,(B=lZ(t,s,r,N,V,d,u,f,h,m))[M],r[$],s,l,i,u),B[M]+=z;let H={},G=t[M]+.5*t[$]-B[M]-o[lF[M]],q=h/2+m,Z="left"===lF[M]?(null!=(y=o.left)?y:0)+(null!=(v=o.right)?v:0):(null!=(g=o.top)?g:0)+(null!=(b=o.bottom)?b:0),Y=r[$]-Z-h/2-m,J=lM(G,t[M]+h/2-(B[M]+o[lF[M]]),t[M]+t[$]-h/2-(B[M]+o[lF[M]]));return H[M]=lM(J,q,Y),{position:B,maxHeight:K,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:N.placement}}(a,x,E,D,S,c,d,O,P,C,p,h,!!w&&"static"!==w,m,y,v)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:f,offset:p,crossOffset:h,maxHeight:g,arrowSize:i,arrowBoundaryOffset:b});if(O.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(O.position).forEach(e=>D.style[e]=O.position[e]+"px"),D.style.maxHeight=null!=O.maxHeight?O.maxHeight+"px":"",E&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[E.type]-t[E.type];l.current.scrollTop+=r-E.offset}x(O)}},E);rT(D,E),rT(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=D]),l1({ref:s,onResize:D}),l1({ref:a,onResize:D});let O=(0,e$.useRef)(!1);rT(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),D()},r=()=>{O.current&&t()};return null==l4||l4.addEventListener("resize",t),null==l4||l4.addEventListener("scroll",r),()=>{null==l4||l4.removeEventListener("resize",t),null==l4||l4.removeEventListener("scroll",r)}},[D]);let P=(0,e$.useCallback)(()=>{O.current||null==v||v()},[v,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,e$.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||l0.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:a,isOpen:y,onClose:v&&P}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:D}}({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;rT(()=>{if(!t){let e,t,r,n;return 1==++l9&&(a=nw()?(r=null,n=rk(l7(document,"touchstart",r=>{((e=ap(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=l8(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),l7(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),l7(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),l7(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!l5.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=rk(l7(window,"scroll",()=>{window.scrollTo(0,0)}),l8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),l8(document.documentElement,"overflow","hidden"),l8(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",l6&&(l6.height<window.innerHeight?requestAnimationFrame(()=>{ue(n)}):l6.addEventListener("resize",()=>ue(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):rk(l8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),l8(document.documentElement,"overflow","hidden"))),()=>{0==--l9&&a()}}},[t])}({isDisabled:i||!t.isOpen}),rT(()=>{if(t.isOpen&&n.current){if(!i)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{var t;let r=null!=(t=lN.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),lN.set(e,r+1))};lI.length&&lI[lI.length-1].disconnect(),o(t);let a=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return lI.push(s),()=>{for(let e of(a.disconnect(),n)){let t=lN.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),lN.delete(e)):lN.set(e,t-1))}s===lI[lI.length-1]?(lI.pop(),lI.length&&lI[lI.length-1].observe()):lI.splice(lI.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,a=null!=(e=null==o?void 0:o.current)?e:n.current;let t=lI[lI.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,n,o]),{popoverProps:rq(d,p),arrowProps:h,underlayProps:f,placement:m}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:l,groupRef:f?d:c},e),v=n.popoverRef,g=function(e,t=!0){let[r,n]=(0,e$.useState)(!0),o=r&&t;return rT(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),un(e,o,(0,e$.useCallback)(()=>n(!1),[])),o}(v,!!y)||n.isEntering||!1,b=rJ({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:g,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,e$.useState)(!1);rT(()=>{v.current&&E(w&&!v.current.querySelector("[role=dialog]"))},[v,w]),(0,e$.useEffect)(()=>{x&&v.current&&!v.current.contains(document.activeElement)&&os(v.current)},[x,v]);let S={...p.style,...b.style},D=eL().createElement("div",{...rq(ne(n),p),...b,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:v,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":g||void 0,"data-exiting":t||void 0},!n.isNonModal&&eL().createElement(ur,{onDismiss:e.close}),eL().createElement(lR.Provider,{value:{...m,placement:y,ref:s}},b.children),eL().createElement(ur,{onDismiss:e.close}));return f?eL().createElement(lE,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==d?void 0:d.current)?i:void 0},D):eL().createElement(lE,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&eL().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),eL().createElement("div",{ref:c,style:{display:"contents"}},eL().createElement(ua.Provider,{value:c},D)))}function uu(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let uc=(0,e$.createContext)(null),ud=(0,e$.createContext)(null),uf=(0,e$.createContext)(null),up=(0,e$.createContext)(null),uh=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,uc);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t;let r=uo(e),[n,o]=a7(e.value,e.defaultValue||null,e.onChange),i=n||e.placeholderValue||null,[a,s]=ls(i,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=null==(t=e.shouldCloseOnSelect)||t,[d,f]=(0,e$.useState)(null),[p,h]=(0,e$.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,y=(0,e$.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:v,maxValue:g,isDateUnavailable:b}=e,w=(0,e$.useMemo)(()=>le(n,v,g,b,y),[n,v,g,b,y]),x=s2({...e,value:n,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{o("timeZone"in t?t.set(i_(e)):ix(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:n,setValue:o,dateValue:d,timeValue:p,setDateValue:t=>{let n="function"==typeof c?c():c;u?p||n?D(t,p||lo(e.defaultValue||e.placeholderValue)):f(t):(o(t),x.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&D(d,p||lo(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new iQ(e,ln(t,y)).format(l):"",getDateFormatter:(e,t)=>new iQ(e,ln({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,e$.useRef)(null),[l,u]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:v,...g}=function(e,t,r){var n;let o=rK(),i=rK(),a=rK(),s=iY((n=s_)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=sK({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=sU(t,r),y=f["aria-labelledby"]||f.id,{locale:v}=oL(),g=t.formatValue(v,{month:"long"}),b=au(g?s.format("selectedDateDescription",{date:g}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=ne(e),E=(0,e$.useMemo)(()=>s$(r),[r]),S=(0,e$.useRef)(!1),{focusWithinProps:D}=of({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(i);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;S.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!S.current){var r,n;S.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:rq(x,m,f,b,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...f,id:a,[sq]:"presentation","aria-describedby":w,value:t.value,onChange:t.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,[s4]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:p,errorMessageProps:h,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...r1(e),label:u,validationBehavior:i},a,s),[b,w]=(0,e$.useState)(null),x=(0,e$.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);l1({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=op({within:!0}),O=rJ({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=ne(e);return delete P.id,eL().createElement(rY,{values:[[uf,a],[sv,{...c,ref:s,isInvalid:a.isInvalid}],[lh,f],[ox,{...p,isPressed:a.isOpen}],[lk,{...d,ref:l,elementType:"span"}],[si,m],[lD,a],[ui,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[lS,h],[oD,{slots:{description:y,errorMessage:v}}],[lP,g]]},eL().createElement("div",{...E,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),um=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,ud);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){var t,r,n;let o=uo(e),[i,a]=a7(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,e$.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let u=i||s,c=e=>{l(e||{start:null,end:null}),uu(e)?a(e):a(null)},[d,f]=ls((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),p="hour"===d||"minute"===d||"second"===d,h=null==(n=e.shouldCloseOnSelect)||n,[m,y]=(0,e$.useState)(null),[v,g]=(0,e$.useState)(null);u&&uu(u)&&(m=u,"hour"in u.start&&(v=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(i_(e.start)):ix(e.start,t.start),end:"timeZone"in t.end?t.end.set(i_(e.end)):ix(e.end,t.end)}),y(null),g(null),j.commitValidation()},w=t=>{let r="function"==typeof h?h():h;p?uu(t)&&(null==v?void 0:v.start)&&(null==v?void 0:v.end)?b(t,{start:(null==v?void 0:v.start)||lo(e.placeholderValue),end:(null==v?void 0:v.end)||lo(e.placeholderValue)}):y(t):uu(t)?(c(t),j.commitValidation()):y(t),r&&o.setOpen(!1)},x=e=>{uu(m)&&uu(e)?b(m,e):g(e)},E=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,S=(0,e$.useMemo)(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:E}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,E]),{minValue:D,maxValue:O,isDateUnavailable:P}=e,C=(0,e$.useMemo)(()=>{var e,t;let r;return r=s9(le(null!=(e=null==u?void 0:u.start)?e:null,D,O,P,S),le(null!=(t=null==u?void 0:u.end)?t:null,D,O,P,S)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=s9(r,{isInvalid:!0,validationErrors:[(iz.getGlobalDictionaryForPackage("@react-stately/datepicker")||s8).getStringForLocale("rangeReversed",s7())],validationDetails:{...sQ,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,D,O,P,S]),j=s2({...e,value:i,name:(0,e$.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:C}),A=j.displayValidation.isInvalid,k=e.validationState||(A?"invalid":null);return{...j,value:u,setValue:c,dateRange:m,timeRange:v,granularity:d,hasTime:p,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==m?void 0:m.end)?r:null}):w({start:null!=(n=null==m?void 0:m.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?x({start:t,end:null!=(r=null==v?void 0:v.end)?r:null}):x({start:null!=(n=null==v?void 0:v.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:x,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&uu(m)&&p&&b(m,{start:(null==v?void 0:v.start)||lo(e.placeholderValue),end:(null==v?void 0:v.end)||lo(e.placeholderValue)}),o.setOpen(t)},validationState:k,isInvalid:A,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,i=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),a="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=ln(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(a||"UTC"),f=new iQ(t,l);if(o===a&&i===s&&0!==u.start.compare(u.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new iQ(t,ln(r,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new iQ(e,ln({},{...S,...t}))}}({...e,validationBehavior:i}),s=(0,e$.useRef)(null),[l,u]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:v,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,l;let u=iY((l=s_)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:h,descriptionProps:m,errorMessageProps:y}=sK({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),v=h["aria-labelledby"]||h.id,{locale:g}=oL(),b=t.formatValue(g,{month:"long"}),w=au(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),x={"aria-label":u.format("startDate"),"aria-labelledby":v},E={"aria-label":u.format("endDate"),"aria-labelledby":v},S=rK(),D=rK(),O=sU(t,r),P=[w["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,e$.useMemo)(()=>s$(r,{accept:e=>e.id!==S}),[r,S]),j={[sZ]:C,[sq]:"presentation","aria-describedby":P,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},A=ne(e),k=(0,e$.useRef)(!1),{focusWithinProps:T}=of({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(D);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;k.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!k.current){var r,n;k.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),R=(0,e$.useRef)(s0),N=(0,e$.useRef)(s0);return{groupProps:rq(A,O,h,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":P,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...p,onClick:()=>{C.focusFirst()}},buttonProps:{...w,id:S,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${S} ${v}`,"aria-describedby":P,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${S} ${v}`},startFieldProps:{...x,...j,value:null!=(a=null==(n=t.value)?void 0:n.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[s4]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){R.current=e,t.updateValidation(s9(e,N.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...E,...j,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[s4]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(s9(R.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:y,calendarProps:{autoFocus:!0,value:(null==(i=t.dateRange)?void 0:i.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:c,validationErrors:d,validationDetails:f}}({...r1(e),label:u,validationBehavior:i},a,s),[w,x]=(0,e$.useState)(null),E=(0,e$.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);l1({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=op({within:!0}),P=rJ({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=ne(e);return delete C.id,eL().createElement(rY,{values:[[up,a],[sv,{...c,ref:s,isInvalid:a.isInvalid}],[ox,{...h,isPressed:a.isOpen}],[lk,{...d,ref:l,elementType:"span"}],[sa,y],[lD,a],[ui,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[lS,m],[lh,{slots:{start:f,end:p}}],[oD,{slots:{description:v,errorMessage:g}}],[lP,b]]},eL().createElement("div",{...S,...C,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function uy(e){return eL().createElement(o$,e)}var uv=r(11712),ug=r.n(uv);function ub(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof ii||e instanceof iu||e instanceof id)return t?iE(e,t):e;{let r=ug()(e).toDate(),n=new ii(r.getFullYear(),r.getMonth()+1,r.getDate());return t?iE(n,t):n}}function uw(e){if(e)return e.toDate(iI())}function u_(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function ux(e){let t=e??"",r=u_(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function uE(){let e=window.i18next.language,t=u_(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;c=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;c=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var uS=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(c||"en-US"),uD=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},uO={};for(let e=0;e<100;e++)uO[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var uP={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},uC="[1234567890一二三四五六七八九〇\\d]",uj={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},uA={},uk={"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},uT={zone:uk,year:uO,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:{}},uR={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(uk).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,}"},uN={...uR,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}"},uI={},uM=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=uS){return uI[t.toLowerCase()]||(uI[t.toLowerCase()]=new e(t)),uI[t.toLowerCase()]}constructor(e=uS){this.locale=e,this.lookups={...uT},this.vars={...uR};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.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 t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}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 t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=uj:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(uA[e])return uA[e];if("fullwide"===e||"hanidec"===e)return{group:uC,lookup:{...uj}};let t=uP[e];if(!t)return{group:"\\d",lookup:{...uj}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return uA[e]={group:`[${r}-${n}]`,lookup:o},uA[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,uN)uN.hasOwnProperty(r)&&(this.vars[r]=uN[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},u$=["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"],uL={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},uF=()=>new Date;function uB(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var uV=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},uU=["year","month","day","hour","minute","second","millisecond","offset"],uW={};function uz(e,t){return""===t||/^\s+$/.test(t)||"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 uK=[[/([^\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"]],uH={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," "],...uK],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:uK,id:uK,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function uG(e,t=uS){let r=function(e){if(!uW[e]){var t,r;let n,o,i=uM.factory(e);uW[e]=new uV({doneChecker:uz,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:uB(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${uC}{2,4})\\s*\u5E74\\s*(${uC}{1,2})\\s*\u6708\\s*(${uC}{1,2})\\s*\u65E5$`),handler:uB(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:uB(["","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:uB(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=uF(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.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,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?uL[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=uF();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{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 t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:uB(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:uB(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:uB(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:uB(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:uB(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:uB(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:uB(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:uB(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:uB(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:uB(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:uB(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:uB(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:uB(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:uB(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:uB(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:uB(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:uB(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:uB(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:uB(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:uB(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:uB(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:uB(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:uB(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:uB(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:uB(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:uB(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:uB(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:uB(["offset"])}],o=i.baseName.slice(0,5),u$.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(uU.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=uO[e.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return uW[e]}(t),n=function(e,t){let r=uH[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function uq(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new uD(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 uD(t.valueOf()-60*e.offset*1e3):t}function uZ(e,t=uS){let r=uG(e,t),n=r.invalid?new uD(NaN):uq(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function uY(e,t=uS){return e instanceof Date?new uD(e.valueOf()):"number"==typeof e?new uD(e):uZ(e,t)}Date.fromString=uD.fromString=uZ,Date.fromAny=uD.fromAny=uY,"u">typeof window&&(window.anyDateParser={fromString:uZ,fromAny:uY,fromObject:uq,attempt:uG});var uJ=r(68558),uQ=r(31441),uX=r(43117);let u0=function(e){return null==e};var u1=r(61907);function u4(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}ug().extend(uJ),ug().extend(uX),ug().extend(uQ);let u2="YYYY-MM-DDTHH:mm:ss.SSSZZ";function u3(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&ug()(e,u2).isValid()}function u6(e){return ug()(e).isToday()}function u5(e){return u3(e)?ug()(e,u2).toDate():null}function u9(e,t=!1){let r=ug()(e);return t&&(r=r.utc()),r.format(u2)}function u8(e){return ug()(e).toDate()}var u7=new WeakMap;let ce=new class{register(e,t){u4(this,u7).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(u4(this,u7).has(t))return u4(this,u7).get(t)}if(e.language&&u4(this,u7).has(e.language))return u4(this,u7).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return u4(this,u7).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,u7,{writable:!0,value:new Map})}};function ct(e,t){ce.register(e,t)}function cr(e){let t=e??uE();return ce.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let cn={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function co(e,t={}){let r=uG(e,uE());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!u0(r.day)&&u0(r.month)&&(r=Object.assign({},(0,u1.A)(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},(0,u1.A)(r,"day"),{date:r.day}));let n=ug()().set(r).toDate();return u0(r.year)&&(t.year=!1),u0(r.month)&&(t.month=!1),u0(r.date)&&(t.day=!1),ci(n,t)}function ci(e,t){let r,n=t?.locale??uE(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...cn,...{noToday:"am"===o.language},...t},p={calendar:i??cr(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},h=ug()(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(ca("-"))),"wide"==a&&(t=t.map(ca(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${cs(e)}`),r}let ca=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function cs(e){return e.toLocaleTimeString(uE(),{hour:"2-digit",minute:"2-digit"})}function cl(e,t){return ci(e,{...t,time:!0})}function cu(e,t){let r=cr("string"==typeof t?new Intl.Locale(t):t);return r?iE(e,a1(r)):e}function cc(e,t){return new Intl.DurationFormat(uE(),t).format(e)}function cd(e,t){if(null==e)return null;if("string"==typeof e){let r=uG(e,uE());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...(0,u1.A)(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...(0,u1.A)(r,"day"),...{date:r.day}}),ug()(t).set(r))}return ug()(e)}let cf=["years","months","days","hours","minutes","seconds"],cp={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},ch={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function cm(e,t=ug()(),r){let n,o=ug()(t),i=cd(e,o);if(null==i)return null;if("string"==typeof r){let e=cp[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?cp[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=cf.indexOf(r);for(let o=0;o<cf.length;o++){let i=cf[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):cp[s]??s,function(e,t,r,n){let o=cf.indexOf(r),i=cf.indexOf(n),a=cf.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...ch};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[cp[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let cy={style:"short",localeMatcher:"lookup"};function cv(e,t=ug()(),r){let n=cm(e,t,r);return null==n?null:cc(n,"object"==typeof r&&r.formatOptions?{...cy,...r.formatOptions}:cy)}let cg=(0,e$.createContext)(null);function cb(){let e=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,e$.useMemo)(()=>{let t=uE();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,e$.useMemo)(()=>{let e=cr(t);return void 0!==e?a1(e):void 0},[t]),n=(0,e$.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,e$.useMemo)(()=>r?iE(ik(iI()),r):ik(iI()),[r]);return{calendar:r,intlLocale:n,today_:o}}let cw=new ii(1793,1,1);var c_={};function cx(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}c_={"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 cE=r(77941);function cS(e={}){let{locale:t}=oL();return(0,e$.useMemo)(()=>new(0,cE.K)(t,e),[t,e])}var cD={};function cO(e){var t;let r=(0,e$.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=iY((t=cD)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,e$.useEffect)(()=>()=>clearTimeout(r.current),[]);let v=(0,e$.useRef)(!1),g=()=>{v.current=!0},b=()=>{v.current=!1},w=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,e$.useEffect)(()=>{v.current&&(r2&&r2.clear("assertive"),r3(w,"assertive"))},[w]);let x=rR(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&x(60)},e)}),E=rR(e=>{clearTimeout(r.current),null==f||f(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&E(60)},e)}),S=e=>{e.preventDefault()},{addGlobalListener:D,removeAllGlobalListeners:O}=nL();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(p){e.preventDefault(),null==p||p();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),null==f||f());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:g,onBlur:b},incrementButtonProps:{onPressStart:()=>{x(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:g,onBlur:b},decrementButtonProps:{onPressStart:()=>{E(400),D(window,"contextmenu",S)},onPressEnd:()=>{clearTimeout(r.current),O()},onFocus:g,onBlur:b}}}cD={"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 cP=r(95084);function cC(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let cj=(0,e$.createContext)(null),cA=(0,e$.createContext)(null),ck=(0,e$.forwardRef)(function(e,t){var r,n;[e,t]=rX(e,t,cj);let{validationBehavior:o}=rQ(lA)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=oL(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===n||isNaN(n)?lM(i,t,r):lL(i,t,r,n)),isNaN(a)||(a=void 0===n||isNaN(n)?lM(a,t,r):lL(a,t,r,n));let[d,f]=a7(i,isNaN(a)?NaN:a,s),[p,h]=(0,e$.useState)(()=>isNaN(d)?"":new(0,cE.K)(l,o).format(d)),m=(0,e$.useMemo)(()=>new(0,cP.d)(l,o),[l,o]),y=(0,e$.useMemo)(()=>m.getNumberingSystem(p),[m,p]),v=(0,e$.useMemo)(()=>new(0,cE.K)(l,{...o,numberingSystem:y}),[l,o,y]),g=(0,e$.useMemo)(()=>v.resolvedOptions(),[v]),b=(0,e$.useCallback)(e=>isNaN(e)||null===e?"":v.format(e),[v]),w=s2({...e,value:d}),x=void 0===n||isNaN(n)?1:n;"percent"===g.style&&(void 0===n||isNaN(n))&&(x=.01);let[E,S]=(0,e$.useState)(d),[D,O]=(0,e$.useState)(l),[P,C]=(0,e$.useState)(o);Object.is(d,E)&&l===D&&o===P||(h(b(d)),S(d),O(l),C(o));let j=(0,e$.useMemo)(()=>m.parse(p),[m,p]),A=(e,n=0)=>{if(isNaN(j))return lL(isNaN(n)?0:n,t,r,x);{let n=lL(j,t,r,x);return"+"===e&&n>j||"-"===e&&n<j?n:lL(cC(e,j,x),t,r,x)}},k=(0,e$.useMemo)(()=>!u&&!c&&(isNaN(j)||void 0===r||isNaN(r)||lL(j,t,r,x)>j||cC("+",j,x)<=r),[u,c,t,r,x,j]),T=(0,e$.useMemo)(()=>!u&&!c&&(isNaN(j)||void 0===t||isNaN(t)||lL(j,t,r,x)<j||cC("-",j,x)>=t),[u,c,t,r,x,j]);return{...w,validate:e=>m.isValidPartialNumber(e,t,r),increment:()=>{let e=A("+",t);e===d&&h(b(e)),f(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(f(lL(r,t,r,x)),w.commitValidation())},decrement:()=>{let e=A("-",r);e===d&&h(b(e)),f(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),w.commitValidation())},canIncrement:k,canDecrement:T,minValue:t,maxValue:r,numberValue:j,setNumberValue:f,setInputValue:h,inputValue:p,commit:()=>{let e;if(!p.length){f(NaN),h(void 0===i?"":b(d));return}isNaN(j)?h(b(d)):(e=void 0===n||isNaN(n)?lM(j,t,r):lL(j,t,r,n),f(e=m.parse(b(e))),h(b(void 0===i?e:d)))}}}({...e,locale:a,validationBehavior:i}),l=(0,e$.useRef)(null),[u,c]=r0(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:v,...g}=function(e,t,r){var n,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:f,maxValue:p,autoFocus:h,label:m,formatOptions:y,onBlur:v=()=>{},onFocus:g,onFocusChange:b,onKeyDown:w,onKeyUp:x,description:E,errorMessage:S,isWheelDisabled:D,...O}=e,{increment:P,incrementToMax:C,decrement:j,decrementToMin:A,numberValue:k,inputValue:T,commit:R,commitValidation:N}=t,I=iY((o=c_)&&o.__esModule?o.default:o,"@react-aria/numberfield"),M=rK(a),{focusProps:$}=ol({onBlur(){R()}}),L=cS(y),F=(0,e$.useMemo)(()=>L.resolvedOptions(),[L]),B=cS({...y,currencySign:void 0}),V=(0,e$.useMemo)(()=>isNaN(k)?"":B.format(k),[B,k]),{spinButtonProps:U,incrementButtonProps:W,decrementButtonProps:z}=cO({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:p,minValue:f,onIncrement:P,onIncrementToMax:C,onDecrement:j,onDecrementToMin:A,value:k,textValue:V}),[K,H]=(0,e$.useState)(!1),{focusWithinProps:G}=of({isDisabled:u,onFocusWithinChange:H});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,e$.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);aa(t,"wheel",n?void 0:o)}({onScroll:(0,e$.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?P():e.deltaY<0&&j())},[j,P]),isDisabled:D||u||c||!K},r);let q=(null!=(n=F.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";ng()?Z?Y="text":q&&(Y="decimal"):nE()&&(Z?Y="numeric":q&&(Y="decimal"));let J=ne(e),Q=(0,e$.useCallback)(e=>{"Enter"===e.key?(R(),N()):e.continuePropagation()},[R,N]),{isInvalid:X,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:er,inputProps:en,descriptionProps:eo,errorMessageProps:ei}=function(e,t,r){let n=rR(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,e$.useEffect)(()=>{if(!cx()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=cx()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=a7(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=od(e,t),d=s2({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:v,errorMessageProps:g}=sK({...e,isInvalid:f,errorMessage:e.errorMessage||p}),b=ne(e,{labelable:!0}),w={type:a,pattern:e.pattern};return sz(t,l,u),sH(e,d,t),(0,e$.useEffect)(()=>{if(t.current instanceof ns(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:rq(b,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||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=>u(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(eL().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,...c,...y}),descriptionProps:v,errorMessageProps:g,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,e$.useRef)(null);return{inputProps:rq(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...O,...J,name:void 0,label:m,autoFocus:h,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[s4]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:M,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:v,onFocus:g,onFocusChange:b,onKeyDown:(0,e$.useMemo)(()=>rk(Q,w),[Q,w]),onKeyUp:x,description:E,errorMessage:S},t,r);sz(r,t.numberValue,t.setNumberValue);let ea=rq(U,$,en,{role:null,"aria-roledescription":nw()?null:I.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let es=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?er.id:e["aria-labelledby"]);let eu=rK(),ec=rK(),ed=rq(W,{"aria-label":l||I.format("increase",{fieldLabel:el}).trim(),id:i&&!l?eu:null,"aria-labelledby":i&&!l?`${eu} ${i}`:null,"aria-controls":M,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ef=rq(z,{"aria-label":s||I.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?ec:null,"aria-labelledby":i&&!s?`${ec} ${i}`:null,"aria-controls":M,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...G,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:er,inputProps:ea,incrementButtonProps:ed,decrementButtonProps:ef,errorMessageProps:ei,descriptionProps:eo,isInvalid:X,validationErrors:ee,validationDetails:et}}({...r1(e),label:c,validationBehavior:i},s,l),b=rJ({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=ne(e);return delete w.id,eL().createElement(rY,{values:[[cA,s],[sv,f],[sb,{...p,ref:l}],[lk,{...d,ref:u}],[ox,{slots:{increment:h,decrement:m}}],[oD,{slots:{description:y,errorMessage:v}}],[lP,g]]},eL().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&eL().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function cT(e,t){return Number.parseInt(ci(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let cR=(0,e$.forwardRef)(function(e,t){let{className:r}=e,n=(0,e$.useContext)(ss),o=(0,e$.useContext)(sl),i=n??o,a=(0,e$.useContext)(cg),s=iI(),l=ci(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=cT(i.visibleRange.start.toDate(s),a),c=i.maxValue?cT(i.maxValue.toDate(s),a):void 0,d=i.minValue?cT(i.minValue.toDate(s),a):void 0,f=(0,e$.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,eM.jsxs)("span",{ref:t,className:r,children:[(0,eM.jsx)("span",{children:l}),(0,eM.jsxs)(ck,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,eM.jsx)(sw,{}),(0,eM.jsxs)(sg,{children:[(0,eM.jsx)(oE,{slot:"increment",children:(0,eM.jsx)(ti,{size:8})}),(0,eM.jsx)(oE,{slot:"decrement",children:(0,eM.jsx)(tr,{size:8})})]})]})]})}),cN="+4zksyca-I5VROi6oiQzJQ==",cI="wiExnFcGq1fPxn+K4eWeig==",cM="uiyACHcxSXjudv9HIlh57w==",c$="SxtTLfuOGW-Mst6POMWfQA==",cL="UU1QpNunTQCrdkAN2b2Ecg==",cF="fhR-1dd9yTq-5JUfl4REqA==",cB="_5INZ7v7pw4CkyEJ2Y8RsrA==",cV="RFMrlShZc97nAtIJF9P8jw==";function cU({children:e}){let t=(0,e$.useContext)(uf),r=(0,e$.useContext)(up),n=t??r,o=(0,e_.Wr)(()=>n?.close());return(0,eM.jsx)(lO,{className:"qllIfMFRvFHzGUeuOQ+PpA==",ref:o,children:e})}let cW=(0,e$.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,eM.jsx)(us,{ref:o,className:"_16UMXpLD7yf8iGA5mGYNeA==",placement:"bottom start",offset:1,isNonModal:!0,children:(0,eM.jsx)(cU,{children:(0,eM.jsxs)(i?sc:su,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,eM.jsxs)("header",{className:"WAVlDbzjKhHAlu18b5VwWw==",children:[(0,eM.jsx)(oE,{className:eB()(cL,cF),slot:"previous",children:(0,eM.jsx)(tf,{size:16})}),(0,eM.jsx)(cR,{className:"A3aKFbSSeqZsllm0oKdxgg=="}),(0,eM.jsx)(oE,{className:eB()(cL,cF),slot:"next",children:(0,eM.jsx)(tp,{size:16})})]}),(0,eM.jsx)(sf,{className:"_6qRB2DssZC4NegdCeg1ktQ==",children:e=>(0,eM.jsx)(sy,{className:eB()("cds--date-picker__day",{"TZl6MCGNAAF8bYh2zSUQ2w==":0===t.compare(e)}),date:e},e.toString())})]})})})}),cz=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(uf),[n,o]=rX({slot:e.slot},t,lh),{locale:i}=oL(),a=lf({...n,locale:i,createCalendar:a1}),s=(0,e$.useRef)(null),{fieldProps:l,inputProps:u}=sY({...n,inputRef:s},a,o),c=(0,e$.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,eM.jsxs)(rY,{values:[[lm,a],[sb,{...u,ref:s}],[sv,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,eM.jsx)(sg,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,e$.cloneElement)(e.children(t),{key:r}))}),(0,eM.jsx)(sw,{})]})}),cK=(0,e$.forwardRef)(function(e,t){let r=(0,e$.useContext)(uf),n=(0,e$.useContext)(up);return(r??n).isInvalid?(0,eM.jsx)(rw,{ref:t,size:16,...e}):(0,eM.jsx)(tt,{ref:t,size:16,...e})});class cH{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let cG=new Map,cq=(0,e$.forwardRef)(function({segment:e,...t},r){let n=(0,e$.useContext)(lm),o=rA(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,e$.useRef)(""),{locale:l,direction:u}=oL(),c=function(){var e;let{locale:t}=oL(),r=iZ((e=s_)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,e$.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new cH(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=sG.get(t),m=e.isPlaceholder?"":e.text,y=(0,e$.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),v=i3({month:"long",timeZone:y.timeZone}),g=i3({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=g.format(t.dateValue));else{let e=v.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:b}=cO({value:e.value,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,e$.useMemo)(()=>new(0,cP.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:E}=(n=function(e){let{locale:t}=oL(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(cG.has(r))return cG.get(r);let n=new Intl.Collator(t,e);return cG.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,e$.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,e$.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,e$.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,e$.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=i3({hour:"numeric",hour12:!0}),D=(0,e$.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),O=(0,e$.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=i3({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,e$.useMemo)(()=>{if("era"!==e.type)return[];let r=iE(new ii(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),j=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(D,r))t.setSegment("dayPeriod",0);else if(E(O,r))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=C.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=w.parse(r));break;case"h12":a=!1,o>12&&(i=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=n}}};aa((0,e$.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let A=(0,e$.useRef)("");aa(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":A.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&j(n.data)}}),aa(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=A.current),null!=n&&(E(D,n)||E(O,n))&&j(n))}),rT(()=>{let e=r.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let k=nw()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,e$.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let T=rK(),R=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),I=ar({"aria-label":`${N}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let M={caretColor:"transparent"};if("rtl"===u){M.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(M.direction="ltr")}return{segmentProps:rq(b,I,{id:T,...k,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:R,suppressContentEditableWarning:R,spellCheck:R?"false":void 0,autoCorrect:R?"off":void 0,[parseInt(eL().version,10)>=17?"enterKeyHint":"enterkeyhint"]:R?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!R?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(nv()?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(),x()}},onFocus:()=>{s.current="",r.current&&af(r.current,{containingElement:ap(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:M,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=op(),{hoverProps:u,isHovered:c}=og({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,e$.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,e$.useCallback)(e=>{e.stopPropagation()},[]);return(0,eM.jsx)("span",{...rq(ne(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),cZ={short:!1,size:"md"},cY=(0,e$.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:v,...g}={...cZ,...e},{calendar:b,intlLocale:w,today_:x}=cb(),E=(0,e$.useId)(),S=!!(u??l),D=(0,e$.useMemo)(()=>ub(n,b),[n,b]),O=(0,e$.useMemo)(()=>ub(v,b,!0),[v,b]),P=(0,e$.useMemo)(()=>ub(d,b),[d,b]),C=(0,e$.useMemo)(()=>ub(f??cw,b),[f,b]),j=(0,e$.useMemo)(()=>i||s,[i,s]),A=(0,e$.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(uw(e)))),[h,p]);return(0,eM.jsx)(uy,{locale:w.toString(),children:(0,eM.jsx)("div",{className:eB()("cds--form-item",r),children:(0,eM.jsx)(rY,{values:[[cg,w]],children:(0,eM.jsxs)(uh,{className:eB()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:j,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...g,onChange:A,children:[(0,eM.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,eM.jsx)(lT,{className:eB()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,eM.jsxs)(sg,{className:cN,children:[(0,eM.jsx)(cz,{id:S?E:void 0,ref:t,className:eB()("cds--date-picker-input__wrapper","kykar4EZi79xhpVitgu-vg==",{"KJtg-MP1knHYLUz4R6hZEw==":"sm"===y,"ablE9mmlFsZsPekwcW7jjQ==":"md"===y||!y||0===y.length,"_5dkQpmV3FO9GZg+Ai3BG3A==":"lg"===y}),children:e=>"era"!==e.type?(0,eM.jsx)(cq,{className:cI,segment:e}):(0,eM.jsx)(eL().Fragment,{})}),(0,eM.jsx)(oE,{className:eB()(cL,{[cB]:"sm"===y,[cF]:"md"===y||!y||0===y.length,[cV]:"lg"===y}),children:(0,eM.jsx)(cK,{})})]}),(0,eM.jsx)(lC,{className:c$,children:a})]}),(0,eM.jsx)(cW,{variant:"single",today_:x})]})})})})}),cJ=(0,e$.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:v,intlLocale:g,today_:b}=cb(),w=(0,e$.useId)(),x=!!(s??a),E=(0,e$.useMemo)(()=>{if(h)return{start:ub(h[0],v,!1),end:ub(h[1],v,!1)}},[h,v]),S=(0,e$.useMemo)(()=>{if(t)return{start:ub(t[0],v,!1),end:ub(t[1],v,!1)}},[t,v]),D=(0,e$.useMemo)(()=>ub(c??cw,v,!0),[c,v]),O=(0,e$.useMemo)(()=>ub(u,v,!0),[u,v]),P=(0,e$.useMemo)(()=>r||i,[r,i]),C=(0,e$.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([uw(e.start),uw(e.end)]))),[f,d]);return(0,eM.jsx)(uy,{locale:g.toString(),children:(0,eM.jsx)("div",{className:eB()("cds--form-item",e),children:(0,eM.jsx)(rY,{values:[[cg,g]],children:(0,eM.jsx)(um,{id:x?w:void 0,className:eB()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===g.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:C,children:(0,eM.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,eM.jsx)(lT,{className:eB()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,eM.jsxs)(sg,{className:cN,children:[(0,eM.jsxs)("div",{className:eB()("YlkGhdQcBgSDJNSlS1cQnw==",{"fAKhSoomCu7Mn5FBku20SQ==":"sm"===p,"XVgGPgTNDC4UIcE+4yAZPQ==":"md"===p||!p||0===p.length,"UgHJ1nnMa-axxvCtxsZexg==":"lg"===p}),children:[(0,eM.jsx)(lv,{className:eB()("cds--date-picker-input__wrapper","qgbQm03oBFnWnXNV1GFW6Q==",cM),slot:"start",children:e=>(0,eM.jsx)(cq,{className:cI,segment:e})}),(0,eM.jsx)("div",{className:"_79vXZ2hgTRvmmxREZu5WGw==",children:(0,eM.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,eM.jsx)(lv,{className:eB()("cds--date-picker-input__wrapper","huv7xQjo+RZmT7LsDwVMdw==",cM),slot:"end",children:e=>(0,eM.jsx)(cq,{className:cI,segment:e})})]}),(0,eM.jsx)(oE,{className:eB()(cL,{[cB]:"sm"===p,[cF]:"md"===p||!p||0===p.length,[cV]:"lg"===p}),children:(0,eM.jsx)(cK,{})})]}),(0,eM.jsx)(lC,{className:c$,children:n}),(0,eM.jsx)(cW,{variant:"range",today_:b,minDate:D,maxDate:O})]})})})})})}),cQ=({diagnoses:e})=>{let{diagnosisTags:t}=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"});return(0,eM.jsx)("div",{className:"_8kut8cACHJrbzESyXn6V0A==",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,eM.jsx)(eW.Tag,{type:i,children:o},n)})})},cX={action:"Y0dulYR6B5fprvtdpjGfEg==",content:"fo0nBB+424Kd5d6PQgXSNw==",desktopHeading:"_0Cg1NmmrPwBagqee7ft6pA==",tabletHeading:"BogTFW2NIZhoGcuXc5XDuw==",tile:"QB8Ldd7u7gkdqC6n-YSg0Q=="},c0=({width:e="64",height:t="64"})=>(0,eM.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,eM.jsx)("use",{href:"#omrs-empty-data-illustration"})}),c1=e=>{let t="tablet"===(0,e_.qv)(),r=e.launchForm;return(0,eM.jsx)(eW.Layer,{className:cX.layer,children:(0,eM.jsxs)(eW.Tile,{className:cX.tile,children:[(0,eM.jsx)("div",{className:t?cX.tabletHeading:cX.desktopHeading,children:(0,eM.jsx)("h4",{children:e.headerTitle})}),(0,eM.jsx)(c0,{}),(0,eM.jsx)("p",{className:cX.content,children:(0,h.V)("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,eM.jsx)("p",{className:cX.action,children:r&&(0,eM.jsx)(eW.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:(0,h.V)("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},c4=({error:e,headerTitle:t})=>{let r="tablet"===(0,e_.qv)();return(0,eM.jsx)(eW.Layer,{children:(0,eM.jsxs)(eW.Tile,{className:"dd4186Mm5sjs8UUsDMSW1g==",children:[(0,eM.jsx)("div",{className:r?"g5rjg9+AOtwh8Z2Elf9wSg==":"Nd9u2TzLVcwE5QlMC2PRUg==",children:(0,eM.jsx)("h4",{children:t})}),(0,eM.jsxs)("p",{className:"z2RiNHQhCUYOlXJFOX2flg==",children:[(0,h.V)("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,eM.jsx)("p",{className:"dq+e2AreXbyoxopCEZRwXA==",children:(0,h.V)("errorCopy")})]})})},c2=c4,c3=eL().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=(0,e_.TA)(),a=window.location??{pathname:""},s=(0,e_.CX)(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,eM.jsxs)(eW.SideNav,{"aria-label":(0,h.V)("leftNavigation","Left navigation"),className:"jzTJKtCPCooU36+y+NwbPQ==",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,eM.jsx)(e_.W3,{name:"global-nav-menu-slot"}),r?(0,eM.jsx)(e_.fS,{value:o,fallback:(0,eM.jsx)(e_.W3,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,eM.jsx)(e_.zq.Provider,{value:o,children:(0,eM.jsx)(e_.W3,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null});var c6=r(83360),c5=r.n(c6),c9=r(99970),c8=r.n(c9);let c7=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,e$.useState)(""),s=(0,e$.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=c5()(t,d.lo,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,e$.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:f,loadingNewData:p,error:m,setPage:y}=function(e,t=0,r=""){let n=(0,e_.d7)(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=c8()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${d.IU}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},d.lo);return(0,e$.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),v=(0,e$.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),g=(0,e$.useCallback)(e=>{o(),a(e.trim())},[o]),b=(0,e$.useCallback)(()=>{!p&&f&&y(e=>e+1)},[p,f,y]),w=(0,e_.Jm)(b),x=f?Math.max(0,Math.floor(v.length-n/2)):-1;return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)(eW.Search,{"aria-describedby":m?`${s}-error`:void 0,labelText:(0,h.V)("searchForLocation"),id:s,placeholder:(0,h.V)("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),m&&(0,eM.jsx)("div",{className:"vWBFDqCDM8BcQhePvfa35g==",id:`${s}-error`,children:(0,eM.jsx)(eW.InlineNotification,{kind:"error",subtitle:(0,h.V)("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:(0,h.V)("error","Error")})}),(0,eM.jsx)("div",{className:"Gbet+W1fVEk45aZli6JbrA==",children:c?(0,eM.jsx)("div",{className:"QO-zjOxMSWAzXY-PMrSiwQ==",children:Array.from({length:5}).map((e,t)=>(0,eM.jsx)(eW.RadioButtonSkeleton,{className:"otoCykP+JQHrsIsgKUOd7A==",role:"progressbar"},t))}):(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("div",{className:"_6PasfpnQ738RjzgXBzAQpw==",children:v.length>0?(0,eM.jsx)(eW.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:v.map((e,t)=>(0,eM.jsx)(eW.RadioButton,{className:"rTDPjXuaGJbz9KhOf57M3g==",id:e.resource.id,labelText:(0,eM.jsx)("span",{ref:t===x?w:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,eM.jsx)("div",{className:"w4-CatRLHH3loLqlunOalg==",children:(0,eM.jsx)("p",{className:"Of2MJqhAMKF7nrwI5bKckw==",children:(0,h.V)("noResultsToDisplay")})})}),p&&(0,eM.jsx)("div",{className:"NAwSBETYamP9uMuJE63U-w==",children:(0,eM.jsx)(eW.InlineLoading,{description:(0,h.V)("loading")})})]})})]})},de=(0,ek.Zd)("modalState",{modalContainer:null,modalStack:[]}),dt=0;async function dr(e,t,r={}){let n=(0,ev.Fg)(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=dt++;o=await (0,ev.Wu)({...a,name:`${t}-${s}`},{...r,domElement:e})}else(0,ec.N)(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function dn(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function di(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function da(e){return e.find(e=>!dn(e))}function ds(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let dl=window.getComputedStyle(document.body).overflow;function du({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",dd),document.body.style.overflow="hidden",t.style.visibility="unset");let r=da(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",dr(r,e.modalName,e.props).then(n=>{dn(e)?di(e.modalName,n):n?(e.parcel=n,t.prepend(r),ds(e,da(de.getState().modalStack)===e),n.mountPromise.then(()=>{dn(e)||(e.state="MOUNTED")},t=>{(0,ec.N)(t),e.parcel=null,dc(e)})):dc(e)},t=>{(0,ec.N)(t),dc(e)});break}case"MOUNTING":case"MOUNTED":ds(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),di(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=de.getState();de.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=dl,removeEventListener("keydown",dd)}function dc(e){if(dn(e))return;e.state="TO_BE_DELETED";let t=de.getState();de.setState({...t,modalStack:[...t.modalStack]})}function dd(e){"Escape"===e.key&&function(){let[e]=de.getState().modalStack;e&&dc(e)}()}function df(e){de.subscribe(du),de.setState({...de.getState(),modalContainer:e})}function dp(e,t={},r=()=>{}){let n=()=>{let e=de.getState().modalStack.find(e=>e.onClose===r);e&&dc(e)};if((0,ev.Fg)(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=de.getState()).modalStack],de.setState({...i,modalStack:a})}else(0,ec.N)(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var dh=r(67436);let dm=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},dy=({subject:e})=>{let[t,r]=(0,e$.useState)([]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(dm,{notification:e},e.id))})},dv=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,e$.useState)(t);return(0,eM.jsx)(eW.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:(0,h.V)("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:(0,h.V)("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},dg=({subject:e})=>{let[t,r]=(0,e$.useState)([]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(dv,{notification:e},e.id))})};var db=r(33743),dw=r(78014),d_=r(36791),dx=r(6476),dE=r(39715),dS=r(70200),dD=r(47508),dO=r(28481),dP=Object.prototype.hasOwnProperty;let dC=function(e){if(null==e)return!0;if((0,dE.A)(e)&&((0,dx.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,dS.A)(e)||(0,dO.A)(e)||(0,d_.A)(e)))return!e.length;var t=(0,dw.A)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,dD.A)(e))return!(0,db.A)(e).length;for(var r in e)if(dP.call(e,r))return!1;return!0};var dj=r(6661);let dA=new dh.Subject,dk=0,dT=new dh.Subject,dR=0;function dN(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(dy,{subject:dA}))}function dI(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!dC(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{dA.next({...e,id:dk++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function dM(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(dg,{subject:dT}))}function d$(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!dC(t))?setTimeout(()=>{dT.next({...e,id:dR++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let dL=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],dF=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],dB={container:"NfxbHD-wnMrBzBk69SCjYQ==",card:"_9oQAhF55AGaJdV52G-wqjg==","abnormal-value":"drvEiwdbggDi0fbHudAK8A==","critical-value":"JAIHtThObGIUDziDrI7NEw==",cell:"lTunWbcsMBJlcgcQcM49VQ==","critically-high":"aDUjcSFuBLWzHLB6F2ZL0w==","critically-low":"_5srAKYBlbvz1g2GZM1ESig==",high:"_7KiyKNoFp9yrwGOfblyG2A==",low:"Zs2ctcOpDW7uCL3jkar-mA==","label-container":"lGnGHj+yIJy++XiPwZ7Nzw==","value-container":"hHPXtsgUdZ4GZ-eQwkTLgQ==",label:"WFuxkvDaJtvRG1q-haHcBQ==",value:"_6fHUr05hAbo85hI967ByDg==",units:"EdVuwD5UxHNRKpAyfNSWGg==","pad-right":"_6T9CddK+8fdeyqNlwc4v4Q==","off-scale-low":"Sc1CVNBCBJ6DIhtHUAQbCg==","off-scale-high":"cWpU2bqU5X9eYPOfFJtE4g==",arrow:"SLGUhJysawfaXr-VtuJBYg=="},dV=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,e$.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${d.Jj}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${d.Jj}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=c5()(r,d.lo),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),f=o??u,p=(0,e$.useMemo)(()=>{if(n)return n?"--"===n?"normal":dL.includes(n)?n.toLowerCase():dF.includes(n)?n:"normal":void 0;if(f&&!c){if(!f||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==f.hiAbsolute&&void 0!==f.hiAbsolute&&t>f.hiAbsolute?"off_scale_high":null!==f.hiCritical&&void 0!==f.hiCritical&&t>=f.hiCritical?"critically_high":null!==f.hiNormal&&void 0!==f.hiNormal&&t>f.hiNormal?"high":null!==f.lowAbsolute&&void 0!==f.lowAbsolute&&t<f.lowAbsolute?"off_scale_low":null!==f.lowCritical&&void 0!==f.lowCritical&&t<=f.lowCritical?"critically_low":null!==f.lowNormal&&void 0!==f.lowNormal&&t<f.lowNormal?"low":"normal"}return"normal"},[n,f,e,c])??"normal",m="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,y="normal"!==p,v=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,w=null!=e&&""!==e,x=w?e:(0,h.V)("notAvailable","Not available"),E=eB()({[dB["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[dB["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[dB.low]:"low"===p,[dB.high]:"high"===p,[dB["off-scale-low"]]:"off_scale_low"===p,[dB["off-scale-high"]]:"off_scale_high"===p}),S=eB()({[dB.container]:!0,[dB.card]:!0,[dB["critical-value"]]:m,[dB["abnormal-value"]]:y&&!m}),D=eB()({[dB.cell]:!0,[E]:!0});return"cell"===a?(0,eM.jsxs)("div",{className:D,children:[x,w&&t?` ${t}`:""]}):(0,eM.jsxs)("section",{className:S,"data-testid":"numeric-observation-card",children:[r&&(0,eM.jsxs)("div",{className:dB["label-container"],children:[(0,eM.jsx)("span",{id:v,className:dB.label,children:r}),y&&(0,eM.jsx)("span",{className:dB[p.replace("_","-")],title:(0,h.V)("abnormalValue","Abnormal value")})]}),(0,eM.jsxs)("div",{className:dB["value-container"],children:[(0,eM.jsx)("span",{id:g,"aria-labelledby":v&&b?`${v} ${b}`:v||b||void 0,className:dB.value,children:x}),w&&t&&(0,eM.jsx)("span",{id:b,className:dB.units,children:t})]})]})},dU="YOpQLiaTysM+swWB7ATzKw==",dW=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,eM.jsx)("div",{className:eB()(dU,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,eM.jsx)("div",{className:eB()(dU,n),...o,children:(0,eM.jsx)(dz,{title:t,illustration:r})})}},dz=({title:e,illustration:t,className:r})=>{let[n,o]=(0,e$.useState)(null);return(0,e$.useEffect)(()=>{(0,f.zj)("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,eM.jsxs)("div",{className:eB()("PjsJmcqHjhav+51GzX5n1A==",r),children:[t,(0,eM.jsxs)("div",{className:"pPcKj1kNkKP4cQZUtFRU5g==",children:[n?.implementationName&&(0,eM.jsx)("p",{children:(0,h.V)(n.implementationName)}),(0,eM.jsx)("p",{className:"_3d4ICXZtVrDwUYN1iMMJCA==",children:e})]})]})},dK=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=(0,e_.WK)(t,e,n,i),u="tablet"===(0,e_.qv)(),c=(0,h.V)("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,eM.jsx)(eM.Fragment,{children:e>0&&(0,eM.jsxs)("div",{className:eB()({"lQ3akicW2mAhjncqby7nDA==":u,"HfUTYLFumnQ+awk4OaX1Dg==":!u}),children:[(0,eM.jsxs)("div",{children:[c,o&&(0,eM.jsx)(e_.i_,{to:o,className:"NM9v7zGqLsggVcQgLFigdA==",children:a??(0,h.V)("seeAll","See all")})]}),(0,eM.jsx)(eW.Pagination,{className:"WzkBsEFtArGu5wzXr0lPcA==",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>(0,h.V)("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function dH(e){return dq(dY(e,"usual","official"))}function dG(e){return dH(e)}function dq(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function dZ(e){return dq(e)}function dY(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function dJ(e,t=ug()()){let r=ug()(t),n=cd(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function dQ(e,t=ug()()){let r=dJ(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),cc(r,n)}let dX={container:"Gjd-4rKbEfNJ1EnpVM5fDg==",activePatientContainer:"QLcpgcrRf24FIBxfL-Reow==",patientBanner:"_7nrgC9D3asLAi-n1Cu-+aQ==",patientName:"-bF9a-l+JKDw4GnX6Iibsw==",patientAvatar:"AkN3HR6abRKcGhD1xnV8+w==",patientAvatarButton:"KDxA6I0UaFgLEI3mjex7Sg==",patientInfo:"+WtDB+1dogKuMZh79ffYHA==",demographics:"Vtf3vivMNnVD8Iw8FKnzIg==",row:"NIOYIHZjX3g7f-6H9EkSAg==",flexRow:"VxdGBrkVaGOrwx9RLt5iGA==",tagsSlot:"lU6+4m9TGusLI5P4rs2PxQ==",identifiers:"tehd8btQy-Upd-+nQmM3Ng==",identifier:"bSJIFK4yvsj7cwSGcOeCeg==",primaryIdentifier:"yOV1BITeMsXWDZ0-ZuNmRA==",secondaryIdentifier:"WvJbhTqh9ZSXAOeO7O+qjw==",value:"sBM-qDgU2-uAwtlPf+7gjA==",tag:"BEvEVs8H7vGP3H5V4Ec7VA==",gender:"_4XkLqr-02wazwbUoUfB7ow==",separator:"iYBA3rO3YNmv7d1qmnvvcA==",tooltipPadding:"EWVCKw9MY3VDbqwyPpZwyA==",tooltipSmallText:"yDmRU9+68HwaptpjumYB7w==",actionsButtonText:"mn139IetW5A5xAlW5YMrZQ=="};function d0({showIdentifierLabel:e,type:t,value:r}){return(0,eM.jsx)("span",{className:dX.primaryIdentifier,children:(0,eM.jsxs)(eW.Tag,{className:dX.tag,type:"gray",children:[e&&t?.text&&(0,eM.jsxs)("span",{className:dX.label,children:[t.text,": "]}),(0,eM.jsx)("span",{className:dX.value,children:r})]})})}function d1({showIdentifierLabel:e,type:t,value:r}){return(0,eM.jsxs)(eW.FormLabel,{className:dX.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,eM.jsxs)("span",{className:dX.label,children:[t?.text,": "]}),(0,eM.jsx)("span",{className:dX.value,children:r})]})}function d4({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=(0,e_.UK)(),{primaryIdentifierCode:n}=(0,e_.wJ)(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,eM.jsx)(eM.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,eM.jsxs)(eL().Fragment,{children:[(0,eM.jsx)("span",{className:dX.identifier,children:r?.coding?.[0]?.code===n?(0,eM.jsx)(d0,{showIdentifierLabel:t,type:r,value:e}):(0,eM.jsx)(d1,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"})]},e)):""})}let d2={Female:tD,Male:tO,Other:tP,Unknown:tC},d3=({gender:e})=>{let t=d2[e];return t?(0,eM.jsx)(t,{fill:"#525252"}):null},d6={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function d5({patient:e,renderedFrom:t}){var r;let n,o,i=dH(e),a=e?.gender&&(o=d6[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:(0,h.V)(n,r),iconKey:o}),s=(0,e$.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,eM.jsxs)("div",{className:dX.patientInfo,children:[(0,eM.jsx)("div",{className:eB()(dX.row,dX.patientNameRow),children:(0,eM.jsxs)("div",{className:dX.flexRow,children:[(0,eM.jsx)("span",{className:dX.patientName,children:i}),a&&(0,eM.jsxs)("div",{className:dX.gender,children:[(0,eM.jsx)(d3,{gender:a.iconKey}),(0,eM.jsx)("span",{children:a.displayText})]}),(0,eM.jsx)(e_.W3,{className:dX.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,eM.jsxs)("div",{className:dX.demographics,children:[e.birthDate&&(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("span",{children:dQ(e.birthDate)}),(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"}),(0,eM.jsx)("span",{children:co(e.birthDate,{time:!1})}),(0,eM.jsx)("span",{className:dX.separator,children:"\xb7"})]}),(0,eM.jsx)(d4,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,eM.jsx)(e_.W3,{className:dX.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var d9=r(3534);function d8({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,e$.useState)(!1),{extensions:a}=(0,e_.br)(r),s="tablet"===(0,e_.qv)(),l=(0,e_.Wr)(()=>i(!1),o),u=(0,e$.useRef)(null),c=(0,e$.useRef)(null),d=(0,e$.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,m=(0,e$.useCallback)(()=>i(e=>!e),[]),y=(0,e$.useCallback)(()=>{i(!1),u.current?.focus()},[]),v=(0,e$.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),y();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[y,o]);(0,e$.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,e$.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:y,...n}),[t,e,y,n]);return 0===a.length?null:(0,eM.jsx)("div",{className:"lXHHD93To9w3SyNIoCMHSQ==",children:(0,eM.jsxs)("div",{"data-overflow-menu":!0,className:eB()("cds--overflow-menu",eH),ref:l,children:[(0,eM.jsxs)("button",{className:eB()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},eZ),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:m,onKeyDown:v,ref:u,children:[(0,eM.jsx)("span",{className:"SdOyMS1Pdej4TaBLRHDong==",children:(0,h.V)("actions","Actions")})," ",(0,eM.jsx)(d9.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,eM.jsxs)("div",{className:eB()("cds--overflow-menu-options","cds--overflow-menu--flip",eG,{[eq]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:v,ref:c,role:"menu",tabIndex:-1,children:[(0,eM.jsx)("ul",{className:eB()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,eM.jsx)(e_.W3,{name:r,state:g},r)}),(0,eM.jsx)("span",{})]})]})})}var d7=r(51982),fe=r.n(d7),ft=r(15931),fr=r.n(ft);function fn(e){let{patientPhotoConceptUuid:t}=(0,e_.UK)({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${d.Jj}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=fr()(e?r:null,d.lo),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let fo=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,e0.useTranslation)();return(0,eM.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,eM.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,eM.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"})]})},fi="t5TmZmWjzvbCohKkMNbM-g==";function fa({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=fn(e),[i,a]=(0,e$.useState)(null),[s,l]=(0,e$.useState)(!1),u=(0,e$.useMemo)(()=>fe().generate(e),[e]);(0,e$.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,e$.useMemo)(()=>r||(i?(0,h.V)("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):(0,h.V)("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,eM.jsx)(eW.SkeletonIcon,{className:"ueN8QhkAPVeVEePyTHkCOg==","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,eM.jsx)(fo,{"aria-label":(0,h.V)("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,eM.jsx)("div",{"aria-label":c,children:(0,eM.jsx)("img",{className:fi,src:i,alt:c,title:t})}):(0,eM.jsx)("div",{"aria-label":c,children:(0,eM.jsx)("div",{className:fi,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,eM.jsx)("span",{className:"-k9HvZjk0UAVuy9F8zZz0w==",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let fs=["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-digital-trust","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-metadata-export","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"],fl=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),fu=fl,fc=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),fd=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),ff=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),fp=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),fh=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),fm=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),fy=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),fv=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),fg=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),fb=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),fw=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),f_=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),fx=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),fE=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),fS=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),fD=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),fO=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),fP=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),fC=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),fj=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),fA=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),fk=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),fT=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),fR=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),fN=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),fI=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),fM=(0,e$.memo)((0,e$.forwardRef)(function(e,t){return(0,eM.jsx)(fB,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),f$=fg,fL=fP,fF=(0,e$.memo)((0,e$.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,e$.useRef)(document.getElementById(e));return(0,e$.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,eM.jsx)(e_.fS,{value:o.current,fallback:t,children:(0,eM.jsx)(fB,{ref:n,pictogram:e,pictogramProps:r})})})),fB=(0,e$.memo)((0,e$.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,eM.jsx)("svg",{ref:r,className:eB()("wXX7tgyTzQUB487Ai2jwkw==",n),height:o,width:o,children:(0,eM.jsx)("use",{href:`#${e}`})})})),fV=({children:e})=>"tablet"===(0,e_.qv)()?(0,eM.jsx)(eW.Layer,{children:e}):(0,eM.jsx)(eM.Fragment,{children:e}),fU=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...f}=e,[p,m]=(0,e$.useState)(r),[y,v]=(0,e$.useState)(!0),[g,b]=(0,e$.useState)(!1),w=(0,e$.useCallback)(()=>{setTimeout(t,250)},[t]),x=(0,e$.useCallback)(()=>{b(!0),w()},[w]);return(0,e$.useEffect)(()=>{if(u){let e=setTimeout(x,l);return()=>clearTimeout(e)}},[l,u,x]),(0,e$.useEffect)(()=>{v(!1),window.setTimeout(()=>{v(!0)},0)},[]),(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:p,"aria-label":(0,h.V)("closeSnackbar","Close snackbar"),className:eB()("-oZItDje+VqIMbRFsj0vKg==",{"M2YBUemKsEmA3Eg4hsWRFQ==":y,"yEmGTBZUeA8w30tHbNSn5g==":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),x(),a&&m(a)},onClose:w,statusIconDescription:(0,h.V)("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},fW=({subject:e})=>{let[t,r]=(0,e$.useState)([]),n=(0,e$.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(fU,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},fz=new dh.Subject,fK=0;function fH(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(fW,{subject:fz}))}function fG(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{fz.next({...e,id:fK++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let fq=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,e$.useCallback)(()=>{s(),t()},[t,s]);return(0,eM.jsx)("div",{children:(0,eM.jsx)(eW.ActionableNotification,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},fZ=({subject:e})=>{let[t,r]=(0,e$.useState)([]),n=(0,e$.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,e$.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsx)(fq,{toast:e,closeToast:()=>n(e)},e.id))})},fY=new dh.Subject,fJ=0;function fQ(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(fZ,{subject:fY}))}function fX(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!dC(t))?setTimeout(()=>{fY.next({...e,id:fJ++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function f0(e,t=!1){if(t)return!0;let r=f6[e];return!r||!r()}function f1(e,t){let r=pn.getState()?.workspaceGroup,n=r?.name;n&&e===n&&ps(()=>{let n=pf(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),pn.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function f4(e,t){let{name:r,additionalProps:n}=t;(0,ev.Xb)(r);let o=()=>{pe(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>f2(r,n),closeWorkspaceGroup:!1})};f0(e.name)?o():pu("closing-workspace-launching-new-workspace",o,e.title??e.name)}function f2(e,t){let r=(0,ev.Xb)(e),n=pn.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void f1(n.name,()=>{f2(e,t)});let o=pn.getState().workspaceGroup?.name,i={...r,title:pc(r,t),closeWorkspace:(t={})=>pe(e,t),closeWorkspaceWithSavedChanges:t=>pe(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(f6[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,pn.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){pn.setState(r=>{let n=[e,...t??r.openWorkspaces],o=pa(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&pf(o,t);let s=pn.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===pc(t,t.additionalProps)&&{title:pc(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,pn.getState().openWorkspaces.filter(e=>e.type!=i.type)),f4(u,{name:e,additionalProps:t})):a(i);else f4(s[0],{name:e,additionalProps:t})}function f3({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){pt(t),f2(r,n),(0,eb.oo)({to:e})}let f6={};function f5(e,t){f6[e]=t}function f9(e){return f6[e]}function f8(){let e=pn.getState();pn.setState({...e,prompt:null})}let f7={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function pe(e,t={}){t={...f7,...t};let r=()=>{let r=pn.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=pn.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&f1(o),f6[e]=()=>!1,pn.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:pa(n?.[0])})),t?.onWorkspaceClose?.()};return f0(e,t?.ignoreChanges)?(r(),!0):(pu("closing-workspace",r,(0,ev.Xb)(e).title??e),!1)}function pt(e){pn.getState().context!=e&&pn.setState({context:e,openWorkspaces:[],prompt:null})}let pr={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},pn=(0,ek.Zd)("workspace",pr);function po(){return pn}function pi(e){let t=pn.getState();pn.setState({...t,workspaceWindowState:e})}function pa(e){return e?.preferredWindowSize??"normal"}function ps(e=()=>{},t=()=>!0){let r=pn.getState().openWorkspaces.filter(t).every(({name:e})=>f0(e)),n=()=>{pd(),e?.()};r?n():pu("closing-all-workspaces",n)}function pl(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=(0,e_.Pj)(pn);return(0,e$.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function pu(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:(0,h.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,h.V)("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:(0,h.V)("discard","Discard")};break;case"closing-all-workspaces":{let e=pn.getState().openWorkspaces.filter(({name:e})=>!f0(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:(0,h.V)("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:(0,h.V)("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:()=>{t?.()},confirmText:(0,h.V)("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:(0,h.V)("unsavedChangesTitleText","Unsaved changes"),body:(0,h.V)("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{pn.setState(e=>({...e,prompt:null})),t?.()},confirmText:(0,h.V)("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}pn.setState(e=>({...e,prompt:n}))}function pc(e,t){return t?.workspaceTitle??e.title}function pd(){pn.setState(pr)}function pf(e,t={}){if(!e||"default"===e)return;let r=(0,ek.jf)(e,{});return t&&r.setState(e=>({...e,...t})),r}let pp="f7spBy3jUTfjOH25a05A1A==",ph="ZROo9Y2WovRqEcmbEXN7sQ==",pm="+mcQhrE2BMNqPBknif4FqQ==";function py({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,eM.jsxs)(eM.Fragment,{children:[e({size:16}),t?(0,eM.jsx)("span",{className:"_7695LgJosRmkPmkyVGdZ-g==",children:"!"}):(0,eM.jsx)("span",{className:"vo9ZXEHO6camG8qEsBCH8A==",children:r})]})}let pv=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=(0,e_.qv)(),{workspaces:s,workspaceWindowState:l}=pl(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,eM.jsxs)(eW.Button,{className:eB()(pp,{[pm]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,eM.jsx)("span",{className:ph,children:(0,eM.jsx)(py,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,eM.jsx)("span",{children:t})]}):(0,eM.jsx)(eW.IconButton,{align:"left","aria-label":r,className:eB()(pp,{[pm]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,eM.jsx)("div",{className:ph,children:(0,eM.jsx)(py,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var pg=r(4964),pb=r(37650),pw=r(44314),p_=/[\\^$.*+?()[\]{}|]/g,px=RegExp(p_.source);let pE=function(e){return(e=(0,pw.A)(e))&&px.test(e)?e.replace(p_,"\\$&"):e};function pS({contextKey:e}){let{prompt:t}=pl();return(0,e$.useEffect)(()=>{RegExp(`/${pE(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,e$.useEffect)(()=>(pt(e),()=>{pt(null)}),[e]),(0,e$.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${pE(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=pn.getState().openWorkspaces.every(({name:e})=>f0(e));a||(s?pd():(r?.(),ps(()=>{(0,eb.oo)({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,eM.jsxs)(eW.ComposedModal,{open:!0,onClose:f8,children:[(0,eM.jsx)(eW.ModalHeader,{title:t.title}),(0,eM.jsx)(eW.ModalBody,{children:(0,eM.jsx)("p",{className:"+SBeVyf3Vs1HLINqeNxwCA==",children:t.body})}),(0,eM.jsxs)(eW.ModalFooter,{children:[(0,eM.jsx)(eW.Button,{kind:"secondary",onClick:f8,children:t.cancelText??(0,h.V)("cancel")}),(0,eM.jsx)(eW.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??(0,h.V)("confirm")})]})]}):null}var pD=r(87757);function pO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pO(Object(r),!0).forEach(function(t){pj(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function pC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pj(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pA(e){return(pA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pk(e,t){return(pk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pT(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var pR=function(e){var t=e$.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&pk(a,t);var r,n,o,i=(r=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,t=pA(a);e=r?Reflect.construct(t,arguments,pA(this).constructor):t.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 pT(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),pj(pT(t=i.call(this,e)),"handleRef",function(e){t.el=e}),pj(pT(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),pj(pT(t),"getParcelProps",function(){var e=pP(pP({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.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 t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)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?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,pP({domElement:t},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 pD.i&&pD.i.Consumer?e$.createElement(pD.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=pD.i&&pD.i.Consumer?e$.createElement(pD.i.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return e$.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],pC(a.prototype,n),o&&pC(a,o),a}();pj(pR,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});let pN=(0,ev.U2)();function pI({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,e$.useState)(),o=function(e){let[t,r]=(0,e$.useState)({}),[n,o]=(0,e$.useState)(e);return(0,e$.useEffect)(()=>{n!==e&&o(e)},[e]),(0,e$.useEffect)(()=>{let e,t=pf(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,e$.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,e$.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,eM.jsx)(pR,{config:r,mountParcel:pN,...i},e.name):(0,eM.jsx)(eW.InlineLoading,{className:"H6dHj0oBasuEG5BThmRHhw==",description:`${(0,h.V)("loading","Loading")} ...`})}function pM({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,e$.useState)(!1),i=(0,e$.useRef)(window.innerHeight),{featureName:a}=(0,e$.useContext)(e_.zq),s=(0,e_.qv)();(0,e$.useEffect)(()=>{let e=()=>{o(!(0,e_.xl)(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,eM.jsx)("aside",{className:eB()("GJUJ7TWs47hZNAq1HgT48A==",{"_7+TCfrT4vrpC5TH4e1by0w==":e,"bQ0UMzF1JBk1bcCogWlGrw==":n,"v-1cRnDYDLbApkU1gJodvg==":!n}),children:(0,eM.jsx)("div",{className:"WocuWYX1W7JwP94ypr0B8A==",children:(0,eM.jsx)(e_.W3,{className:"Cn3Jbzq8LOgwfW4fj6XYSQ==",name:l,state:r})})})}function p$({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=(0,e_.qv)(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=pl(),u=l?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,e$.useMemo)(()=>r||u&&!d,[u,d,r]);return(0,e_.yJ)(!d&&!(0,e_.xl)(i)),(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)("div",{className:r?"AHHuuXanpv12GtwxcK3ogA==":"E7yiHjGY1d2E+4Abx0jh7g==",children:[(0,eM.jsx)("aside",{className:eB()(t?"_7nS969hUMMe36pOPOtI3Fg==":"l+rgkmJVqlq3O++ce09vbA==",{"AJHmQ2iPp0Yic2jCrU6NIA==":d,"Vb16L-oIiZ74fu1QQMOirg==":"narrow"===f,"Bn7v8I0voAWdRO7H9eKQiw==":"wider"===f,"vN8kIRmjOaaBlFkAfGVJ5g==":"extra-wide"===f}),children:(0,eM.jsx)("div",{className:eB()("pBPmoo5CjBr1d116v8KrrA==",{"Sew5FCwW7FqufRz17h2owg==":"maximized"===s,"BxutHfy6GErdVMJpbvmkVg==":d}),children:a.map((e,t)=>(0,eM.jsx)("div",{className:eB()("tYaVVyyd6Tcv58Bbo4mkcw==",{"lBaWeq3srAzA5Ngk2dm0kQ==":0!==t}),children:(0,eM.jsx)(e$.Suspense,{fallback:null,children:(0,eM.jsx)(e0.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,eM.jsx)(pL,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,eM.jsx)(pS,{contextKey:e})]}),p&&(0,eM.jsx)(pM,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function pL({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,e0.useTranslation)(),n=(0,e_.qv)(),{workspaceWindowState:o,workspaceGroup:i}=pl(),a=i?.name,s="maximized"===o;(0,e$.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,e$.useContext)(e_.zq),u=(0,e$.useCallback)(()=>{pi(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,e$.useMemo)(()=>e??{},[e]),m=(0,e$.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)(eW.Header,{"aria-label":(0,h.V)("workspaceHeader","Workspace Header"),className:"-3kjtr5uYox3-kZnfzcNuw==",children:[!(0,e_.xl)(n)&&!c&&(0,eM.jsx)(eW.HeaderMenuButton,{"aria-label":(0,h.V)("close","Close"),renderMenuIcon:(0,eM.jsx)(e5,{}),onClick:()=>p()}),(0,eM.jsx)(eW.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,eM.jsx)("div",{className:"_2Zd7JZN89pW2XY09qZBAAw=="}),(0,eM.jsxs)(eW.HeaderGlobalBar,{className:"ppNsYZC7Z00KBemD1lNxQA==",children:[(0,eM.jsx)(e_.W3,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,eM.jsx)(e_.W3,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,eM.jsx)(e_.W3,{name:`workspace-header-${l}-slot`,state:m}),(0,e_.xl)(n)&&(0,eM.jsxs)(eM.Fragment,{children:[(d||s)&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":s?(0,h.V)("minimize","Minimize"):(0,h.V)("maximize","Maximize"),onClick:u,children:s?(0,eM.jsx)(pg.Xj,{}):(0,eM.jsx)(pg.hz,{})}),c&&!a?(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide","Hide"),onClick:()=>pi("hidden"),children:(0,eM.jsx)(e9,{})}):(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close","Close"),onClick:()=>p?.(),children:(0,eM.jsx)(tm,{})})]}),"tablet"===n&&c&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close","Close"),onClick:()=>p?.(),children:(0,eM.jsx)(pb.d3,{})})]})]}),(0,eM.jsx)("div",{className:eB()("cNdK12M+p0cj6LR0VGui6A==",{"RXftxuAFC8bU7RXpujMdHA==":!!f}),children:(0,eM.jsx)(pI,{workspace:e,additionalPropsFromPage:t},e.name)})]})}var pF=r(49598),pB=r(92424);async function pV(e,t){let{openedGroup:r}=ev.J_.getState();if(r){if(r.groupName===e&&pz(r.props,t))return!0;else if(!await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return ev.J_.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function pU(e){let{openedGroup:t,openedWindows:r}=ev.J_.getState();if(t){if(r.length>0&&!(e||await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;ev.J_.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function pW(e,t=null,r=null,n=null){let o=ev.J_.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=(0,ev.Ml)(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=(0,ev.o1)(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=(0,ev.YX)(e);if(a&&(a.groupName!==l.name||!pz(a.props,n)))return!!await pK({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(pz(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&pz(d.props,t)?((a||u!==o.openedWindows.length-1)&&ev.J_.setState(pH.restoreWindow(o,s)),!0):!!await pK({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[pY(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await pK({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await pK({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(ev.J_.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[pY(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function pz(e,t){return null==e||null==t||(0,pB.b)(e,t)}function pK(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=ev.J_.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=dp("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let pH={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=(0,ev.YX)(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,pY(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=(0,ev.YX)(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function pG(){return(0,e_.mQ)(ev.J_,pH)}let pq=()=>(0,e$.useContext)(pD.i),pZ=()=>Object.keys(ev.J_.getState().registeredWorkspacesByName);function pY(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:(0,pF.A)()}}let pJ={workspaceOuterContainer:"bPVpyfZzXGTGRy6q-9pUCQ==",narrowWorkspace:"kSYS7aTPRggp+MU8vlcg9Q==",widerWorkspace:"nW2HBDZ0RgkGRkWQv4sdoQ==",extraWideWorkspace:"em5yAU5C7oWbHDo0sV+3mw==",workspaceMiddleContainer:"Bx1i6z+7q-g19Un039FkIw==",maximized:"Kfygrk5eNBXuECXupuCX8g==",hidden:"RPimX0oediR2hea+lS-OuQ==",workspaceInnerContainer:"_5zxptoWhQKImthth5lAP+g==",workspaceSpacer:"E+9820x1sb5UGVFe-CBnKA==",loader:"vmBQnPcRkkl1-BXrxfe78A==",hiddenExtraWorkspace:"qkbMGOnFdM1xyc3yNGcang==",header:"IZ-2+-SpwQ-zVx81DihBdw==",headerButtons:"_81a2NYhmPVTD24yRK8d2FQ==",workspaceContent:"eetPy90L7DgJzpdTBFH3sg==",overlayHeaderSpacer:"ruc6rYzwbrMxADrXzvYMPA==",isActionMenuOpened:"XgCkc1lLTADQAwD3tG9jVA==",showActionMenu:"sHRt1Fx7e+48j2yyo8ktzg==",marginWorkspaceContent:"TN+S+hiol289+iSd7tDjwA==",workspaceContainerWithActionMenu:"xLg8emf8GoZJo-KsUJV1QQ==",workspaceFixedContainer:"W9cgZ7vfCSiTpKs+aaYksQ==",workspaceContainerWithoutActionMenu:"fRrxdLWEtrSuNfqGjVjqVA=="},pQ=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=(0,e_.qv)(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:m}=pG(),{workspaceName:y,isRootWorkspace:v,closeWorkspace:g,showActionMenu:b}=pq(),w=(0,ev.YX)(y),x=s[w],E=x?.openedWorkspaces.find(e=>e.workspaceName===y);if((0,e$.useEffect)(()=>{E?.hasUnsavedChanges!=r&&a(y,r??!1)},[E?.hasUnsavedChanges,r,y,a]),(0,e$.useEffect)(()=>{f[y]!==e&&p(y,e)},[f,y,e,p]),w<0||null==l||null==E)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let D=d[y].window,O=c[D];if(!O)throw Error(`Cannot find registered workspace window ${D}`);let{icon:P,canMaximize:C}=O,j="closable"===S.persistence,A=!!P&&!j,{maximized:k}=x,T=O?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=w<s.length-1||m;return(0,eM.jsxs)("div",{className:eB()(pJ.workspaceOuterContainer,{[pJ.narrowWorkspace]:"narrow"===T,[pJ.widerWorkspace]:"wider"===T,[pJ.extraWideWorkspace]:"extra-wide"===T,[pJ.isActionMenuOpened]:R}),children:[(0,eM.jsx)("div",{className:eB()(pJ.workspaceSpacer,{[pJ.hidden]:N})}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceMiddleContainer,{[pJ.maximized]:k,[pJ.hidden]:N,[pJ.isRootWorkspace]:v,[pJ.showActionMenu]:b}),children:(0,eM.jsxs)("div",{className:eB()(pJ.workspaceInnerContainer,{[pJ.maximized]:k,[pJ.hidden]:N,[pJ.isRootWorkspace]:v}),children:[(0,eM.jsxs)(eW.Header,{"aria-label":(0,h.V)("workspaceHeader"),className:pJ.header,children:[(0,eM.jsx)(eW.HeaderName,{prefix:"",children:e}),(0,eM.jsx)("div",{className:pJ.overlayHeaderSpacer}),(0,eM.jsx)(eW.HeaderGlobalBar,{className:pJ.headerButtons,children:(0,e_.xl)(n)?(0,eM.jsxs)(eM.Fragment,{children:[(C||k)&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":k?(0,h.V)("minimize"):(0,h.V)("maximize"),onClick:()=>o(D,!k),children:k?(0,eM.jsx)(pg.Xj,{}):(0,eM.jsx)(pg.hz,{})}),A&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide"),onClick:()=>i(),children:(0,eM.jsx)(e9,{})}),!j&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close"),onClick:()=>g({closeWindow:!0}),children:(0,eM.jsx)(tm,{})})]}):(0,eM.jsxs)(eM.Fragment,{children:[A&&(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("hide"),onClick:()=>i(),children:(0,eM.jsx)(pb.d3,{})}),(0,eM.jsx)(eW.HeaderGlobalAction,{"aria-label":(0,h.V)("close"),onClick:()=>{j?pU():g({closeWindow:!0})},children:(0,eM.jsx)(tm,{})})]})})]}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceContent),children:t})]})})]})},pX="jc6--ve4CL-z756RWjy-Gg==",p0="whLL8QyjyxlJqTQo67X7BQ==",p1="fbyFm5PlSWWUnG9aPE8kTg==",p4="+aVpzvvOae5n83hGlMESXg==";function p2({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,eM.jsxs)(eM.Fragment,{children:[e({size:16}),t?(0,eM.jsx)("span",{className:"sRkvSBatkOj+HMw7m2i81Q==",children:"!"}):(0,eM.jsx)("span",{className:"XMH0DAK2HUw4W4tYCVa-Fg==",children:r})]})}let p3=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=(0,e_.qv)(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=pG(),{extension:c}=(0,e$.useContext)(e_.zq),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||u),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,v=async()=>{if(p)h?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;pW(e,t,r)}};return"tablet"===i||"phone"===i?(0,eM.jsxs)(eW.Button,{className:eB()(pX,{[p1]:p&&!m,[p4]:m}),iconDescription:t,kind:"ghost",onClick:v,role:"button",tabIndex:0,size:"md",children:[(0,eM.jsx)("span",{className:p0,children:(0,eM.jsx)(p2,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,eM.jsx)("span",{children:t})]}):(0,eM.jsx)(eW.IconButton,{align:"left","aria-label":t,className:eB()(pX,{[p1]:p&&!m,[p4]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:v,size:"md",children:(0,eM.jsx)("div",{className:p0,children:(0,eM.jsx)(p2,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function p6({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,eM.jsx)(eW.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?th:td,children:e?(0,h.V)("showLess","Show less"):(0,h.V)("showMore","Show more")})}let p5={contactDetails:"R7vfY7Iaw0lD8ocVMwqawA==",deceased:"nTt+luUWofi9sOTbqKrEMQ==",heading:"x7UoTntwbhzXmMIis3mxBw==",row:"qFgIi9mOLR8Ix3ZH8vrDYA==",col:"JXUlg85aLlEdoM3F7PHY9A==",relationship:"T3LO-FI5uzpceBz7W+qY3w=="},p9=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${d.Jj}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=fr()(t,d.lo),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,e$.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsxs)("p",{className:p5.heading,children:[(0,h.V)("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>u8(e?.startDate).getTime()-u8(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,eM.jsx)("li",{children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,eM.jsx)("li",{children:"--"})})(),t.length>3&&(0,eM.jsx)("li",{className:p5.link,children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/home/patient-lists`,children:(0,h.V)("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},p8=({patientId:e})=>{let{patient:t,isLoading:r}=(0,e_.tQ)(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("address","Address")}),(0,eM.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,eM.jsxs)("li",{children:[(0,h.V)(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,eM.jsxs)("li",{children:[(0,h.V)(e,e),": ",t]},`address-${e}`)):(0,eM.jsx)("li",{children:"--"})})]})},p7=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=(0,e_.UK)({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=c5()(`${d.Jj}/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)))`,d.lo);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,e$.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,e$.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?(0,h.V)(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("contactDetails","Contact Details")}),t?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,eM.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,eM.jsx)("li",{children:"--"})})]})},he=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${d.Jj}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=fr()(e?t:null,d.lo),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,eM.jsxs)(eM.Fragment,{children:[(0,eM.jsx)("p",{className:p5.heading,children:(0,h.V)("relationships","Relationships")}),r?(0,eM.jsx)(eW.InlineLoading,{description:`${(0,h.V)("loading","Loading")} ...`,role:"progressbar"}):(0,eM.jsx)("ul",{children:t&&t.length>0?(0,eM.jsx)(eM.Fragment,{children:t.map(e=>(0,eM.jsxs)("li",{className:p5.relationship,children:[(0,eM.jsx)("div",{children:(0,eM.jsx)(e_.i_,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,eM.jsx)("div",{children:e.relationshipType}),(0,eM.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?(0,h.V)("yearAbbreviation","yr"):(0,h.V)("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,eM.jsx)("li",{children:"--"})})]})};function ht({patientId:e,deceased:t}){return(0,eM.jsxs)("div",{className:eB()(p5.contactDetails,{[p5.deceased]:t}),children:[(0,eM.jsxs)("div",{className:p5.row,children:[(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p8,{patientId:e})}),(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p7,{patientUuid:e})})]}),(0,eM.jsxs)("div",{className:p5.row,children:[(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(he,{patientId:e})}),(0,eM.jsx)("div",{className:p5.col,children:(0,eM.jsx)(p9,{patientUuid:e})})]})]})}function hr(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let hn="_6Gke0iocK8-7xF6UDXtjtQ==";function ho({workspaceGroup:e,groupProps:t}){let r=(0,e_.qv)(),{persistence:n}=e;return(0,eM.jsx)("aside",{className:"T2lMV3y-c2DH29-1sQdY7g==",children:(0,eM.jsxs)("div",{className:hn,children:["closable"==n&&(0,e_.xl)(r)&&(0,eM.jsx)(eW.IconButton,{align:"left",onClick:()=>pU(),label:(0,h.V)("close"),kind:"ghost",children:(0,eM.jsx)(tm,{})}),(0,eM.jsx)(e_.zq.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,eM.jsx)(e_.W3,{className:hn,name:e.name,state:{groupProps:t}})})]})})}function hi(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let ha=(0,ev.U2)(),hs=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=pG(),u=(0,e$.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await pK({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await pK({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await pK({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,workspaceMeta:ev.J_.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=ev.J_.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=ev.J_.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,eM.jsxs)("div",{className:eB()(pJ.workspaceOuterContainer,{[pJ.narrowWorkspace]:"narrow"===u,[pJ.widerWorkspace]:"wider"===u,[pJ.extraWideWorkspace]:"extra-wide"===u,[pJ.isActionMenuOpened]:c}),children:[(0,eM.jsx)("div",{className:pJ.workspaceSpacer}),(0,eM.jsx)("div",{className:eB()(pJ.workspaceMiddleContainer,{[pJ.isRootWorkspace]:n,[pJ.showActionMenu]:i}),children:(0,eM.jsx)("div",{className:eB()(pJ.workspaceInnerContainer,{[pJ.isRootWorkspace]:n}),children:(0,eM.jsx)(eW.InlineLoading,{className:pJ.loader,description:`${(0,h.V)("loading")} ...`})})})]})}return(0,eM.jsx)(pR,{config:e,mountParcel:ha,...u},t.workspaceName)},hl=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,e$.useState)({}),{registeredWorkspacesByName:i}=ev.J_.getState();return(0,e$.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await eS(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,eM.jsx)(eM.Fragment,{children:r.map((o,i)=>(0,eM.jsx)(hs,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function hu(e){e&&(0,dj.createRoot)(e).render((0,eM.jsx)(hc,{}))}function hc(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=pG();if((0,e$.useEffect)(()=>(0,eu.$y)("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(pU().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=hi(t),i=hi(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(pU().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,eM.jsxs)("div",{className:eB()("_2u2mcnHqn77Jo33H5a1H2g==",{"_7RHYZQ-hEc8EPJUY-c9Hpg==":o.overlay,"gvJRdHcF9cqv2qaFk6opjw==":i}),children:[(0,eM.jsx)("div",{className:"_40ITOKKqqE8nvSQt409qiA==",children:t.map(e=>(0,eM.jsx)(hl,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,eM.jsx)(ho,{workspaceGroup:o,groupProps:e.props})]})}var hd=r(27934);function hf(e,t,r){if(null==e)return r;let n=u_(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=u_(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function hp(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function hh(e){return!!e&&e.constructor===Object}var hm=r(60574);function hy(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function hv(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=hy(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return hy(e)}(t);return hm.satisfies(r,e,{includePrerelease:!0})}async function hg(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await hb(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function hb(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},19076(e,t,r){"use strict";r.d(t,{$3:()=>y,FI:()=>h,LQ:()=>m,Vt:()=>v,Yt:()=>o,bJ:()=>g,bK:()=>b,dX:()=>w,ff:()=>u,gj:()=>i,ls:()=>x,pc:()=>l,sT:()=>a});let n="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function a(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}let s="openmrs:precache-static-dependencies";function l(e={}){window.dispatchEvent(new CustomEvent(s,{detail:e}))}function u(e){let t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}let c="openmrs:notification-shown",d="openmrs:actionable-notification-shown",f="openmrs:toast-shown",p="openmrs:snack-bar-shown";function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function m(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function g(e){let t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function b(e){let t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function w(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function x(e){let t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}},72448(e,t,r){"use strict";r.d(t,{tA:()=>w,JK:()=>b,g4:()=>x,vf:()=>i,MY:()=>a,Wh:()=>g,qh:()=>c,lz:()=>s,D_:()=>u,JG:()=>p,oo:()=>m,zl:()=>h});var n=r(79758);let o=(0,r(61841).Zd)("breadcrumbs",[]);function i(e){return a([e])}function a(e){let t=[...s(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,n.pathToRegexp)(e.matcher).regexp:(0,n.pathToRegexp)(e.path).regexp,settings:e}))];o.setState(t,!0)}function s(){return o.getState()}function l(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=l(e,r.join("/"));if(t)return t}}(e,t)}function u(e,t){if(e.length>0){let r=l(e,t);if(r){let t=[r],n=l(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=l(e,n.settings.parent);return t.reverse()}}return[]}function c(e){return u(s(),e)}var d=r(480),f=r(42007);function p(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=h(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function h(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function m({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=p(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error((0,f.V)("navigateNonHttp"));n.startsWith(r)?(0,d.navigateToUrl)(n):window.location.assign(n)}let y="openmrs:history";function v(e){let t=JSON.parse(sessionStorage.getItem(y)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(y,JSON.stringify(t))}function g(){0===JSON.parse(sessionStorage.getItem(y)??"[]").length&&document.referrer&&v(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=b();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(y,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?w({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&v(window.location.href)})}function b(){return JSON.parse(sessionStorage.getItem(y)??"[]")}function w({toUrl:e}){let t=b(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);m({to:t[r]}),sessionStorage.setItem(y,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function x(){sessionStorage.removeItem(y)}},36604(e,t,r){"use strict";let n,o;r.d(t,{nr:()=>k,xN:()=>r9,u1:()=>nm,KG:()=>nb,FO:()=>r8,FE:()=>nl,LM:()=>rY,sA:()=>nn,Rs:()=>v,ff:()=>nd,wn:()=>np,sK:()=>nw,lY:()=>r7,ms:()=>x,Zr:()=>r1,WK:()=>ng,WA:()=>nu,UH:()=>g,cy:()=>ne,Gp:()=>r5,jU:()=>nr,Og:()=>A,iD:()=>ns,C$:()=>r6,qb:()=>na,Iq:()=>r0,NU:()=>nf,sZ:()=>y,yD:()=>nc,Io:()=>r4,wJ:()=>j,JC:()=>w,e:()=>rH,xc:()=>r2,pb:()=>r3,bO:()=>no,AO:()=>rJ,Td:()=>nh,Gj:()=>b});try{self["workbox:window:6.5.4"]&&_()}catch(e){}function i(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var l=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function u(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function d(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function f(){}var p={type:"SKIP_WAITING"};function h(e,t){if(!t)return e&&e.then?e.then(f):Promise.resolve()}var m=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new l,n.en=new l,n.on=new l,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!u(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new c(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new c("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new c("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return d(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new c("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return h(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),d(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&u(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new c("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?h(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 d(this.getSW(),function(t){return i(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&i(this.fn.waiting,p)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&u(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return d(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],a(t.prototype,r),n&&a(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function y(e,t){if(void 0!==o)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),o;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new m(e,t);return o=r.register().then(()=>r.controlling.then(()=>r))}function v(){return o??Promise.resolve(void 0)}let g="x-omrs-offline-response-body",b="x-omrs-offline-response-status",w="x-omrs-offline-caching-strategy";async function x(e){let t=await v();return t?await t.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 E(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function S(){return!window.indexedDB}async function D(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function O(){return await D()||await S()||await E()}let P="openmrs3:offline-mode",C="unavailable";function j(){return{current:C,notAvailable:"unavailable"===C,active:"on"===C}}function A(e){"unavailable"!==C&&"unavailable"!==e&&(localStorage.setItem(P,"on"===e?"active":"disabled"),C=e)}async function k(){await O()||(C="active"===localStorage.getItem(P)?"on":"off"),navigator.onLine}let T="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,R=Object.keys,N=Array.isArray;function I(e,t){return"object"!=typeof t||R(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||T.Promise||(T.Promise=Promise);let M=Object.getPrototypeOf,$={}.hasOwnProperty;function L(e,t){return $.call(e,t)}function F(e,t){"function"==typeof t&&(t=t(M(e))),("u"<typeof Reflect?R:Reflect.ownKeys)(t).forEach(r=>{V(e,r,t[r])})}let B=Object.defineProperty;function V(e,t,r,n){B(e,t,I(r&&L(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function U(e){return{from:function(t){return e.prototype=Object.create(t.prototype),V(e.prototype,"constructor",e),{extend:F.bind(null,e.prototype)}}}}let W=Object.getOwnPropertyDescriptor;function z(e,t){let r;return W(e,t)||(r=M(e))&&z(r,t)}let K=[].slice;function H(e,t,r){return K.call(e,t,r)}function G(e,t){return t(e)}function q(e){if(!e)throw Error("Assertion Failed")}function Z(e){T.setImmediate?setImmediate(e):setTimeout(e,0)}function Y(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function J(e,t){if(L(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=J(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:J(s,t.substr(a+1))}}function Q(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){q("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)Q(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?N(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&L(e,a)||(l=e[a]={}),Q(l,s,r)}}else void 0===r?N(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function X(e){var t={};for(var r in e)L(e,r)&&(t[r]=e[r]);return t}let ee=[].concat;function et(e){return ee.apply([],e)}let er="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(et([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>T[e]),en=er.map(e=>T[e]);Y(er,e=>[e,!0]);let eo=null;function ei(e){eo="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=eo&&eo.get(t);if(r)return r;if(N(t)){r=[],eo&&eo.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(en.indexOf(t.constructor)>=0)r=t;else{let n=M(t);for(var i in r=n===Object.prototype?{}:Object.create(n),eo&&eo.set(t,r),t)L(t,i)&&(r[i]=e(t[i]))}return r}(e);return eo=null,t}let{toString:ea}={};function es(e){return ea.call(e).slice(8,-1)}let el="u">typeof Symbol?Symbol.iterator:"@@iterator",eu="symbol"==typeof el?function(e){var t;return null!=e&&(t=e[el])&&t.apply(e)}:function(){return null},ec={};function ed(e){var t,r,n,o;if(1==arguments.length){if(N(e))return e.slice();if(this===ec&&"string"==typeof e)return[e];if(o=eu(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let ef="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var ep="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),eh=()=>!0;let em=!Error("").stack;function ey(){if(em)try{throw ey.arguments,Error()}catch(e){return e}return Error()}function ev(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(eh).map(e=>"\n"+e).join("")):""}var eg=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],eb=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(eg),ew={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 e_(e,t){this._e=ey(),this.name=e,this.message=t}function ex(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function eE(e,t,r,n){this._e=ey(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=ex(e,t)}function eS(e,t){this._e=ey(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=ex(e,t)}U(e_).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ev(this._e,2))}},toString:function(){return this.name+": "+this.message}}),U(eE).from(e_),U(eS).from(e_);var eD=eb.reduce((e,t)=>(e[t]=t+"Error",e),{}),eO=eb.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=ey(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ew[t]||r,this.inner=null)}return U(n).from(e_),e[t]=n,e},{});eO.Syntax=SyntaxError,eO.Type=TypeError,eO.Range=RangeError;var eP=eg.reduce((e,t)=>(e[t+"Error"]=eO[t],e),{}),eC=eb.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=eO[t]),e),{});function ej(){}function eA(e){return e}function ek(e,t){return null==e||e===eA?t:function(r){return t(e(r))}}function eT(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function eR(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?eT(n,this.onsuccess):n),o&&(this.onerror=this.onerror?eT(o,this.onerror):o),void 0!==i?i:r}}function eN(e,t){return e===ej?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?eT(r,this.onsuccess):r),n&&(this.onerror=this.onerror?eT(n,this.onerror):n)}}function eI(e,t){return e===ej?t:function(r){var n=e.apply(this,arguments);I(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?eT(o,this.onsuccess):o),i&&(this.onerror=this.onerror?eT(i,this.onerror):i),void 0===n?void 0===a?void 0:a:I(n,a)}}function eM(e,t){return e===ej?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function e$(e,t){return e===ej?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}eC.ModifyError=eE,eC.DexieError=e_,eC.BulkError=eS;var eL={};let[eF,eB,eV]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,M(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,M(t),e]})(),eU=eB&&eB.then,eW=eF&&eF.constructor,ez=!!eV;var eK=!1,eH=eV?()=>{eV.then(tn)}:T.setImmediate?setImmediate.bind(null,tn):T.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{tn(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(tn,0)},eG=function(e,t){e4.push([e,t]),eZ&&(eH(),eZ=!1)},eq=!0,eZ=!0,eY=[],eJ=[],eQ=null,eX=eA,e0={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:tO,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{tO(e[0],e[1])}catch(e){}})}},e1=e0,e4=[],e2=0,e3=[];function e6(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ej,this._lib=!1;var t=this._PSD=e1;if(ep&&(this._stackHolder=ey(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==eL)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&e8(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&to();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof e6?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,e7(t)),n&&ti()}},e8.bind(null,t))}catch(e){e8(t,e)}}(this,e)}let e5={get:function(){var e=e1,t=tp;function r(r,n){var o=!e.global&&(e!==e1||t!==tp);let i=o&&!tv();var a=new e6((t,a)=>{te(this,new e9(tS(r,e,o,i),tS(n,e,o,i),t,a,e))});return ep&&tr(a,this),a}return r.prototype=eL,r},set:function(e){V(this,"then",e&&e.prototype===eL?e5:{get:function(){return e},set:e5.set})}};function e9(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function e8(e,t){if(eJ.push(t),null===e._state){var r=e._lib&&to();t=eX(t),e._state=!1,e._value=t,ep&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=z(t,"stack");t._promise=e,V(t,"stack",{get:()=>eK?r&&(r.get?r.get.apply(t):r.value):e.stack})}),eY.some(t=>t._value===e._value)||eY.push(e),e7(e),r&&ti()}}function e7(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)te(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===e2&&(++e2,eG(()=>{0==--e2&&ta()},[]))}function te(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++e2,eG(tt,[r,e,t])}else e._listeners.push(t)}function tt(e,t,r){try{eQ=t;var n,o=t._value;t._state?n=e(o):(eJ.length&&(eJ=[]),n=e(o),-1===eJ.indexOf(o)&&function(e){for(var t=eY.length;t;)if(eY[--t]._value===e._value)return void eY.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{eQ=null,0==--e2&&ta(),--r.psd.ref||r.psd.finalize()}}function tr(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function tn(){to()&&ti()}function to(){var e=eq;return eq=!1,eZ=!1,e}function ti(){var e,t,r;do for(;e4.length>0;)for(e=e4,e4=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(e4.length>0);eq=!0,eZ=!0}function ta(){var e=eY;eY=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=e3.slice(0),r=t.length;r;)t[--r]()}function ts(e){return new e6(eL,!1,e)}function tl(e,t){var r=e1;return function(){var n=to(),o=e1;try{return t_(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{t_(o,!1),n&&ti()}}}F(e6.prototype,{then:e5,_then:function(e,t){te(this,new e9(null,null,e,t,e1))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):ts(e)):this.then(null,e=>e&&e.name===t?r(e):ts(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),ts(t)))},stack:{get:function(){if(this._stack)return this._stack;try{eK=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=ev(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return ep&&((o=ev(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{eK=!1}}},timeout:function(e,t){return e<1/0?new e6((r,n)=>{var o=setTimeout(()=>n(new eO.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&V(e6.prototype,Symbol.toStringTag,"Dexie.Promise"),e0.env=tx(),F(e6,{all:function(){var e=ed.apply(null,arguments).map(tg);return new e6(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>e6.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof e6)return e;if(e&&"function"==typeof e.then)return new e6((t,r)=>{e.then(t,r)});var t=new e6(eL,!0,e);return tr(t,eQ),t},reject:ts,race:function(){var e=ed.apply(null,arguments).map(tg);return new e6((t,r)=>{e.map(e=>e6.resolve(e).then(t,r))})},PSD:{get:()=>e1,set:e=>e1=e},totalEchoes:{get:()=>tp},newPSD:tm,usePSD:tE,scheduler:{get:()=>eG,set:e=>{eG=e}},rejectionMapper:{get:()=>eX,set:e=>{eX=e}},follow:(e,t)=>new e6((r,n)=>tm((t,r)=>{var n=e1;n.unhandleds=[],n.onunhandled=r,n.finalize=eT(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},e3.push(function t(){e(),e3.splice(e3.indexOf(t),1)}),++e2,eG(()=>{0==--e2&&ta()},[])},n.finalize),e()},t,r,n))}),eW&&(eW.allSettled&&V(e6,"allSettled",function(){let e=ed.apply(null,arguments).map(tg);return new e6(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>e6.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),eW.any&&"u">typeof AggregateError&&V(e6,"any",function(){let e=ed.apply(null,arguments).map(tg);return new e6((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>e6.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let tu={awaits:0,echoes:0,id:0};var tc=0,td=[],tf=0,tp=0,th=0;function tm(e,t,r,n){var o=e1,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++th;var a=e0.env;i.env=ez?{Promise:e6,PromiseProp:{value:e6,configurable:!0,writable:!0},all:e6.all,race:e6.race,allSettled:e6.allSettled,any:e6.any,resolve:e6.resolve,reject:e6.reject,nthen:tD(a.nthen,i),gthen:tD(a.gthen,i)}:{},t&&I(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=tE(i,e,r,n);return 0===i.ref&&i.finalize(),s}function ty(){return tu.id||(tu.id=++tc),++tu.awaits,tu.echoes+=100,tu.id}function tv(){return!!tu.awaits&&(0==--tu.awaits&&(tu.id=0),tu.echoes=100*tu.awaits,!0)}function tg(e){return tu.echoes&&e&&e.constructor===eW?(ty(),e.then(e=>(tv(),e),e=>(tv(),tP(e)))):e}function tb(e){++tp,tu.echoes&&0!=--tu.echoes||(tu.echoes=tu.id=0),td.push(e1),t_(e,!0)}function tw(){var e=td[td.length-1];td.pop(),t_(e,!1)}function t_(e,t){var r,n=e1;if((t?!tu.echoes||tf++&&e===e1:!tf||--tf&&e===e1)||(r=t?tb.bind(null,e):tw,eU.call(eF,r)),e!==e1&&(e1=e,n===e0&&(e0.env=tx()),ez)){var o=e0.env.Promise,i=e.env;eB.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(T,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function tx(){var e=T.Promise;return ez?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(T,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:eB.then,gthen:e.prototype.then}:{}}function tE(e,t,r,n,o){var i=e1;try{return t_(e,!0),t(r,n,o)}finally{t_(i,!1)}}function tS(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=e1;r&&ty(),t_(t,!0);try{return e.apply(this,arguments)}finally{t_(i,!1),n&&(o=tv,eU.call(eF,o))}}}function tD(e,t){return function(r,n){return e.call(this,tS(r,t),tS(n,t))}}function tO(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(T.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),I(n,o)):T.CustomEvent&&I(n=new CustomEvent("unhandledrejection",{detail:o}),o),n&&T.dispatchEvent&&(dispatchEvent(n),!T.PromiseRejectionEvent&&T.onunhandledrejection))try{T.onunhandledrejection(n)}catch(e){}ep&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+eU).indexOf("[native code]")&&(ty=tv=ej);var tP=e6.reject;let tC=String.fromCharCode(65535),tj="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",tA=[],tk="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),tT=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function tR(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let tN={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tI(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ei(t))[e],t)}class tM{_trans(e,t,r){let n=this._tx||e1.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new eO.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=to();try{return n&&n.db===this.db?n===e1.trans?n._promise(e,i,r):tm(()=>n._promise(e,i,r),{trans:n,transless:e1.transless||e1}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||e1.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===eD.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):tP(i)}return i._promise(r,(e,t)=>tm(()=>(e1.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return tP(new eO.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tP(new eO.DatabaseClosed);t.open().catch(ej)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&ti()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(N(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=R(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==tC)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&ep&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?tR(r,a&&a.multi?e=>{let t=J(e,o);return N(t)&&t.some(e=>i(s,e))}:e=>i(s,J(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).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,N(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(L(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){I(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=tI(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{Q(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||N(e))return this.where(":id").equals(e).modify(t);{let r=J(e,this.schema.primKey.keyPath);if(void 0===r)return tP(new eO.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?R(t).forEach(r=>{Q(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=tI(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?e6.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{Q(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tN})).then(e=>e.numFailures?e6.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new eO.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new eO.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(tI(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new eS(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new eO.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new eO.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(tI(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new eS(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new eS(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function t$(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"==typeof e){var a;return void R(a=e).forEach(function(e){var t=a[e];if(N(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new eO.InvalidArgument("Invalid event config");var r=i(e,eA,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){Z(function(){e.apply(null,t)})})})}})}n||(n=eM),o||(o=ej);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(n,o)}};return t[e]=r[e]=s,s}}function tL(e,t){return U(t).from({prototype:e}),t}function tF(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function tB(e,t){e.filter=tR(e.filter,t)}function tV(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>tR(n(),t()):t,e.justLimit=r&&!n}function tU(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new eO.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function tW(e,t,r){let n=tU(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function tz(e,t,r,n){let o=e.replayFilter?tR(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),L(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),tK(tW(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return tK(tW(e,n,r),tR(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function tK(e,t,r,n){var o=tl(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=ej},t=>{e.fail(t),r=ej})||o(e.value,e,e=>r=e),r()})})}function tH(e,t){try{let r=tG(e),n=tG(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(tq(e),tq(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=tH(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function tG(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=es(e);return"ArrayBuffer"===r?"binary":r}function tq(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class tZ{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,tP.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,tP.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=tR(t.algorithm,e)}_iterate(e,t){return tz(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&I(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>tz(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(tF(t,!0))return r.count({trans:e,query:{index:tU(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return tz(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&tF(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=tU(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return tz(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,tF(t)?tV(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):tV(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),tV(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return tB(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),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 t;return tB(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=tR(t.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 t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&tF(t,!0)&&t.limit>0)return this._read(e=>{var r=tU(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).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,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return tB(this._ctx,function(e){var t=e.primaryKey.toString(),n=L(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=R(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];J(t,a)!==s&&(Q(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,R(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,v=[];for(let e=0;e<d;++e){let t=f[e],r={value:ei(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?v.push(o[c+e]):s||0===tH(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(v.push(o[c+e]),h.push(r.value)))}let g=tF(t)&&t.limit===1/0&&("function"!=typeof e||e===tY)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)v.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||g&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:g,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(v.length>0||g&&e===tY)&&a.mutate({trans:r,type:"delete",keys:v,criteria:g}).then(e=>p(v.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new eE("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return tF(e)&&(e.isPrimKey&&!tk||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new eE("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(tY)}}let tY=(e,t)=>t.value=null;function tJ(e,t){return e<t?-1:+(e!==t)}function tQ(e,t){return e>t?-1:+(e!==t)}function tX(e,t,r){var n=e instanceof t3?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function t0(e){return new e.Collection(e,()=>t2("")).limit(0)}function t1(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return tX(e,"String expected.");function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?tJ:tQ;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>t4(s[0],l[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,l,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],l[m],a,u);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function t4(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function t2(e){return{type:1,lower:e,upper:e}}class t3{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?t0(this):new this.Collection(this,()=>t4(e,t,!r,!n))}catch(e){return tX(this,tj)}}equals(e){return null==e?tX(this,tj):new this.Collection(this,()=>t2(e))}above(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(e,void 0,!0))}aboveOrEqual(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(e,void 0,!1))}below(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(void 0,e,!1,!0))}belowOrEqual(e){return null==e?tX(this,tj):new this.Collection(this,()=>t4(void 0,e))}startsWith(e){return"string"!=typeof e?tX(this,"String expected."):this.between(e,e+tC,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):t1(this,(e,t)=>0===e.indexOf(t[0]),[e],tC)}equalsIgnoreCase(e){return t1(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ed.apply(ec,arguments);return 0===e.length?t0(this):t1(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ed.apply(ec,arguments);return 0===e.length?t0(this):t1(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,tC)}anyOf(){let e=ed.apply(ec,arguments),t=this._cmp;try{e.sort(t)}catch(e){return tX(this,tj)}if(0===e.length)return t0(this);let r=new this.Collection(this,()=>t4(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ed.apply(ec,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return tX(this,tj)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return t0(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return tX(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",eO.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return tX(this,tj)}let f=0,p=l?e=>n(e,u[f][1])>0:e=>n(e,u[f][1])>=0,h=s?e=>o(e,u[f][0])>0:e=>o(e,u[f][0])>=0,m=p,y=new this.Collection(this,()=>t4(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===u.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,u[f][1])||0===this._cmp(o,u[f][0])||t(()=>{c===n?e.continue(u[f][0]):e.continue(u[f][1])}),!1)}),y}startsWithAnyOf(){let e=ed.apply(ec,arguments);return e.every(e=>"string"==typeof e)?0===e.length?t0(this):this.inAnyRange(e.map(e=>[e,e+tC])):tX(this,"startsWithAnyOf() only works with strings")}}function t6(e){return tl(function(t){return t5(t),e(t.target.error),!1})}function t5(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let t9=t$(null,"storagemutated");class t8{_lock(){return q(!e1.global),++this._reculock,1!==this._reculock||e1.global||(e1.lockOwnerFor=this),this}_unlock(){if(q(!e1.global),0==--this._reculock)for(e1.global||(e1.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{tE(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&e1.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(q(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new eO.DatabaseClosed(r);case"MissingAPIError":throw new eO.MissingAPI(r.message,r);default:throw new eO.OpenFailed(r)}if(!this.active)throw new eO.TransactionInactive;return q(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=tl(t=>{t5(t),this._reject(e.error)}),e.onabort=tl(t=>{t5(t),this.active&&this._reject(new eO.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=tl(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&t9.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return tP(new eO.ReadOnly("Transaction is readonly"));if(!this.active)return tP(new eO.TransactionInactive);if(this._locked())return new e6((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},e1])});if(r)return tm(()=>{var e=new e6((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new e6((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=e6.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new e6((e,n)=>{r.then(r=>t._waitingQueue.push(tl(e.bind(null,r))),e=>t._waitingQueue.push(tl(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new eO.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(L(t,e))return t[e];let r=this.schema[e];if(!r)throw new eO.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function t7(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+re(t)}}function re(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function rt(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:Y(r,e=>[e.name,e])}}let rr=e=>{try{return e.only([[]]),rr=()=>[[]],[[]]}catch(e){return rr=()=>tC,tC}};function rn(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>J(t,e):t=>J(t,e)}function ro(e){return[].slice.call(e)}let ri=0;function ra(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function rs({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=ro(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=N(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:rn(t)},indexes:ro(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:N(o),keyPath:o,unique:r,multiEntry:n,extractKey:rn(o)};return i[ra(o)]=a,a}),getIndexByKeyPath:e=>i[ra(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[ra(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=tl(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,v=e=>{++y,t5(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=v;else for(let t=0;t<p;++t)h.push(u=c[r](e[t])),u.onerror=v}let g=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{v(e),g(e)},u.onsuccess=g})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=tl(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},f=t6(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=f,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=tl(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=t6(o)}),query:e=>new Promise((r,n)=>{r=tl(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:f}=u,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=t6(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=t6(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=tl(s);let{index:u,range:c}=n,d=e.objectStore(t),f=u.isPrimaryKey?d:d.index(u.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=t6(l),h.onsuccess=tl(t=>{let r=h.result;if(!r)return void s(null);r.___id=++ri,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=tl(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=tl(e),h.onerror=t6(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=tl(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=tl(t=>e(t.target.result)),c.onerror=t6(a)})}}}),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:rr(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function rl({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=z(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?V(t,r,{get(){return this.table(r)},set(e){B(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function ru({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function rc(e,t){return e._cfg.version-t._cfg.version}function rd(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||tk)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function rf(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>rp(o,e)),o}function rp(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function rh(e,t,r){let n={};return H(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=t7(re(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=t7(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=rt(e,i,a)}),n}function rm({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+H(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&T.WorkerGlobalScope&&T instanceof T.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ry{_parseStoresSpec(e,t){R(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return t7(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),N(n),0===t)}),o=n.shift();if(o.multi)throw new eO.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new eO.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new eO.Schema("Index must have a name and cannot be an empty string")}),t[r]=rt(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?I(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{I(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,ru(t,[t._allTables,t,t.Transaction.prototype]),rl(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],R(o),o),t._storeNames=R(o),this}upgrade(e){return this._cfg.contentUpgrade=e$(this._cfg.contentUpgrade||ej,e),this}}function rv(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new rM("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function rg(e){return e&&"function"==typeof e.databases}function rb(e){return tm(function(){return e1.letThrough=!0,e()})}function rw(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):N(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function r_(e,t,r){var n=arguments.length;if(n<2)throw new eO.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,et(o),r]}function rx(e,t,r){let n=N(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let rE={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=ra(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:rn(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:rx(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:rx(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[ra(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(rx(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(rx(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function rS(e,t,r,n){return r=r||{},n=n||"",R(e).forEach(o=>{if(L(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=es(i);e!==es(a)?r[n+o]=t[o]:"Object"===e?rS(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),R(t).forEach(o=>{L(e,o)||(r[n+o]=t[o])}),r}let rD={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=e1.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===ej&&s.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===ej)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===ej)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=e1.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||Q(e.values[o],n.keyPath,r))}else{let t=rS(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{L(t,e)?t[e]=n[e]:Q(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function rO(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===tH(t.keys[o],e[i])&&(n.push(r?ei(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let rP={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=rO(e.keys,e.trans._cache,"clone"===e.cache);return t?e6.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ei(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function rC(e){return!("from"in e)}let rj=function(e,t){if(!this){let t=new rj;return e&&"d"in e&&I(t,e),t}I(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function rA(e,t,r){let n=tH(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(rC(e))return I(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>tH(r,e.from))return o?rA(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rR(e);if(tH(t,e.to)>0)return i?rA(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rR(e);0>tH(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),tH(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&rk(e,o),i&&a&&rk(e,i)}function rk(e,t){rC(t)||function e(t,{from:r,to:n,l:o,r:i}){rA(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function rT(e){let t=rC(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>tH(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=tH(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rR(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=rN(r)}e.d=rN(e)}function rN({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}F(rj.prototype,{add(e){return rk(this,e),this},addKey(e){return rA(this,e,e),this},addKeys(e){return e.forEach(e=>rA(this,e,e)),this},[el](){return rT(this)}});let rI={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new rj(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new rj)},u=l(""),c=l(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(N(f)){"delete"!==d&&(f=e.results),u.addKeys(f);let t=rO(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&N(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==tH(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new rj(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new rj(e.key)],getMany:e=>[a,(new rj).addKeys(e.keys)],count:c,query:c,openCursor:c};return R(d).forEach(e=>{u[e]=function(i){let{subscr:a}=e1;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new rj)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class rM{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=rM.dependencies;this._options=t={addons:rM.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ej,dbReadyPromise:null,cancelOpen:ej,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new e6(e=>{i.dbReadyResolve=e}),i.openCanceller=new e6((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=t$(this,"populate","blocked","versionchange","close",{ready:[e$,ej]}),this.on.ready.subscribe=G(this.on.ready.subscribe,e=>(t,r)=>{rM.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||e6.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,tL(tZ.prototype,function(e,t){this.db=r;let n=tN,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==eA?s:null}})),this.Table=function(e){return tL(tM.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:t$(null,{creating:[eR,ej],reading:[ek,eA],updating:[eI,ej],deleting:[eN,ej]})})}(this),this.Transaction=function(e){return tL(t8.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=t$(this,"complete","error","abort"),this.parent=i||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 e6((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),tP(e)})})}(this),this.Version=function(e){return tL(ry.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return tL(t3.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new eO.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,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=rr(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),tA.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(rE),this.use(rD),this.use(rI),this.use(rP),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new eO.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new eO.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(rc),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||e1.letThrough||this._vip)?e():new e6((e,t)=>{if(this._state.openComplete)return t(new eO.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new eO.DatabaseClosed);this.open().catch(ej)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?tP(r.dbOpenError):e);ep&&(r.openCanceller._stackHolder=ey()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new eO.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1;return e6.race([o,("u"<typeof navigator?e6.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new e6((t,o)=>{if(i(),!n)throw new eO.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new eO.MissingAPI;u.onerror=t6(o),u.onblocked=tl(e._fireOnBlocked),u.onupgradeneeded=tl(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=t5,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=tl(()=>{o(new eO.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=t6(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=e1.transless||e1,tm(()=>{e1.trans=n,e1.transless=f,0===i?(R(r).forEach(e=>{rf(c,e,r[e].primKey,r[e].indexes)}),rs(e,c),e6.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=rh(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;rm(e,o,n),rm(e,l,n),a=e._dbSchema=l;let u=rd(o,l);u.add.forEach(e=>{rf(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new eO.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>rp(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),rp(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;rs(e,n),r._memoizedTables={},s=!0;let i=X(l);u.del.forEach(e=>{i[e]=o[e]}),ru(e,[e.Transaction.prototype]),rl(e,[e.Transaction.prototype],R(i),i),r.schema=i;let a=ef(c);a&&ty();let d=e6.follow(()=>{if((t=c(r))&&a){var e=tv.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?e6.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&tk||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),ru(e,[e.Transaction.prototype]),rl(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?e6.resolve(o.shift()(r.idbtrans)).then(e):e6.resolve()})().then(()=>{var e;R(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||rf(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=tl(()=>{s=null;let n=e._novip.idbdb=u.result,o=H(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=rh(0,t,r);e._storeNames=H(t.objectStoreNames,0),rl(e,[e._allTables],R(n),n)}(e,n,i):(rm(e,e._dbSchema,i),((t=rd(rh(0,e.idbdb,i),e._dbSchema)).add.length||t.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.")),rs(e,i)}catch(e){}tA.push(e),n.onversionchange=tl(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=tl(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){rg(e)||"__dbnames"===r||rv(e,t).put({name:r}).catch(ej)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],e6.resolve(rb(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(e$,ej);return r.onReadyBeingFired=[],e6.resolve(rb(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),tP(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=tA.indexOf(this);if(t>=0&&tA.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new e6(t=>{e.dbReadyResolve=t}),e.openCanceller=new e6((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new eO.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new e6((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tl(()=>{!function({indexedDB:e,IDBKeyRange:t},r){rg(e)||"__dbnames"===r||rv(e,t).delete(r).catch(ej)}(this._deps,this.name),r()}),e.onerror=t6(n),e.onblocked=this._fireOnBlocked};if(e)throw new eO.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.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 R(this._allTables).map(e=>this._allTables[e])}transaction(){let e=r_.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=e1.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)n="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new eO.InvalidArgument("Invalid transaction mode: "+e);n="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===n){if(!a)throw new eO.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new eO.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):tP(e)}let s=(function e(t,r,n,o,i){return e6.resolve().then(()=>{let a,s=e1.transless||e1,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===eD.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):tP(o)}let u=ef(i);u&&ty();let c=e6.follow(()=>{if(a=i.call(l,l))if(u){var e=tv.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=rw(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?e6.resolve(a).then(e=>l.active?e:tP(new eO.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),tP(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):e1.trans?tE(e1.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!L(this._allTables,e))throw new eO.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let r$="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class rL{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[r$](){return this}}function rF(e,t){return R(t).forEach(r=>{rk(e[r]||(e[r]=new rj),t[r])}),e}try{n={indexedDB:T.indexedDB||T.mozIndexedDB||T.webkitIndexedDB||T.msIndexedDB,IDBKeyRange:T.IDBKeyRange||T.webkitIDBKeyRange}}catch(e){n={indexedDB:null,IDBKeyRange:null}}function rB(e){let t=rV;try{rV=!0,t9.storagemutated.fire(e)}finally{rV=t}}F(rM,{...eC,delete:e=>new rM(e,{addons:[]}).delete(),exists:e=>new rM(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return rg(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):rv(e,t).toCollection().primaryKeys()})(rM.dependencies).then(e)}catch(e){return tP(new eO.MissingAPI)}},defineClass:()=>function(e){I(this,e)},ignoreTransaction:e=>e1.trans?tE(e1.transless,e):e(),vip:rb,async:function(e){return function(){try{var t=rw(e.apply(this,arguments));return t&&"function"==typeof t.then?t:e6.resolve(t)}catch(e){return tP(e)}}},spawn:function(e,t,r){try{var n=rw(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:e6.resolve(n)}catch(e){return tP(e)}},currentTransaction:{get:()=>e1.trans||null},waitFor:function(e,t){let r=e6.resolve("function"==typeof e?rM.ignoreTransaction(e):e).timeout(t||6e4);return e1.trans?e1.trans.waitFor(r):r},Promise:e6,debug:{get:()=>ep,set:e=>{ep=e,eh="dexie"===e?()=>!0:tT}},derive:U,extend:I,props:F,override:G,Events:t$,on:t9,liveQuery:function(e){return new rL(t=>{let r=ef(e),n=!1,o={},i={},a={get closed(){return n},unsubscribe:()=>{n=!0,t9.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,l=!1;function u(){return R(i).some(e=>o[e]&&function(e,t){let r=rT(t),n=r.next();if(n.done)return!1;let o=n.value,i=rT(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=tH(s.from,o.to)&&tH(s.to,o.from)>=0)return!0;0>tH(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{rF(o,e),u()&&d()},d=()=>{let f,p;if(s||n)return;o={};let h={},m=(r&&ty(),f=()=>tm(e,{subscr:h,trans:null}),p=e1.trans?tE(e1.transless,f):f(),r&&p.then(tv,tv),p);l||(t9("storagemutated",c),l=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,n||(u()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:rF,getByKeyPath:J,setByKeyPath:Q,delByKeyPath:function(e,t){"string"==typeof t?Q(e,t,void 0):"length"in t&&[].map.call(t,function(t){Q(e,t,void 0)})},shallowClone:X,deepClone:ei,getObjectDiff:rS,cmp:tH,asap:Z,minKey:-1/0,addons:[],connections:tA,errnames:eD,dependencies:n,semVer:"3.2.3",version:"3.2.3".split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),rM.maxKey=rr(rM.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(t9("storagemutated",e=>{if(!rV){let t;tk?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),rV=!0,dispatchEvent(t),rV=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{rV||rB(e)}));let rV=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),t9("storagemutated",t=>{rV||e.postMessage(t)}),e.onmessage=e=>{e.data&&rB(e.data)}}else if("u">typeof self&&"u">typeof navigator){t9("storagemutated",e=>{try{rV||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&rB(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&rB(e.changedParts)})}e6.rejectionMapper=function(e,t){if(!e||e instanceof e_||e instanceof TypeError||e instanceof SyntaxError||!e.name||!eP[e.name])return e;var r=new eP[e.name](t||e.message,e);return"stack"in e&&V(r,"stack",{get:function(){return this.inner.stack}}),r},eh=tT;var rU=r(464),rW=r(61841);function rz(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class rK extends rM{constructor(){super("EsmOffline"),rz(this,"syncQueue",void 0),rz(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 rH(){return new rK}let rG=new rK,rq={},rZ=(0,rW.Zd)("offline-synchronization",{});function rY(){return rZ}async function rJ(){if(rZ.getState().synchronization)return;let e=await rG.syncQueue.count(),t={},r=Object.entries(rq),n=r.length,o={},i=new AbortController,a=()=>{let e=rZ.getState().synchronization;rZ.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{rZ.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[n]={},await Promise.all(l),t[n]=rQ(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{rZ.setState({synchronization:void 0})}}async function rQ({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],l=await rX();await rG.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:f,dependencies:p=[]}]=a[u];try{let i=await r(d,{abort:o,index:u,items:s,userId:l,dependencies:p.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==f&&(n[e][f]=i),await rG.syncQueue.delete(c)}catch(e){await rG.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function rX(){let e=await (0,rU.xC)();return e?.uuid||"*"}async function r0(e,t,r,n){let o=n&&n.id;return void 0!==o&&await rG.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(rM.errnames.DatabaseClosed),await rG.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(rM.errnames.DatabaseClosed,()=>-1)}async function r1(e,t,r){let n=await rX();return await r0(n,e,t,r)}async function r4(e,t){return(await r2(e,t)).map(e=>e.content)}async function r2(e,t){return await rG.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(rM.errnames.DatabaseClosed,()=>[])}async function r3(e){let t=await rX();return await r4(t,e)}async function r6(e){let t=await rX();return await r2(t,e)}async function r5(e){return await rG.syncQueue.get(e).catch(rM.errnames.DatabaseClosed,()=>void 0)}function r9(e){return!!rq[e]?.options.onBeginEditSyncItem}async function r8(e){let t=await r5(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=rq[t.type]?.options.onBeginEditSyncItem;if(!r)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 "${t.type}" supports editing items.`);r(t)}async function r7(e){await rG.syncQueue.delete(e).catch(rM.errnames.DatabaseClosed)}function ne(e,t,r,n={}){rq[e]={type:e,dependsOn:t,process:r,options:n}}var nt=r(49598);let nr="OFFLINE+";function nn(){return nr+(0,nt.A)()}function no(e){return e.startsWith(nr)}let ni={};function na(){return Object.values(ni)}function ns(e){ni[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.`),ni[e.id]=e}async function nl(e){let t=await ny();return await nu(t,e)}async function nu(e,t){let r=new rK;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(rM.errnames.DatabaseClosed,()=>[])}async function nc(e,t){let r=await ny();return await nd(r,e,t)}async function nd(e,t,r){let n=new rK,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(rM.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(rM.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(rM.errnames.DatabaseClosed)}async function nf(e,t){let r=await ny();return await np(r,e,t)}async function np(e,t,r){let n=new rK,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(rM.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(rM.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(rM.errnames.DatabaseClosed))}async function nh(e,t){let r=await nl(e);await Promise.all(r.map(async e=>nm(e.type,e.identifier,t)))}async function nm(e,t,r){await nc(e,t);let n=new rK,o=await ny(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(rM.errnames.DatabaseClosed,()=>void 0),a=na().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(rM.errnames.DatabaseClosed)}async function ny(){let e=(await (0,rU.xC)()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let nv=(0,rW.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ng(){return n_(),nv}function nb(e,t){n_(),ns({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function nw(e){n_(),await nm("patient",e)}function n_(){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.")}},86647(e,t,r){"use strict";let n;r.d(t,{fq:()=>tt,JK:()=>L,if:()=>ez,tQ:()=>eX,YY:()=>c,E4:()=>ew,zD:()=>ef,g9:()=>B,uL:()=>x,kH:()=>eH,WK:()=>eJ,br:()=>D,Gz:()=>eS,M3:()=>eZ,qw:()=>e2,e6:()=>p,Wq:()=>eE,rr:()=>g,oU:()=>e1,wV:()=>e4,d7:()=>ey,Jm:()=>eq,xH:()=>te,W3:()=>P,zq:()=>a,Ie:()=>X,CH:()=>eP,ns:()=>F,vL:()=>eB,xl:()=>eW,Us:()=>ee,UK:()=>ed,fS:()=>Q,yJ:()=>ea,u:()=>eO,to:()=>ek,iy:()=>eI,_9:()=>ei,Bf:()=>e$,Tt:()=>er,CX:()=>S,Ed:()=>eC,p6:()=>J,Wr:()=>eG,TA:()=>eK,F7:()=>$,qv:()=>eU,zA:()=>en,sc:()=>V,yu:()=>e_,WQ:()=>eY,i_:()=>l,$B:()=>ex,oq:()=>eF,wJ:()=>e0,Pj:()=>y,mQ:()=>v,wr:()=>tr,mw:()=>eT,jn:()=>Y,Fx:()=>em});var o=r(46925),i=r.n(o);let a=(0,o.createContext)({moduleName:"",featureName:""});var s=r(72448);function l({to:e,templateParams:t,onBeforeNavigate:r,children:n,...a}){return(0,o.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),i().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),(0,s.oo)({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:(0,s.JG)(e,t),...a},n)}var u=r(98635);let c=({state:e,children:t,...r})=>{let{extension:n}=(0,o.useContext)(a),s=(0,o.useRef)(null),l=(0,o.useRef)(Promise.resolve()),c=(0,o.useRef)(!1),d=(0,o.useRef)(!1),f=(0,o.useRef)(e),p=(0,o.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":l.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),h=(0,o.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(l.current=Promise.all([e.mountPromise,l.current]).then(()=>{if(s.current?.getStatus()==="MOUNTED"&&s.current.update)return s.current.update({...t})}).catch(e=>{let t=s.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),m=(0,o.useCallback)(t=>{t&&!s.current&&!d.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(d.current=!0,(0,u.wG)(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(d.current=!1,s.current=t,c.current)?p(t):t&&f.current!==e&&h(t,f.current)},()=>{d.current=!1}))},[]);return(0,o.useEffect)(()=>(c.current=!1,()=>{c.current=!0,p(s.current)}),[]),(0,o.useEffect)(()=>{f.current=e,s.current&&h(s.current,e)},[e]),n?i().createElement("div",{ref:m,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};var d=r(464),f=r(92424);function p(e){let t=(0,o.useRef)(e);return(0,f.b)(t.current,e)||(t.current=e),t.current}function h(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let m=e=>e;function y(e,t=m,r){let n=(0,o.useCallback)(t=>e.subscribe(t),[e]),i=(0,o.useCallback)(()=>t(e.getState()),[e,t]),a=(0,o.useSyncExternalStore)(n,i,i),s=(0,o.useMemo)(()=>r?h(e,r):null,[e,r]);return(0,o.useMemo)(()=>s?{...a,...s}:a,[a,s])}function v(e,t){return y(e,m,t)}function g(e){return function(t){let r=(0,o.useCallback)(t=>e.subscribe(t),[]),n=(0,o.useCallback)(()=>e.getState(),[]),i=(0,o.useSyncExternalStore)(r,n,n),a=(0,o.useMemo)(()=>t?h(e,t):null,[t]);return(0,o.useMemo)(()=>a?{...i,...a}:i,[i,a])}}let b=[];Object.freeze(b);let w={candidateExtensions:b};Object.freeze(w);let x=e=>{let t=(0,o.useCallback)(t=>t.slots?.[e]??w,[e]);return y((0,u.zF)(),t)},E=e=>e.session;function S(e,t){let{candidateExtensions:r}=x(e),n=y(d.eA,E),i=p(t);return(0,o.useMemo)(()=>(0,u.zx)(e,i),[e,i,n,r])}function D(e,t){let{moduleName:r}=(0,o.useContext)(a);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)(()=>{(0,u.FY)(r,e)},[r,e]),{extensions:S(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function O(e){return e}function P({name:e,extensionSlotName:t,select:r=O,children:n,state:s,style:l,...u}){if(n&&s)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 d=e??t,f=(0,o.useRef)(null),{extensions:p,extensionSlotModuleName:h}=D(d,s),m=(0,o.useMemo)(()=>r(p),[r,p]),y=(0,o.useMemo)(()=>{if("function"==typeof n&&!i().isValidElement(n))return m.map(e=>n(e,s))},[n,m]);return i().createElement("div",{ref:f,"data-extension-slot-name":d,"data-extension-slot-module-name":h,style:{...l,position:"relative"},...u},d&&m?.map((e,t)=>i().createElement(a.Provider,{key:e.id,value:{moduleName:h,featureName:"",extension:{extensionId:e.id,extensionSlotName:d,extensionSlotModuleName:h,extensionMeta:e.meta}}},y?.[t]??("function"!=typeof n?n:null)??i().createElement(c,{state:s}))))}var C=r(6661),j=r(87757),A=r(99737),k=r(15931),T=r.n(k),R=r(72924);let N={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},I=new Map;(0,R.initCache)(I);let M={errorRetryCount:3,fetcher:d.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof d.$f){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>I};function $(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},N,e),r={...M,...t.swrConfig};return function(e){var n,s,l,u,c;return l=s=class extends(n=i().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return i().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=i().createElement(o.Suspense,{fallback:null},i().createElement(k.SWRConfig,{value:r},i().createElement(a.Provider,{value:this.state.config},t.disableTranslations?i().createElement(e,this.props):i().createElement(A.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},i().createElement(e,this.props)))));return t.strictMode&&i().StrictMode?i().createElement(i().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},u="displayName",c=`OpenmrsReactComponent(${t.featureName})`,u in l?Object.defineProperty(l,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):l[u]=c,s}}function L(e,t){return(0,j.A)({React:i(),ReactDOMClient:C,rootComponent:$(t)(e)})}function F(e,t){return()=>e().then(({default:e})=>L(e,t))}function B(e,t){return()=>Promise.resolve(L(e,t))}let V=F;var U=r(19167),W=r(61841);let z=(0,U.y)()(()=>({}));(0,W.CE)("openmrs-app-context",z);let K={};function H(e,t=e=>e){let r=z.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function G(e,t){z.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function q(e){return null===e?null:Object.freeze(Object.assign({},e))}let Z=new Map;function Y(e,t){let r=(0,o.useRef)(t??{}),n=(0,o.useRef)(t=>G(e,t)),i=(0,o.useRef)(Symbol());return(0,o.useEffect)(()=>{let r=t??{},n=i.current;return null===H(e)?!function(e,t=K){z.setState(r=>{if(e in r)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({},r,{[e]:t===K?{}:t})})}(e,r):(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.`),G(e,()=>r)),Z.set(e,n),()=>{Z.get(e)===n&&(z.setState(t=>(e in t&&delete t[e],t)),Z.delete(e))}},[e]),(0,o.useEffect)(()=>{let n=t??{};(0,f.b)(r.current,n)||(G(e,()=>n),r.current=n)},[t]),n.current}function J({namespace:e,value:t}){return Y(e,t),null}let Q=({children:e,value:t,fallback:r})=>t?i().createElement(i().Fragment,null,e):r?i().createElement(i().Fragment,null,r):null;function X(){let e=(0,o.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,o.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function ee(e,t=e=>e??{}){let[r,n]=(0,o.useState)(()=>{if(et(e))return;let r=H(e);if(null!==r)return t?t(r):r});return(0,o.useEffect)(()=>{if(et(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,o.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>(0,f.b)(e,r)?e:r)})(q(o=H(e))),z.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(q(n)))})},[e,t]),r}function et(e){return"string"!=typeof e||0===e.trim().length}function er(e){let t=S(e);return(0,o.useMemo)(()=>t.map(e=>e.id),[t])}function en(e){return x(e).candidateExtensions}var eo=r(71647);function ei(e,t,r){let{data:n,error:i,mutate:a,isLoading:s,isValidating:l}=T()(e?(0,eo.e8)(e,t,r):null,d.lo);return(0,o.useMemo)(()=>({isLoading:s,data:n?.data.results??[],error:i,mutate:a,isValidating:l}),[n,i,s,l,a])}function ea(e){(0,o.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}var es=r(37315),el=r(82460);let eu={},ec=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
32
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function ed(e){let{moduleName:t,extension:r}=(0,o.useContext)(a),n=e?.externalModuleName??t;if(!n&&!r)throw Error(ec);let i=function(e){let t=(0,o.useMemo)(()=>(0,el.IS)(e),[e]),r=function(e){let[t,r]=(0,o.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,o.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw eu[e]||(eu[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),eu[e];return r}(n),s=function(e){let t=(0,o.useMemo)(el.GI,[]),r=function(e,t){let[r,n]=(0,o.useState)(t?()=>{let r=e.getState(),n=(0,el.P0)(r,t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,o.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=(0,el.P0)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,es.A)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!eu[r]&&t&&(eu[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=(0,el.P0)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),eu[r]}return r||{}}(r);return(0,o.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...i}:{...i,...s},[n,e?.externalModuleName,i,s])}let ef=S;var ep=r(19076),eh=r(27934);function em(){let[e,t]=(0,o.useState)((0,eh.s)());return(0,o.useEffect)(()=>(0,ep.gj)(({online:e})=>t(e)),[]),e}function ey(e,t=300){let[r,n]=(0,o.useState)(e);return(0,o.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var ev=r(83360),eg=r.n(ev);let eb=`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,t])=>`${e}:${t}`).join(",")}`;function ew(){let e=`${d.Jj}/emrapi/configuration?v=${eb}`,t=eg()(e,d.lo);return(0,o.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function e_(){return(0,o.useContext)(a).extension}let ex=g((0,u.a9)());function eE(e){let t=S(e);return(0,o.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let eS=g((0,u.zF)());var eD=r(36580);function eO(e){let{flags:t}=y(eD.jX);return t[e]?.enabled??!1}function eP(){let[,e]=(0,o.useState)(0);return(0,o.useCallback)(()=>{e(e=>e+1)},[])}function eC(e,t,r={}){return eA(e,t,ej,r)}let ej={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL((0,d.Gm)(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);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 eA(e,t,r,n={}){let{getPaginatedUrl:i,getTotalCount:a,getCurrentPageSize:s,getData:l}=r,{immutable:u,swrConfig:c}=n,f=n.fetcher??d.lo,[p,h]=(0,o.useState)(1),m=(0,o.useRef)(NaN),y=(0,o.useRef)(NaN),v=(0,o.useRef)(p),g=(0,o.useRef)(!1),b=(0,o.useRef)(!1),w=e?.toString()??"",[x,E]=(0,o.useState)(w);w!==x&&(E(w),h(1),v.current=1,m.current=NaN,y.current=NaN,g.current=!1,b.current=!1);let S=(p-1)*t,D=(0,o.useMemo)(()=>i(e,t,S),[e,t,S]),{data:O,...P}=(u?eg():T())(D,f,c);O?.data&&(m.current=a(O?.data),y.current=s(O?.data),g.current=!0);let C=Math.ceil(m.current/t),j=(0,o.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(m.current/t);!g.current||Number.isNaN(r)||e<=r?(v.current=e,h(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,o.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(m.current)){b.current||(b.current=!0,console.warn(`useServerPagination: ${w} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(m.current/t));p>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${p}; returning to page ${e}.`),v.current=e,h(e))},[p,t,w,O]);let A=(0,o.useCallback)(()=>{j(v.current+1)},[j]),k=(0,o.useCallback)(()=>{j(v.current-1)},[j]);return{data:l(O?.data),totalPages:C,totalCount:m.current,currentPage:p,currentPageSize:y.current,paginated:C>1,showNextButton:p<C,showPreviousButton:p>1,goTo:j,goToNext:A,goToPrevious:k,...P}}function ek(e,t,r={}){return eA(e,t,eT(),r)}function eT(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL((0,d.Gm)(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);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 eR=r(99970),eN=r.n(eR);function eI(e,t={}){return eM(e,ej,t)}function eM(e,t,r={}){let{swrInfiniteConfig:n,immutable:i}=r,{getNextUrl:a,getTotalCount:s,getData:l}=t,u=r.fetcher??d.lo,c=(0,o.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:f,size:p,setSize:h,...m}=eN()(c,u,{...n,...i?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),y=a(f?.[f.length-1].data),v=s(f?.[0]?.data);return{data:f?.flatMap(e=>l(e.data)),totalCount:v,hasMore:null!=y,loadMore:()=>{h((f?.length??0)+1)},nextUri:y,...m}}function e$(e,t={}){return eL(e,ej,t)}function eL(e,t,r={}){let n=eM(e,t,r),{hasMore:i,error:a,data:s,loadMore:l,isLoading:u,nextUri:c}=n;return((0,o.useEffect)(()=>{i&&!a&&l()},[i,c]),r.partialData)?n:{...n,data:i||a?void 0:s,isLoading:u||i}}function eF(e,t={}){return eL(e,eT(),t)}function eB(e,t={}){return eM(e,eT(),t)}function eV(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){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 eU(){let[e,t]=(0,o.useState)(eV);return(0,o.useEffect)(()=>{let e=()=>{t(eV())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let eW=e=>"small-desktop"===e||"large-desktop"===e;function ez(e){let t=(0,o.useContext)(a);(0,o.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),(0,u.Vx)(e),()=>{(0,u.sr)(e.name)}),[t,e])}function eK(){return y(u.Gp)}function eH(e=null,t=null){let[r,n]=(0,o.useState)([]);return(0,o.useEffect)(()=>{let r=(0,eo.Vs)(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function eG(e,t=!0){let r=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function eq(e){let t=(0,o.useRef)();return(0,o.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function eZ(e,t={}){let{abortController:r,fetchInit:n,url:i,swrConfig:a}=t,s=X(),l=(0,o.useMemo)(()=>n?.signal??r?.signal??s.signal,[r?.signal,n?.signal,s.signal]),u=(0,o.useCallback)(e=>{let t=function(e,t){if(t)return"function"==typeof t?t(e):t;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,i);return(0,d.lo)(t,{...n,signal:l})},[l,n,i]);return T()(e,u,a)}function eY(e=[],t=10){let[r,n]=(0,o.useState)(1),i=(0,o.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>i&&n(i);let a=Math.min(Math.max(1,r),i),s=(0,o.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),l=(0,o.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),u=(0,o.useCallback)(()=>{n(e=>e+1)},[]),c=(0,o.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,o.useMemo)(()=>({results:s,totalPages:i,currentPage:a,paginated:e.length>t,showNextButton:a<i,showPreviousButton:a>1,goTo:l,goToNext:u,goToPrevious:c}),[s,i,e.length,t,a,l,u,c])}function eJ(e,t,r,n){return{pageSizes:(0,o.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,o.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function eQ(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function eX(e){let[t,r]=(0,o.useState)(e??eQ()),{data:n,error:i,isValidating:a}=T()(t?["patient",t]:null,()=>(0,eo.hG)(t,{}));return(0,o.useEffect)(()=>{let e=()=>{let e=eQ();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,o.useMemo)(()=>({isLoading:a&&!i&&!n,patient:n,patientUuid:t,error:i}),[a,i,n,t])}function e0(){let e=`${d.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=T()(e,d.lo);return(0,o.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function e1(e){let{extensions:t,extensionSlotModuleName:r}=D(e);return e?t.map(t=>({state:n})=>i().createElement(a.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},i().createElement(c,{state:n}))):[]}function e4(){let e=(0,o.useRef)(),[t,r]=(0,o.useState)(null),i=null;if(!t){if(n){let e=(0,d.EW)().getState();e.loaded&&(i=e.session)}else n=new Promise(t=>{let r=({loaded:r,session:n})=>{r&&(t(n),i=n,e.current&&(e.current(),e.current=void 0))};r((0,d.EW)().getState()),i||(e.current=(0,d.EW)().subscribe(r))});if(i)r(i);else throw n}(0,o.useEffect)(()=>(e.current||(e.current=(0,d.EW)().subscribe(({loaded:e,session:t})=>{e&&(i=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let a=t||i;if(!a)if(n)throw console.warn("useSession is in an unexpected state. Attempting to recover."),n;else throw Error("useSession is in an invalid state.");return a}let e2=({privilege:e,fallback:t,children:r})=>{let[n,a]=(0,o.useState)(null);return((0,o.useEffect)(()=>{let e=(0,d.HW)({includeAuthStatus:!1}).subscribe(a);return()=>e.unsubscribe()},[]),n&&(0,d.st)(e,n))?i().createElement(i().Fragment,null,r):t?i().createElement(i().Fragment,null,t):null};var e3=r(11712),e6=r.n(e3),e5=r(68558);let e9=new Map;function e8(){for(let e of Array.from(e9.values()))e()}let e7={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function te(e){let t=(0,o.useId)();return(0,o.useEffect)(()=>{if(e)return e9.set(t,e),()=>{e9.delete(t)}},[t,e]),{...v((0,eo.BX)(),e7),mutateVisit:e8}}function tt(e,t=eo.Rb){let r=(0,o.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:i,setVisitContext:a}=te((0,o.useCallback)(()=>r.current?.(),[])),s=e&&n==e?i:null,l=`?patient=${e}&v=${t}&includeInactive=false`,u=`/${s}?v=${t}`,{data:c,error:f,mutate:p,isValidating:h}=T()(e?`${d.Jj}/visit${l}`:null,d.lo),{data:m,error:y,mutate:v,isValidating:g}=T()(e&&s?`${d.Jj}/visit${u}`:null,d.lo),b=(0,o.useMemo)(()=>c?.data.results.find(e=>null===e.stopDatetime)??null,[c]),w=(0,o.useMemo)(()=>s&&m?m.data:null,[m,s]),x=(0,o.useRef)(null);(0,o.useEffect)(()=>{!h&&b&&n===e&&null===i&&a(b),g||(x.current&&w&&x.current.uuid===w.uuid&&!x.current.stopDatetime&&w.stopDatetime&&a(null),x.current=w)},[w,i,b,h,g,n]);let E=(0,o.useCallback)(()=>{p(),v()},[p,v]);(0,o.useEffect)(()=>{r.current=E},[E]);let S=!!(!c||s&&!m),D=!!(s?y:f);return{error:f||y,mutate:E,isValidating:h||g,activeVisit:b,currentVisit:w,currentVisitIsRetrospective:!!s,isLoading:S&&!D}}function tr(){let[e,t]=(0,o.useState)([]);return(0,o.useEffect)(()=>{let e=(0,eo.Pu)().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}e6().extend(e5)},61841(e,t,r){"use strict";r.d(t,{i7:()=>m,jf:()=>h,CE:()=>p,Zd:()=>f});var n=r(92424);function o(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}let i=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>i(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>i(t)(e)}}};var a=r(19167);function s(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let l={},u=Symbol.for("openmrs.esm-state.instanceCount"),c=globalThis,d=(c[u]??0)+1;function f(e,t,r="none"){let n=l[e];if(n)return n.active?s()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=y(e,t,r);return l[e]={value:n,active:!0},n}}function p(e,t){let r=l[e];return r?(r.active?s()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(l[e]={value:t,active:!0},t)}function h(e,t,r="none"){let n=l[e];if(!n){let n=y(e,t??{},r);return l[e]={value:n,active:!1},n}return n.value}function m(...e){let[t,r,o]=e,i=void 0===o?r:o,a=void 0===o?e=>e:r,s=a(t.getState());return i(s),t.subscribe(e=>{let t=a(e);(0,n.b)(s,t)||(s=t,i(t))})}function y(e,t,r){return"sessionStorage"===r?(0,a.y)()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let a,s,l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set;try{a=l.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,o);let f=i(l.serialize),p=()=>{let e,t=f({state:l.partialize({...n()}),version:l.version}).then(e=>a.setItem(l.name,e)).catch(t=>{e=t});if(e)throw e;return t},h=o.setState;o.setState=(e,t)=>{h(e,t),p()};let m=e((...e)=>{r(...e),p()},n,o),y=()=>{var e;if(!a)return;u=!1,c.forEach(e=>e(n()));let t=(null==(e=l.onRehydrateStorage)?void 0:e.call(l,n()))||void 0;return i(a.getItem.bind(a))(l.name).then(e=>{if(e)return l.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return e.state;else{if(l.migrate)return l.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=l.merge(e,null!=(t=n())?t:m),!0),p()}).then(()=>{null==t||t(s,void 0),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{l={...l,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},y(),s||m};return(r,n,a)=>{let s,l={storage:o(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set,f=l.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,a);let p=()=>{let e=l.partialize({...n()});return f.setItem(l.name,{state:e,version:l.version})},h=a.setState;a.setState=(e,t)=>{h(e,t),p()};let m=e((...e)=>{r(...e),p()},n,a);a.getInitialState=()=>m;let y=()=>{var e,t;if(!f)return;u=!1,c.forEach(e=>{var t;return e(null!=(t=n())?t:m)});let o=(null==(t=l.onRehydrateStorage)?void 0:t.call(l,null!=(e=n())?e:m))||void 0;return i(f.getItem.bind(f))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate)return[!0,l.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,i]=e;if(r(s=l.merge(i,null!=(t=n())?t:m),!0),o)return p()}).then(()=>{null==o||o(s,void 0),s=n(),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==o||o(void 0,e)})};return a.persist={setOptions:e=>{l={...l,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},l.skipHydration||y(),s||m}})(()=>t,{name:e,storage:o(()=>sessionStorage)})):(0,a.y)()(()=>t)}c[u]=d,d>1&&!s()&&console.error(`Detected ${d} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=l)},1e3)},42007(e,t,r){"use strict";r.d(t,{V:()=>l,t:()=>s});let n={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",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",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}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var o=r(26543),i=r.n(o);let a=i().default||i();function s(e,t,r,n){return a.t(t,{ns:e,defaultValue:r,...n})}function l(e,t,r){return n[e]?s("core",e,t??n[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}a.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},27934(e,t,r){"use strict";function n(e){return!window.offlineEnabled||(e??navigator.onLine)}r.d(t,{s:()=>n})},92424(e,t,r){"use strict";function n(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}r.d(t,{b:()=>n})}}]);
|