@openmrs/esm-cohort-builder-app 4.0.7-pre.1377 → 4.0.7-pre.1381

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/800.js CHANGED
@@ -29,4 +29,4 @@ To fix this, ensure that you define the "description" field inside the feature f
29
29
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
30
  To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}}function mH(){mU.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of mU){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${r}`;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 n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
31
  To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?ij(e,()=>mL(t.appName,t.component),function(e,{online:t,offline:n,featureFlag:r}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&n)&&(!r||!!fo(r))&&e(o):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?iW(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let mK={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 mY(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<mK.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>mK.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>mK.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<mK.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<mK.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<mK.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>mK.SMALL_DESKTOP_MAX)}let mJ=!1;function mZ(){mJ||(window.addEventListener("resize",mY),mY(),mJ=!0)}var mX=n(4848),mQ=n(6942),m0=n.n(mQ),m1=n(5072),m2=n.n(m1),m3=n(7825),m4=n.n(m3),m5=n(7659),m6=n.n(m5),m8=n(5056),m7=n.n(m8),m9=n(540),ge=n.n(m9),gt=n(1113),gn=n.n(gt),gr=n(6097),go={};go.styleTagTransform=gn(),go.setAttributes=m7(),go.insert=m6().bind(null,"head"),go.domAPI=m4(),go.insertStyleElement=ge(),m2()(gr.A,go);let gi=gr.A&&gr.A.locals?gr.A.locals:void 0;function ga({title:e,children:t}){let n="tablet"===mb();return(0,mX.jsxs)("div",{className:m0()({[gi.tabletHeader]:n,[gi.desktopHeader]:!n}),children:[(0,mX.jsx)("h4",{children:e}),t]})}let gs=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],gl={primaryColor:{_type:rx.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[om.oneOf(gs)]},secondaryColor:{_type:rx.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[om.oneOf(gs)]}},gc={"Brand color #1":{_default:"#005d5d",_type:rx.String},"Brand color #2":{_default:"#004144",_type:rx.String},"Brand color #3":{_default:"#007d79",_type:rx.String},excludePatientIdentifierCodeTypes:{uuids:{_type:rx.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:rx.UUID}}},implementationName:{_type:rx.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:rx.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:rx.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[om.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:rx.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:rx.String}},diagnosisTags:gl};var gu=n(6129);let gp={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},gd=e=>(0,mX.jsx)(gu.GGC,{translateWithId:(e,t)=>{let n=gp[e];return n?sv(n,e,t):e},...e});var gf=n(9158),gh={};gh.styleTagTransform=gn(),gh.setAttributes=m7(),gh.insert=m6().bind(null,"head"),gh.domAPI=m4(),gh.insertStyleElement=ge(),m2()(gf.A,gh);let gm=gf.A&&gf.A.locals?gf.A.locals:void 0,gg=(0,f4.createContext)(null);function gb(){let e=(0,f4.useContext)(gg);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function gy({menuTitle:e,children:t}){let[n,r]=f5().useState(!1),o=m$(()=>r(!1),n),i="tablet"===mb(),a=(0,f4.useCallback)(()=>r(e=>!e),[]),s=(0,f4.useRef)(null),l=(0,f4.useRef)(null),c=(0,f4.useId)(),u=`custom-overflow-menu-trigger-${c}`,p=`custom-overflow-menu-${c}`,d=(0,f4.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,f4.useMemo)(()=>({closeMenu:d}),[d]),h=(0,f4.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),d())},[d,n]),m=f4.Children.toArray(t);(0,f4.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,f4.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(n).indexOf(r);if(-1===o)return void n[t>0?0:n.length-1]?.focus();let i=o+t,a=i<0?n.length-1:i>=n.length?0:i;n[a]?.focus()},[]),b=m.map((e,t)=>(0,f4.isValidElement)(e)?(0,f4.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:t}):e);return(0,mX.jsxs)("div",{"data-overflow-menu":!0,className:m0()("cds--overflow-menu",gm.container),ref:o,children:[(0,mX.jsx)("button",{className:m0()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},gm.overflowMenuButton),"aria-controls":p,"aria-expanded":n,"aria-haspopup":"true",id:u,onClick:a,onKeyDown:h,ref:s,children:e}),(0,mX.jsxs)("div",{className:m0()("cds--overflow-menu-options","cds--overflow-menu--flip",gm.menu,{[gm.show]:n}),"aria-labelledby":u,"data-floating-menu-direction":"bottom",id:p,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,mX.jsx)("ul",{className:m0()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,mX.jsx)(gg.Provider,{value:f,children:b})}),(0,mX.jsx)("span",{})]})]})}function g_(e){let t=(0,f4.useContext)(gg);return(0,mX.jsx)(gu.XSD,{...e,closeMenu:t?.closeMenu})}var gv=n(8168);(ea=el||(el={})).Pop="POP",ea.Push="PUSH",ea.Replace="REPLACE";var gA=function(e){return e},g$="beforeunload";function gw(e){e.preventDefault(),e.returnValue=""}function gk(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function gx(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}let gC=(0,f4.createContext)(null),gE=(0,f4.createContext)(null);function gS(e,t){if(!e)throw Error(t)}function gD(){return null!=(0,f4.useContext)(gE)}function gM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=el.Pop,navigator:i,static:a=!1}=e;gD()&&gS(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,f4.useMemo)(()=>({basename:s,navigator:i,static:a}),[s,i,a]);"string"==typeof r&&(r=gx(r));let{pathname:c="/",search:u="",hash:p="",state:d=null,key:f="default"}=r,h=(0,f4.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}(c,s);return null==e?null:{pathname:e,search:u,hash:p,state:d,key:f}},[s,c,u,p,d,f]);return null==h?null:(0,f4.createElement)(gC.Provider,{value:l},(0,f4.createElement)(gE.Provider,{children:n,value:{location:h,navigationType:o}}))}function gz(e){let{basename:t,children:n,window:r}=e,o=(0,f4.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,gA({pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"})]}var i=null;n.addEventListener("popstate",function(){if(i)p.call(i),i=null;else{var e=el.Pop,t=o(),n=t[0],r=t[1];if(p.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){b(-1*a)}},b(a))}}else g(e)}});var a=el.Pop,s=o(),l=s[0],c=s[1],u=gk(),p=gk();function d(e){var t,n,r,o,i,a,s;return"string"==typeof e?e:(r=void 0===(n=(t=e).pathname)?"/":n,i=void 0===(o=t.search)?"":o,s=void 0===(a=t.hash)?"":a,i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r)}function f(e,t){return void 0===t&&(t=null),gA((0,gv.A)({pathname:c.pathname,hash:"",search:""},"string"==typeof e?gx(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function h(e,t){return[{usr:e.state,key:e.key,idx:t},d(e)]}function m(e,t,n){return!p.length||(p.call({action:e,location:t,retry:n}),!1)}function g(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function b(e){r.go(e)}return null==l&&(l=0,r.replaceState((0,gv.A)({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:d,push:function e(t,o){var i=el.Push,a=f(t,o);if(m(i,a,function(){e(t,o)})){var s=h(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}g(i)}},replace:function e(t,n){var o=el.Replace,i=f(t,n);if(m(o,i,function(){e(t,n)})){var a=h(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),g(o)}},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return u.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&n.addEventListener(g$,gw),function(){t(),p.length||n.removeEventListener(g$,gw)}}}}({window:r}));let i=o.current,[a,s]=(0,f4.useState)({action:i.action,location:i.location});return(0,f4.useLayoutEffect)(()=>i.listen(s),[i]),(0,f4.createElement)(gM,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}var gO=n(424),gP={};gP.styleTagTransform=gn(),gP.setAttributes=m7(),gP.insert=m6().bind(null,"head"),gP.domAPI=m4(),gP.insertStyleElement=ge(),m2()(gO.A,gP);let gT=gO.A&&gO.A.locals?gO.A.locals:void 0,gB=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],gj=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),gI=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-add",iconProps:e})})),gN=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),gR=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),gF=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),gL=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),gW=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),gG=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),gV=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),gU=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),gq=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),gH=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),gK=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),gY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),gJ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),gZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),gX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),gQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),g0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),g1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),g2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),g3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),g4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close",iconProps:e})})),g5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),g6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),g8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-document",iconProps:e})})),g7=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),g9=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-download",iconProps:e})})),be=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),bt=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),bn=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),br=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-events",iconProps:e})})),bo=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),bi=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),ba=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),bs=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),bl=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),bc=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-group",iconProps:e})})),bu=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),bp=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),bd=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),bf=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information",iconProps:e})})),bh=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),bm=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),bg=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),bb=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),by=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),b_=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-location",iconProps:e})})),bv=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),bA=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),b$=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),bw=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),bk=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),bx=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-money",iconProps:e})})),bC=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),bE=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),bS=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),bD=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),bM=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-password",iconProps:e})})),bz=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),bO=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),bP=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),bT=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),bB=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),bj=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),bI=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),bN=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-report",iconProps:e})})),bR=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),bF=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-save",iconProps:e})})),bL=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-search",iconProps:e})})),bW=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),bG=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),bV=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),bU=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),bq=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),bH=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),bK=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),bY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-table",iconProps:e})})),bJ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-time",iconProps:e})})),bZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),bX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),bQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),b0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),b1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),b2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),b3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),b4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user",iconProps:e})})),b5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),b6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-view",iconProps:e})})),b8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),b7=b8,b9=g7,ye=by,yt=bd,yn=bU,yr=(0,f4.memo)((0,f4.forwardRef)(function({icon:e,fallback:t,...n},r){let o=(0,f4.useRef)(e?document.getElementById(e):void 0);return(0,f4.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,mX.jsx)(hW,{value:o.current,fallback:t,children:(0,mX.jsx)(yo,{ref:r,icon:e,iconProps:n})})})),yo=(0,f4.memo)((0,f4.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,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,f4.useRef)(null);return(0,f4.useImperativeHandle)(n,()=>a.current),(0,f4.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,mX.jsx)("svg",{ref:a,className:m0()("omrs-icon",gT.icon,r),height:i,width:i,viewBox:"0 0 16 16",children:(0,mX.jsx)("use",{href:`#${e}`})})}));var yi=n(8852),ya={};ya.styleTagTransform=gn(),ya.setAttributes=m7(),ya.insert=m6().bind(null,"head"),ya.domAPI=m4(),ya.insertStyleElement=ge(),m2()(yi.A,ya);let ys=yi.A&&yi.A.locals?yi.A.locals:void 0,yl=({path:e,title:t,basePath:n,icon:r})=>{let{t:o}=(0,hw.useTranslation)(),i=(gD()||gS(!1),(0,f4.useContext)(gE).location),a=(0,f4.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[i.pathname,e]);return(0,mX.jsx)("div",{children:(0,mX.jsx)(f8,{className:m0()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${n}/${encodeURIComponent(e)}`,children:(0,mX.jsxs)("span",{className:ys.menu,children:[(0,mX.jsx)(yr,{icon:r,className:ys.icon,size:16}),(0,mX.jsx)("span",{children:o(t)})]})})},e)};function yc(e){return function({basePath:t}){return(0,mX.jsx)(gz,{children:(0,mX.jsx)(yl,{basePath:t,...e})})}}function yu(e){let t=(0,f4.useRef)(null);return(0,f4.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function yp(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let yd="u">typeof document?f5().useLayoutEffect:()=>{};function yf(e){let t=(0,f4.useRef)(null);return yd(()=>{t.current=e},[e]),(0,f4.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let yh={prefix:String(Math.round(1e10*Math.random())),current:0},ym=f5().createContext(yh),yg=f5().createContext(!1),yb=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),yy="function"==typeof f5().useId?function(e){let t=f5().useId(),[n]=(0,f4.useState)(y$()),r=n?"react-aria":`react-aria${yh.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,f4.useContext)(ym),n=function(e=!1){let t=(0,f4.useContext)(ym),n=(0,f4.useRef)(null);if(null===n.current&&!e){var r,o;let e=null==(o=f5().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=o.ReactCurrentOwner)?void 0:r.current;if(e){let n=yb.get(e);null==n?yb.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,yb.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function y_(){return!1}function yv(){return!0}function yA(e){return()=>{}}function y$(){return"function"==typeof f5().useSyncExternalStore?f5().useSyncExternalStore(yA,y_,yv):(0,f4.useContext)(yg)}let yw=!!("u">typeof window&&window.document&&window.document.createElement),yk=new Map;function yx(e){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(null),o=yy(t),i=(0,f4.useRef)(null);if(s&&s.register(i,o),yw){let e=yk.get(o);e&&!e.includes(r)?e.push(r):yk.set(o,[r])}return yd(()=>()=>{s&&s.unregister(i),yk.delete(o)},[o]),(0,f4.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),o}function yC(e=[]){let t=yx(),[n,r]=function(e){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(null),o=yf(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?o():n(e.value)});yd(()=>{r.current&&o()});let i=yf(e=>{r.current=e(t),o()});return[t,i]}(t),o=(0,f4.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return yd(o,[t,o,...e]),n}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{yk.delete(e)}));let yE=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r};function yS(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],o=r[e];"function"==typeof n&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=yp(n,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof o?t[e]=yE(n,o):"id"===e&&n&&o?t.id=function(e,t){if(e===t)return e;let n=yk.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=yk.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,o):t[e]=void 0!==o?o:n}}return t}let yD=Symbol("default");function yM({values:e,children:t}){for(let[n,r]of e)t=f5().createElement(n.Provider,{value:r},t);return t}function yz(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,f4.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=c?c:i,"data-rac":""}},[t,n,r,o,i,a,s])}function yO(e,t){let n=(0,f4.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||yD;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function yP(e,t,n){let{ref:r,...o}=yO(n,e.slot)||{},i=yu((0,f4.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}})(t,r),[t,r])),a=yS(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 n="function"==typeof o.style?o.style(t):o.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:a.style={...o.style,...e.style}),[a,i]}function yT(e=!0){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(!1),o=(0,f4.useCallback)(e=>{r.current=!0,n(!!e)},[]);return yd(()=>{r.current||n(!1)},[]),[o,t]}function yB(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let yj=(0,f4.createContext)(null),yI=null;function yN(e,t="assertive",n=7e3){yI?yI.announce(e,t,n):(yI=new yR,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yI.announce(e,t,n):setTimeout(()=>{(null==yI?void 0:yI.isAttached())&&(null==yI||yI.announce(e,t,n))},100))}class yR{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",n=7e3){var r,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==(r=this.assertiveLog)||r.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},n)}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 yF=new Set(["id"]),yL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yW=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yG=/^(data-.*)$/;function yV(e,t={}){let{labelable:n,isLink:r,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yF.has(t)||n&&yL.has(t)||r&&yW.has(t)||(null==o?void 0:o.has(t))||yG.test(t))&&(i[t]=e[t]);return i}let yU=["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"])'],yq=yU.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yU.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yH=yU.join(':not([hidden]):not([tabindex="-1"]),');function yK(e){return e.matches(yq)}function yY(e){return e.matches(yH)}let yJ=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},yZ=e=>e&&"window"in e&&e.window===e?e:yJ(e).defaultView||window;function yX(e){if(function(){if(null==yQ){yQ=!1;try{document.createElement("div").focus({get preventScroll(){return yQ=!0,!0}})}catch{}}return yQ}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let yQ=null;function y0(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function y1(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function y2(e){let t=(0,f4.useRef)({isFocused:!1,observer:null});yd(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=yf(t=>{null==e||e(t)});return(0,f4.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(y0(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let y3=!1;function y4(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 y5(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 y6(e){let t=null;return()=>(null==t&&(t=e()),t)}let y8=y6(function(){return y5(/^Mac/i)}),y7=y6(function(){return y5(/^iPhone/i)}),y9=y6(function(){return y5(/^iPad/i)||y8()&&navigator.maxTouchPoints>1}),_e=y6(function(){return y7()||y9()});y6(function(){return y8()||_e()});let _t=y6(function(){return y4(/AppleWebKit/i)&&!_n()}),_n=y6(function(){return y4(/Chrome/i)}),_r=y6(function(){return y4(/Android/i)}),_o=y6(function(){return y4(/Firefox/i)}),_i=new Map,_a=new Set;function _s(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=_i.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),_i.delete(n.target)),0===_i.size)){for(let e of _a)e();_a.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=_i.get(n.target);r||(r=new Set,_i.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function _l(e){requestAnimationFrame(()=>{0===_i.size?e():_a.add(e)})}"u">typeof document&&("loading"!==document.readyState?_s():document.addEventListener("DOMContentLoaded",_s));let _c="default",_u="",_p=new WeakMap;function _d(e){if(_e())"disabled"===_c&&(_c="restoring",setTimeout(()=>{_l(()=>{if("restoring"===_c){let t=yJ(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=_u||""),_u="",_c="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&_p.has(e)){let t=_p.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),_p.delete(e)}}let _f=f5().createContext({register:()=>{}});function _h(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function _m(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function _g(e,t,n){var r=_h(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function _b(e,t){yd(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function _y(){let e=(0,f4.useRef)(new Map),t=(0,f4.useCallback)((t,n,r,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=(0,f4.useCallback)((t,n,r,o)=>{var i;let a=(null==(i=e.current.get(r))?void 0:i.fn)||r;t.removeEventListener(n,a,o),e.current.delete(r)},[]),r=(0,f4.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,f4.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}_f.displayName="PressResponderContext";function __(e,t){return!!t&&!!e&&e.contains(t)}function _v(e){return e.target}function _A(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;_o()&&(null==(o=window.event)||null==(r=o.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(y8()?i=!0:a=!0);let c=_t()&&y8()&&!y9()&&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});_A.isOpening=n,yX(e),e.dispatchEvent(c),_A.isOpening=!1}function _$(e){return 0===e.mozInputSource&&!!e.isTrusted||(_r()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}_A.isOpening=!1;var _w=n(1779),_k=n.n(_w),_x=new WeakMap;class _C{continuePropagation(){_g(this,_x,!1)}get shouldStopPropagation(){var e;return e=_h(this,_x,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var o;_m(this,_x,{writable:!0,value:void 0}),_g(this,_x,!0);let i=null!=(o=null==r?void 0:r.target)?o:n.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,c,u=null;null!=n.clientX&&null!=n.clientY&&(c=n.clientX,u=n.clientY),a&&(null!=c&&null!=u?(s=c-a.left,l=u-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l}}let _E=Symbol("linkClicked");function _S(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,f4.useContext)(_f);if(t){let{register:n,...r}=t;e=yS(r,e),n()}return _b(t,e.ref),e}(e),[h,m]=(0,f4.useState)(!1),g=(0,f4.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:y}=_y(),v=yf((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,r){let n=new _C("pressstart",t,e);r(n),i=n.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),A=yf((e,r,i=!0)=>{let a=g.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new _C("pressend",r,e);o(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&i&&!s){let n=new _C("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),$=yf((e,t)=>{let n=g.current;if(s)return!1;if(i){n.isTriggeringEvent=!0;let r=new _C("pressup",t,e);return i(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=yf(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(_z(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,y(),p||_d(t.target),t.disposables))n();t.disposables=[]}}),k=yf(e=>{u&&w(e)}),x=yf(e=>{null==a||a(e)}),C=yf((e,t)=>{if(a){let n=new MouseEvent("click",e);y1(n,t),a(y0(n))}}),E=(0,f4.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(_M(t.nativeEvent,t.currentTarget)&&__(t.currentTarget,_v(t.nativeEvent))){var r;_O(_v(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=v(t,"keyboard");let r=t.currentTarget;b(yJ(t.currentTarget),"keyup",yp(t=>{_M(t,r)&&!t.repeat&&__(r,_v(t))&&e.target&&$(_z(e.target,t),"keyboard")},n),!0)}o&&t.stopPropagation(),t.metaKey&&y8()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||__(t.currentTarget,_v(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!_A.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||_$(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),o=A(t,"virtual");x(t),n=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual";n=A(_z(t.currentTarget,t),r,!0),e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,o;if(e.isPressed&&e.target&&_M(t,e.target)){_O(_v(t),t.key)&&t.preventDefault();let n=_v(t),o=__(e.target,_v(t));A(_z(e.target,t),"keyboard",o),o&&C(t,e.target),y(),"Enter"!==t.key&&_D(e.target)&&__(e.target,n)&&!t[_E]&&(t[_E]=!0,_A(e.target,t,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(t.key)}else if("Meta"===t.key&&(null==(n=e.metaKeyEvents)?void 0:n.size)){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!__(t.currentTarget,_v(t.nativeEvent)))return;if(o=t.nativeEvent,!_r()&&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,p||function(e){if(_e()){if("default"===_c){let t=yJ(e);_u=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}_c="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";_p.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=_v(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),b(yJ(t.currentTarget),"pointerup",n,!1),b(yJ(t.currentTarget),"pointercancel",r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(__(t.currentTarget,_v(t.nativeEvent))&&0===t.button){if(c){let n=function(e){for(;e&&!yK(e);)e=e.parentElement;let t=yZ(e),n=t.document.activeElement;if(!n||n===e)return;y3=!0;let r=!1,o=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},i=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,yX(n),l()))},a=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,yX(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),y3=!1,r=!1},c=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{__(t.currentTarget,_v(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&$(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_z(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_z(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(__(e.target,_v(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(yX(e.target),e.target.click()))},80);b(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(t);e.isOverTarget=!1}},r=e=>{w(e)};t.onDragStart=e=>{__(e.currentTarget,_v(e.nativeEvent))&&w(e)}}return t},[b,s,c,y,p,w,k,A,v,$,x,C]);return(0,f4.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof yZ(e).Element&&"auto"===yZ(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,f4.useEffect)(()=>{let e=g.current;return()=>{var t;for(let n of(p||_d(null!=(t=e.target)?t:void 0),e.disposables))n();e.disposables=[]}},[p]),{isPressed:l||h,pressProps:yS(f,E)}}function _D(e){return"A"===e.tagName&&e.hasAttribute("href")}function _M(e,t){let{key:n,code:r}=e,o=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof yZ(t).HTMLInputElement&&!_T(t,n)||t instanceof yZ(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&_D(t))&&"Enter"!==n)}function _z(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function _O(e,t){return e instanceof HTMLInputElement?!_T(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!_D(e))}let _P=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _T(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:_P.has(e.type)}let _B=null,_j=new Set,_I=new Map,_N=!1,_R=!1,_F={Tab:!0,Escape:!0};function _L(e,t){for(let n of _j)n(e,t)}function _W(e){_N=!0,e.metaKey||!y8()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(_B="keyboard",_L("keyboard",e))}function _G(e){_B="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(_N=!0,_L("pointer",e))}function _V(e){_$(e)&&(_N=!0,_B="virtual")}function _U(e){e.target!==window&&e.target!==document&&!y3&&e.isTrusted&&(_N||_R||(_B="virtual",_L("virtual",e)),_N=!1,_R=!1)}function _q(){y3||(_N=!1,_R=!0)}function _H(e){if("u"<typeof window||_I.get(yZ(e)))return;let t=yZ(e),n=yJ(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){_N=!0,r.apply(this,arguments)},n.addEventListener("keydown",_W,!0),n.addEventListener("keyup",_W,!0),n.addEventListener("click",_V,!0),t.addEventListener("focus",_U,!0),t.addEventListener("blur",_q,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",_G,!0),n.addEventListener("pointermove",_G,!0),n.addEventListener("pointerup",_G,!0)),t.addEventListener("beforeunload",()=>{_K(e)},{once:!0}),_I.set(t,{focus:r})}let _K=(e,t)=>{let n=yZ(e),r=yJ(e);t&&r.removeEventListener("DOMContentLoaded",t),_I.has(n)&&(n.HTMLElement.prototype.focus=_I.get(n).focus,r.removeEventListener("keydown",_W,!0),r.removeEventListener("keyup",_W,!0),r.removeEventListener("click",_V,!0),n.removeEventListener("focus",_U,!0),n.removeEventListener("blur",_q,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",_G,!0),r.removeEventListener("pointermove",_G,!0),r.removeEventListener("pointerup",_G,!0)),_I.delete(n))};function _Y(){return"pointer"!==_B}"u">typeof document&&("loading"!==(d=yJ(void 0)).readyState?_H(void 0):d.addEventListener("DOMContentLoaded",()=>{_H(void 0)}));let _J=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _Z(e){let t=yJ(e),n=((e=document)=>e.activeElement)(t);"virtual"===_B?_l(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&yX(e)}):yX(e)}function _X(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e,i=(0,f4.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),a=y2(i),s=(0,f4.useCallback)(e=>{let t=yJ(e.target),r=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&r===_v(e.nativeEvent)&&(n&&n(e),o&&o(!0),a(e))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function _Q(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}let _0=f5().createContext(null);function _1(e,t){let{focusProps:n}=_X(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:_Q(e.onKeyDown),onKeyUp:_Q(e.onKeyUp)}},o=yS(n,r),i=function(e){let t=(0,f4.useContext)(_0)||{};_b(t,e);let{ref:n,...r}=t;return r}(t),a=e.isDisabled?{}:i,s=(0,f4.useRef)(e.autoFocus);(0,f4.useEffect)(()=>{s.current&&t.current&&_Z(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:yS({...o,tabIndex:l},a)}}function _2(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=(0,f4.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=_y(),l=(0,f4.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),c=y2(l),u=(0,f4.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=yJ(e.target),n=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&n===_v(e.nativeEvent)){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,c(e);let n=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!__(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});y1(r,n),l(y0(r))}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function _3(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:o}=e,i=(0,f4.useRef)({isFocused:!1,isFocusVisible:n||_Y()}),[a,s]=(0,f4.useState)(!1),[l,c]=(0,f4.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),u=(0,f4.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),p=(0,f4.useCallback)(e=>{i.current.isFocused=e,s(e),u()},[u]);t={isTextInput:r},_H(),(0,f4.useEffect)(()=>{let e=(e,n)=>{var r;let o,a,s,l,c;r=!!(null==t?void 0:t.isTextInput),o=yJ(null==n?void 0:n.target),a="u">typeof window?yZ(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?yZ(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?yZ(null==n?void 0:n.target).HTMLElement:HTMLElement,c="u">typeof window?yZ(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(r=r||o.activeElement instanceof a&&!_J.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof c&&!_F[n.key]||(e=>{i.current.isFocusVisible=e,u()})(_Y())};return _j.add(e),()=>{_j.delete(e)}},[]);let{focusProps:d}=_X({isDisabled:o,onFocusChange:p}),{focusWithinProps:f}=_2({isDisabled:!o,onFocusWithinChange:p});return{isFocused:a,isFocusVisible:l,focusProps:o?f:d}}f5().forwardRef(function(e,t){let{children:n,...r}=e,o=yu(t),i={...r,ref:o};return f5().createElement(_0.Provider,{value:i},n)});let _4=!1,_5=0;function _6(e){"touch"===e.pointerType&&(_4=!0,setTimeout(()=>{_4=!1},50))}function _8(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",_6),_5++,()=>{!(--_5>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",_6)}}function _7(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,a]=(0,f4.useState)(!1),s=(0,f4.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,f4.useEffect)(_8,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=_y(),{hoverProps:u,triggerHoverEnd:p}=(0,f4.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:o,pointerType:t}),n&&n(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=r=>{_4&&"mouse"===r.pointerType||((r,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let c=r.currentTarget;s.target=c,l(yJ(r.target),"pointerover",t=>{s.isHovered&&s.target&&!__(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:i}),n&&n(!0),a(!0)})(r,r.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,n,r,o,s,l,c]);return(0,f4.useEffect)(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,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 _9=(0,f4.createContext)(!1);function ve(e){let t=(t,n)=>(0,f4.useContext)(_9)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,f4.forwardRef)(t)}let vt=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),vn=(0,f4.createContext)({}),vr=ve(function(e,t){var n;[e,t]=yP(e,t,vn);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:o}=r,{buttonProps:i,isPressed:a}=function(e,t){let n,{elementType:r="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:p,onClick:d,href:f,target:h,rel:m,type:g="button"}=e;n="button"===r?{type:g,disabled:o}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?g:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:b,isPressed:y}=_S({onPressStart:a,onPressEnd:s,onPressChange:c,onPress:i,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:u,ref:t}),{focusableProps:v}=_1(e,t);p&&(v.tabIndex=o?-1:v.tabIndex);let A=yS(v,b,yV(e,{labelable:!0}));return{isPressed:y,buttonProps:yS(n,A,{"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:c}=_3(e),{hoverProps:u,isHovered:p}=_7({...e,isDisabled:e.isDisabled||o}),d={isHovered:p,isPressed:(r.isPressed||a)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=yz({...e,values:d,defaultClassName:"react-aria-Button"}),h=yx(i.id),m=yx(),g=i["aria-labelledby"];o&&(g?g=`${g} ${m}`:i["aria-label"]&&(g=`${h} ${m}`));let b=(0,f4.useRef)(o);return(0,f4.useEffect)(()=>{let e={"aria-labelledby":g||h};!b.current&&l&&o?yN(e,"assertive"):b.current&&l&&!o&&yN(e,"assertive"),b.current=o},[o,l,g,h]),f5().createElement("button",{...yV(e,{propNames:vt}),...yS(i,s,u),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":p||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},f5().createElement(yj.Provider,{value:{id:m}},f.children))});(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null);let vo=(0,f4.createContext)({}),vi=(0,f4.createContext)({}),va=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,vi);let{elementType:n="span",...r}=e;return f5().createElement(n,{className:"react-aria-Text",...r,ref:t})}),vs=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),vl=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function vc(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return vs.has(t.script)}let t=e.split("-")[0];return vl.has(t)}let vu=Symbol.for("react-aria.i18n.locale");function vp(){let e="u">typeof window&&window[vu]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:vc(e)?"rtl":"ltr"}}let vd=vp(),vf=new Set;function vh(){for(let e of(vd=vp(),vf))e(vd)}function vm(){let e=y$(),[t,n]=(0,f4.useState)(vd);return((0,f4.useEffect)(()=>(0===vf.size&&window.addEventListener("languagechange",vh),vf.add(n),()=>{vf.delete(n),0===vf.size&&window.removeEventListener("languagechange",vh)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let vg=f5().createContext(null);function vb(e){let{locale:t,children:n}=e,r=vm(),o=f5().useMemo(()=>t?{locale:t,direction:vc(t)?"rtl":"ltr"}:r,[r,t]);return f5().createElement(vg.Provider,{value:o},n)}function vy(){let e=vm();return(0,f4.useContext)(vg)||e}var v_={};function vv(e,t){return e-t*Math.floor(e/t)}function vA(e,t,n,r){let o=(t=vw(e,t))-1,i=-2;return n<=2?i=0:v$(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)}function v$(e){return e%4==0&&(e%100!=0||e%400==0)}function vw(e,t){return"BC"===e?1-t:t}function vk(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}v_={"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 vx={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 vC{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=vv(t,146097),o=Math.floor(r/36524),i=vv(r,36524),a=Math.floor(i/1461),s=Math.floor(vv(i,1461)/365),[l,c]=vk(400*n+100*o+4*a+s+ +(4!==o&&4!==s)),u=e-vA(l,c,1,1),p=2;e<vA(l,c,3,1)?p=0:v$(c)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-vA(l,c,d,1)+1;return new vK(l,c,d,f)}toJulianDay(e){return vA(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return vx[v$(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return v$(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 vE(e,t){let n=e.copy(),r="hour"in n?vI(n,t):0;vS(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,vD(n),vM(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,vD(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,vD(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let o=n.calendar.getYearsInEra(n);if(n.year>o){var i,a;let e=null==(i=(a=n.calendar).isInverseEra)?void 0:i.call(a,n);n.year=o,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vS(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function vD(e){for(;e.month<1;)vS(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vS(e,1)}function vM(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 vz(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),vM(e)}function vO(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function vP(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),vz(n),n}function vT(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),vB(n),n}function vB(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 vj(e,t){let n=e%t;return n<0&&(n+=t),n}function vI(e,t){let n;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=vj(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=vj(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=vj(e.minute,60),n=Math.floor(e.hour/24),e.hour=vj(e.hour,24),n}function vN(e,t){let n=e.copy();return vI(n,t),n}function vR(e,t,n,r){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=vL(i,n,0,t.length-1,null==r?void 0:r.round),o.era=t[i],vz(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(n=-n),o.year=vL(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=vL(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=vL(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),vz(o),o}function vF(e,t,n,r){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=vL(t,n,i,a,null==r?void 0:r.round);break}case"minute":o.minute=vL(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=vL(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=vL(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return o}function vL(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function vW(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?v6(vE(Ae(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):v1(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),At(v7(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function vG(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 vV(e){let t,n=At(e,new vC);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function vU(e){return`${vV(e)}T${vG(e)}`}function vq(e){let t,n="object"==typeof e[0]?e.shift():new vC;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var vH=new WeakMap;class vK{copy(){return this.era?new vK(this.calendar,this.era,this.year,this.month,this.day):new vK(this.calendar,this.year,this.month,this.day)}add(e){return vE(this,e)}subtract(e){return vE(this,vO(e))}set(e){return vP(this,e)}cycle(e,t,n){return vR(this,e,t,n)}toDate(e){return v8(this,e)}toString(){return vV(this)}compare(e){return Au(this,e)}constructor(...e){_m(this,vH,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,vz(this)}}var vY=new WeakMap;class vJ{copy(){return new vJ(this.hour,this.minute,this.second,this.millisecond)}add(e){return vN(this,e)}subtract(e){return vN(this,vO(e))}set(e){return vT(this,e)}cycle(e,t,n){return vF(this,e,t,n)}toString(){return vG(this)}compare(e){var t,n;return t=this,n=e,Ap(t)-Ap(n)}constructor(e=0,t=0,n=0,r=0){_m(this,vY,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,vB(this)}}var vZ=new WeakMap;class vX{copy(){return this.era?new vX(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new vX(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return vE(this,e)}subtract(e){return vE(this,vO(e))}set(e){return vP(vT(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return vR(this,e,t,n);default:return vF(this,e,t,n)}}toDate(e,t){return v8(this,e,t)}toString(){return vU(this)}compare(e){var t,n;let r=Au(this,e);return 0===r?(t=this,n=Ae(e),Ap(t)-Ap(n)):r}constructor(...e){_m(this,vZ,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e);this.calendar=t,this.era=n,this.year=r,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,vz(this)}}var vQ=new WeakMap;class v0{copy(){return this.era?new v0(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new v0(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vW(this,e)}subtract(e){return vW(this,vO(e))}set(e,t){let n,r;return 0===(r=vT(vP(n=Ae(this),e),e)).compare(n)?this:At(v7(v6(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,o=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let i=Ae(e),a=At(vT(i,{hour:t}),new vC),s=[v6(a,e.timeZone,"earlier"),v6(a,e.timeZone,"later")].filter(t=>v7(t,e.timeZone).day===a.day)[0],l=At(vT(i,{hour:o}),new vC),c=[v6(l,e.timeZone,"earlier"),v6(l,e.timeZone,"later")].filter(t=>v7(t,e.timeZone).day===l.day).pop(),u=v1(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return At(v7(u=36e5*vL(p,n,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return vF(e,t,n,r);case"era":case"year":case"month":case"day":return At(v7(v6(vR(Ae(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(v1(e)-e.offset)}toString(){var e;let t,n,r;return`${vU(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof v0){var n,r;return e.timeZone===t?e:(n=e,r=t,At(v7(v1(n)-n.offset,r),n.calendar))}return v7(v6(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){_m(this,vQ,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,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,vz(this)}}function v1(e){return v2(vw((e=At(e,new vC)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function v2(e,t,n,r,o,i,a){let s=new Date;return s.setUTCHours(r,o,i,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function v3(e,t){if("UTC"===t)return 0;if(e>0&&t===Af())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:o,hour:i,minute:a,second:s}=v5(e,t);return v2(n,r,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let v4=new Map;function v5(e,t){let n=v4.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v4.set(t,n));let r=n.formatToParts(new Date(e)),o={};for(let e of r)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function v6(e,t,n="compatible"){var r,o,i;let a=Ae(e);if("UTC"===t)return v1(a);if(t===Af()&&"compatible"===n){a=At(a,new vC);let e=new Date,t=vw(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=v1(a),l=v3(s-864e5,t),c=v3(s+864e5,t),u=(r=a,((o=s-l)==(i=s-c)?[o]:[o,i]).filter(e=>{var n;let o;return n=r,o=v5(e,t),n.year===o.year&&n.month===o.month&&n.day===o.day&&n.hour===o.hour&&n.minute===o.minute&&n.second===o.second}));if(1===u.length)return u[0];if(u.length>1)switch(n){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function v8(e,t,n="compatible"){return new Date(v6(e,t,n))}function v7(e,t){let n=v3(e,t),r=new Date(e+n),o=r.getUTCFullYear();return new v0(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function v9(e){return new vK(e.calendar,e.era,e.year,e.month,e.day)}function Ae(e,t){let n=0,r=0,o=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:o,millisecond:i}=t),new vX(e.calendar,e.era,e.year,e.month,e.day,n,r,o,i)}function At(e,t){if(Ai(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,vz(r),r}let An={"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 Ar(e,t){return t=At(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Ao(e,t){return Ai(e.calendar,t.calendar)&&Ar(e,t)}function Ai(e,t){var n,r,o,i;return null!=(i=null!=(o=null==(n=e.isEqual)?void 0:n.call(e,t))?o:null==(r=t.isEqual)?void 0:r.call(t,e))?i:e.identifier===t.identifier}let Aa={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function As(e,t,n){let r,o=Math.ceil(e.calendar.toJulianDay(e)+1-(n?Aa[n]:(r=function(e){if(Intl.Locale){let t=Ab.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&Ab.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&An[r]||0))%7;return o<0&&(o+=7),o}function Al(e){return v7(Date.now(),e)}function Ac(e){return v9(Al(e))}function Au(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ap(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let Ad=null;function Af(){return null==Ad&&(Ad=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ad}function Ah(e){return e.subtract({days:e.day-1})}function Am(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ag(e,t,n){let r=As(e,t,n);return e.subtract({days:r})}let Ab=new Map;function Ay(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function A_(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let Av=Symbol.for("react-aria.i18n.locale"),AA=Symbol.for("react-aria.i18n.strings");class A${getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[Av];if(void 0===f){let e=window[AA];if(!e)return null;for(let n in f={},e)f[n]=new A$({[t]:e[n]},t)}let n=null==f?void 0:f[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let Aw=new Map,Ak=new Map;class Ax{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+n,i=Aw.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:n}),Aw.set(o,i)),"function"==typeof(r=t[i.select(e)]||t.other)?r():r}number(e){let t=Ak.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Ak.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}let AC=new WeakMap;function AE(e,t){let n;return t&&A$.getGlobalDictionaryForPackage(t)||((n=AC.get(e))||(n=new A$(e),AC.set(e,n)),n)}function AS(e,t){let{locale:n}=vy(),r=AE(e,t);return(0,f4.useMemo)(()=>new Ax(n,r),[n,r])}let AD=new Map;class AM{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 n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==AT&&(AT="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),AT&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=AO(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=AO(e,t),this.options=t}}let Az={true:{ja:"h11"},false:{}};function AO(e,t={}){if("boolean"==typeof t.hour12&&(null==AP&&(AP="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),AP)){let n=Az[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=null!=n?n:r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(AD.has(n))return AD.get(n);let r=new Intl.DateTimeFormat(e,t);return AD.set(n,r),r}let AP=null,AT=null;function AB(e,t){let n=(0,f4.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function Aj(e){e=AB(null!=e?e:{},AI);let{locale:t}=vy();return(0,f4.useMemo)(()=>new AM(t,e),[t,e])}function AI(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function AN(e){return e&&e.__esModule?e.default:e}let AR=new WeakMap;function AF(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function AL(e,t,n,r){let o=AS(AN(v_),"@react-aria/calendar"),i=AF(e)||AF(t),a=Aj({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n}),s=Aj({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n});return(0,f4.useMemo)(()=>{if(Ar(e,Ah(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),Ar(t,Am(e)))return a.format(i.toDate(n));if(Ar(t,Am(t)))return r?AW(a,o,i,s,n):a.formatRange(i.toDate(n),s.toDate(n))}return r?AW(s,o,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,a,s,o,n,r])}function AW(e,t,n,r,o){let i=e.formatRangeToParts(n.toDate(o),r.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 AG(e,t){let n=(0,f4.useRef)(!0),r=(0,f4.useRef)(null);(0,f4.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,f4.useEffect)(()=>{let o=r.current;n.current?n.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),r.current=t},t)}function AV(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=yx(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function AU(e,t){var n,r;let o,i,a,s,l,c=AS((n=v_)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=yV(e),p=AL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=AL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);AG(()=>{t.isFocused||yN(d)},[d]);let f=(a=AS(AN(v_),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(r=t.value)?r:void 0,s=Aj({weekday:"long",month:"long",year:"numeric",day:"numeric",era:AF(o)||AF(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,f4.useMemo)(()=>{if(!l&&o&&i)if(Ar(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=AW(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));AG(()=>{f&&yN(f,"polite",4e3)},[f]);let h=yC([!!e.errorMessage,e.isInvalid,e.validationState]);AR.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,g]=(0,f4.useState)(!1),b=e.isDisabled||t.isNextVisibleRangeInvalid();b&&m&&(g(!1),t.setFocused(!0));let[y,v]=(0,f4.useState)(!1),A=e.isDisabled||t.isPreviousVisibleRangeInvalid();return A&&y&&(v(!1),t.setFocused(!0)),{calendarProps:yS(u,AV({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":c.format("next"),isDisabled:b,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:A,onFocusChange:v},errorMessageProps:{id:h},title:p}}let Aq={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 AH(e){let{children:t,elementType:n="div",isFocusable:r,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:n}=e,[r,o]=(0,f4.useState)(!1),{focusWithinProps:i}=_2({isDisabled:!n,onFocusWithinChange:e=>o(e)}),a=(0,f4.useMemo)(()=>r?t:t?{...Aq,...t}:Aq,[r]);return{visuallyHiddenProps:{...i,style:a}}}(e);return f5().createElement(n,yS(i,a),t)}function AK(e,t,n,r){let o=yf(n),i=null==n;(0,f4.useEffect)(()=>{if(i||!e.current)return;let n=e.current;return n.addEventListener(t,o,r),()=>{n.removeEventListener(t,o,r)}},[e,t,r,i,o])}let AY=0,AJ=new Map;function AZ(e){let[t,n]=(0,f4.useState)();return yd(()=>{if(!e)return;let t=AJ.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${AY++}`;n(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},AJ.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),AJ.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function AX(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function AQ(e,t,n){let r="left"===n?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function A0(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;)AX(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let n=AQ(e,t,"left"),r=AQ(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:u,scrollPaddingRight:p,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),h=a+parseInt(c,10),m=s+parseInt(l,10),g=h+e.clientWidth,b=m+e.clientHeight,y=parseInt(u,10)||0,v=parseInt(d,10)||0,A=parseInt(p,10)||0,$=parseInt(f,10)||0;n<=a+$?a=n-parseInt(c,10)-$:n+o>g-A&&(a+=n+o-g+A),r<=m+y?s=r-parseInt(l,10)-y:r+i>b-v&&(s+=r+i-b+v),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var n,r,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(n=e.scrollIntoView)||n.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(a-l)>1||Math.abs(s-c)>1)&&(null==t||null==(o=t.containingElement)||null==(r=o.scrollIntoView)||r.call(o,{block:"center",inline:"center"}),null==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function A1(e,t){let n=e;for(AX(n,t)&&(n=n.parentElement);n&&!AX(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}class A2 extends vC{fromJulianDay(e){let t=super.fromJulianDay(e);return new vK(this,vw(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(A3(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(A3(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function A3(e){let[t,n]=vk(e.year+-543);return new vK(t,n,e.month,e.day)}function A4(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function A5(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-A4(e,n,1,1))/30),o=t+1-A4(e,n,r,1);return[n,r,o]}function A6(e){return Math.floor(e%4/3)}function A8(e,t){return t%13!=0?30:A6(e)+5}class A7{fromJulianDay(e){let[t,n,r]=A5(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new vK(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),A4(1723856,t,e.month,e.day)}getDaysInMonth(e){return A8(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+A6(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class A9 extends A7{fromJulianDay(e){let[t,n,r]=A5(1723856,e);return new vK(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class $e extends A7{fromJulianDay(e){let[t,n,r]=A5(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new vK(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),A4(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),A8(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 $t=765433;function $n(e){return 7>vv(7*e+1,19)}function $r(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>vv(3*(n+1),7)&&(n+=1),n}function $o(e){let t,n;return $r(e)+(t=$r(e-1),n=$r(e),$r(e+1)-n==356?2:+(n-t==382))}function $i(e){return $o(e+1)-$o(e)}function $a(e,t){if(t>=6&&!$n(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=$i(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!$n(e):30}class $s{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/$t*19+234)/235)+1,r=$o(n),o=Math.floor(t-r);for(;o<1;)o=Math.floor(t-(r=$o(--n)));let i=1,a=0;for(;a<o;)a+=$a(n,i),i++;let s=o-(a-=$a(n,--i));return new vK(this,n,i,s)}toJulianDay(e){let t=$o(e.year);for(let n=1;n<e.month;n++)t+=$a(e.year,n);return t+e.day+347997}getDaysInMonth(e){return $a(e.year,e.month)}getMonthsInYear(e){return $n(e.year)?13:12}getDaysInYear(e){return $i(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&($n(t.year)&&!$n(e.year)&&t.month>6?e.month--:!$n(t.year)&&$n(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class $l extends vC{fromJulianDay(e){let t,n,r,o=super.fromJulianDay(e),i=o.year-78,a=e-vA(o.era,o.year,1,1);if(a<80?(i--,a+=(t=v$(o.year-1)?31:30)+155+90+10):(t=v$(o.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new vK(this,i,n,r)}toJulianDay(e){let t,n,[r,o]=vk(e.year+78);return(v$(o)?(t=31,n=vA(r,o,3,21)):(t=30,n=vA(r,o,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&v$(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 $c(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function $u(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+$c(t,r,1,1)))/29.5)+1),i=n-$c(t,r,o,1)+1;return new vK(e,r,o,i)}function $p(e){return(14+11*e)%30<11}class $d{fromJulianDay(e){return $u(this,1948440,e)}toJulianDay(e){return $c(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&$p(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return $p(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class $f extends $d{fromJulianDay(e){return $u(this,1948439,e)}toJulianDay(e){return $c(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function $h(e){return 460322+c[e-1300]}function $m(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function $g(e,t){let n=$h(e);for(let r=1;r<t;r++)n+=$m(e,r);return n}function $b(e){return c[e+1-1300]-c[e-1300]}class $y extends $d{fromJulianDay(e){let t=e-1948440,n=$h(1300),r=$h(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-$h(++e)+1;let o=$b(e);if(r===o){n=12;break}if(r<o){let t=$m(e,n);for(n=1;r>t;)r-=t,t=$m(e,++n);break}}return new vK(this,e,n,t-$g(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+$g(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):$m(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):$b(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=$m(t,n)}}}}let $_=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],$v=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$A=[1867,1911,1925,1988,2018],$$=["meiji","taisho","showa","heisei","reiwa"];function $w(e){let t=$_.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?$_.length-1:0===t?0:t-1}function $k(e){let t=$A[$$.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new vK(e.year+t,e.month,e.day)}class $x extends vC{fromJulianDay(e){let t=super.fromJulianDay(e),n=$w(t);return new vK(this,$$[n],t.year-$A[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay($k(e))}balanceDate(e){let t=$k(e),n=$w(t);$$[n]!==e.era&&(e.era=$$[n],e.year=t.year-$A[n]),this.constrainDate(e)}constrainDate(e){let t=$$.indexOf(e.era),n=$v[t];if(null!=n){let[r,o,i]=n,a=r-$A[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[,n,r]=$_[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return $$}getYearsInEra(e){let t=$$.indexOf(e.era),n=$_[t],r=$_[t+1];if(null==r)return 9999-n[0]+1;let o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth($k(e))}getMinimumMonthInYear(e){let t=$C(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=$C(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function $C(e){if(1===e.year)return $_[$$.indexOf(e.era)]}let $E=[0,31,62,93,124,155,186,216,246,276,306,336];class $S{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),i=r-$E[o]+1;return new vK(this,n,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=$E[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>vv(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function $D(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function $M(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class $z extends vC{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=$M(vw(t.era,t.year));return new vK(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay($O(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=$M($D(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth($O(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function $O(e){let[t,n]=vk($D(e));return new vK(t,n,e.month,e.day)}function $P(e){switch(e){case"buddhist":return new A2;case"ethiopic":return new A7;case"ethioaa":return new A9;case"coptic":return new $e;case"hebrew":return new $s;case"indian":return new $l;case"islamic-civil":return new $d;case"islamic-tbla":return new $f;case"islamic-umalqura":return new $y;case"japanese":return new $x;case"persian":return new $S;case"roc":return new $z;default:return new vC}}function $T(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function $B(e,t,n,r,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=$j(e,t,n).subtract(i);return $N(e,a,t,n,r,o)}function $j(e,t,n,r,o){let i=e;if(t.years)i=Ah(e.subtract({months:e.month-1}));else t.months?i=Ah(e):t.weeks&&(i=Ag(e,n));return $N(e,i,t,n,r,o)}function $I(e,t,n,r,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=$j(e,t,n).subtract(i);return $N(e,a,t,n,r,o)}function $N(e,t,n,r,o,i){if(o&&e.compare(o)>=0){let e=A_(t,$j(v9(o),n,r));e&&(t=e)}if(i&&0>=e.compare(i)){let e=Ay(t,$I(v9(i),n,r));e&&(t=e)}return t}function $R(e,t,n){if(t){let n=A_(e,v9(t));n&&(e=n)}if(n){let t=Ay(e,v9(n));t&&(e=t)}return e}function $F(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function $L(e,t,n){let[r,o]=(0,f4.useState)(e||t),i=(0,f4.useRef)(void 0!==e),a=void 0!==e;(0,f4.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:r,l=(0,f4.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),a||(s=e)};"function"==typeof e?o((n,...o)=>{let i=e(a?s:n,...o);return(r(i,...t),a)?n:i}):(a||o(e),r(e,...t))},[a,s,n]);return[s,l]}function $W(e){var t,n,r;let o=(0,f4.useMemo)(()=>new AM(e.locale),[e.locale]),i=(0,f4.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:u,selectionAlignment:p,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,f4.useMemo)(()=>s(i.calendar),[s,i.calendar]),[g,b]=$L(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),y=(0,f4.useMemo)(()=>g?At(v9(g),m):null,[g,m]),v=(0,f4.useMemo)(()=>g&&"timeZone"in g?g.timeZone:i.timeZone,[g,i.timeZone]),[A,$]=$L((0,f4.useMemo)(()=>e.focusedValue?$R(At(v9(e.focusedValue),m),c,u):void 0,[e.focusedValue,m,c,u]),(0,f4.useMemo)(()=>$R(e.defaultFocusedValue?At(v9(e.defaultFocusedValue),m):y||At(Ac(v),m),c,u),[e.defaultFocusedValue,y,v,m,c,u]),e.onFocusChange),[w,k]=(0,f4.useState)(()=>{switch(p){case"start":return $j(A,l,a,c,u);case"end":return $I(A,l,a,c,u);default:return $B(A,l,a,c,u)}}),[x,C]=(0,f4.useState)(e.autoFocus||!1),E=(0,f4.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,w.add(e)},[w,l]),[S,D]=(0,f4.useState)(m);if(!Ai(m,S)){let e=At(A,m);k($B(e,l,a,c,u)),$(e),D(m)}function M(e){$(e=$R(e,c,u))}function z(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void b(null);(e=$F(e=$R(e,c,u),w,d))&&(e=At(e,(null==g?void 0:g.calendar)||new vC),g&&"hour"in g?b(g.set(e)):b(e))}}$T(A,c,u)?$($R(A,c,u)):0>A.compare(w)?k($I(A,l,a,c,u)):A.compare(E)>0&&k($j(A,l,a,c,u));let O=(0,f4.useMemo)(()=>!!y&&(!!(d&&d(y))||$T(y,c,u)),[y,d,c,u]),P=e.isInvalid||"invalid"===e.validationState||O,T=(0,f4.useMemo)(()=>"visible"===f?l:$G(l),[f,l]);return{isDisabled:null!=(n=e.isDisabled)&&n,isReadOnly:null!=(r=e.isReadOnly)&&r,value:y,setValue:z,visibleRange:{start:w,end:E},minValue:c,maxValue:u,focusedDate:A,timeZone:v,validationState:P?"invalid":null,isValueInvalid:P,setFocusedDate(e){M(e),C(!0)},focusNextDay(){M(A.add({days:1}))},focusPreviousDay(){M(A.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&M(A.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&M(A.subtract({weeks:1}))},focusNextPage(){let e=w.add(T);$($R(A.add(T),c,u)),k($j($N(A,e,T,a,c,u),T,a))},focusPreviousPage(){let e=w.subtract(T);$($R(A.subtract(T),c,u)),k($j($N(A,e,T,a,c,u),T,a))},focusSectionStart(){l.days?M(w):l.weeks?M(Ag(A,a)):(l.months||l.years)&&M(Ah(A))},focusSectionEnd(){l.days?M(E):l.weeks?M(Ag(A,a,void 0).add({days:6})):(l.months||l.years)&&M(Am(A))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?M(A.add({months:1})):(l.months||l.years)&&M(A.add({years:1})):M(A.add($G(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?M(A.subtract({months:1})):(l.months||l.years)&&M(A.subtract({years:1})):M(A.subtract($G(l)))},selectFocusedDate(){d&&d(A)||z(A)},selectDate(e){z(e)},isFocused:x,setFocused:C,isInvalid:e=>$T(e,c,u),isSelected(e){return null!=y&&Ar(e,y)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&A&&Ar(e,A),isCellDisabled(t){return e.isDisabled||0>t.compare(w)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=w.subtract({days:1});return Ar(e,w)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return Ar(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=w){let n=t.add({weeks:e}),r=[],o=As(n=Ag(n,a,h),a,h);for(let e=0;e<o;e++)r.push(null);for(;r.length<7;){r.push(n);let e=n.add({days:1});if(Ar(n,e))break;n=e}for(;r.length<7;)r.push(null);return r}}}function $G(e){let t={...e};for(let n in e)t[n]=1;return t}function $V(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:v9(e),end:v9(t)}):null}function $U(e,t){return(e=At(e,(null==t?void 0:t.calendar)||new vC),t&&"hour"in t)?t.set(e):e}function $q(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let $H=(0,f4.createContext)(null),$K=(0,f4.createContext)(null),$Y=(0,f4.createContext)(null),$J=(0,f4.createContext)(null),$Z=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,$H);let{locale:n}=vy(),r=$W({...e,locale:n,createCalendar:e.createCalendar||$P}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=AU(e,r),c=yz({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return f5().createElement("div",{...c,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},f5().createElement(yM,{values:[[vn,{slots:{previous:i,next:a}}],[vo,{"aria-hidden":!0,level:2,children:l}],[$Y,r],[$H,e],[vi,{slots:{errorMessage:s}}]]},f5().createElement(AH,null,f5().createElement("h2",null,o["aria-label"])),c.children,f5().createElement(AH,null,f5().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),$X=(0,f4.forwardRef)(function(e,t){var n,r;let o,i,a;[e,t]=yP(e,t,$K);let{locale:s}=vy(),l=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...c}=e,[u,p]=$L(t,n||null,r),[d,f]=(0,f4.useState)(null),h="center";if(u&&u.start&&u.end){let e=$B(v9(u.start),a,i,s,l).add(a).subtract({days:1});u.end.compare(e)>0&&(h="start")}let m=(0,f4.useRef)(null),[g,b]=(0,f4.useState)(null),y=(0,f4.useMemo)(()=>A_(s,null==g?void 0:g.start),[s,g]),v=(0,f4.useMemo)(()=>Ay(l,null==g?void 0:g.end),[l,g]),A=$W({...c,value:u&&u.start,createCalendar:o,locale:i,visibleDuration:a,minValue:y,maxValue:v,selectionAlignment:h}),$=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:$q(t,A,-1),end:$q(t,A,1)},b(m.current)):(m.current=null,b(null))},[w,k]=(0,f4.useState)(A.visibleRange);Ao(A.visibleRange.start,w.start)&&Ao(A.visibleRange.end,w.end)||($(d),k(A.visibleRange));let x=e=>{e?(f(e),$(e)):(f(null),$(null))},C=d?$V(d,A.focusedDate):u&&$V(u.start,u.end),E=t=>{if(e.isReadOnly)return;let n=$F($R(t,y,v),A.visibleRange.start,e.isDateUnavailable);if(n)if(d){let e=$V(d,n);e&&p({start:$U(e.start,null==u?void 0:u.start),end:$U(e.end,null==u?void 0:u.end)}),x(null)}else x(n)},[S,D]=(0,f4.useState)(!1),{isDateUnavailable:M}=e,z=(0,f4.useMemo)(()=>!!u&&!d&&(!!(M&&(M(u.start)||M(u.end)))||$T(u.start,s,l)||$T(u.end,s,l)),[M,u,d,s,l]),O=e.isInvalid||"invalid"===e.validationState||z;return{...A,value:u,setValue:p,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:O?"invalid":null,isValueInvalid:O,selectFocusedDate(){E(A.focusedDate)},selectDate:E,highlightDate(e){d&&A.setFocusedDate(e)},isSelected:e=>!!(C&&e.compare(C.start)>=0&&0>=e.compare(C.end)&&!A.isCellDisabled(e)&&!A.isCellUnavailable(e)),isInvalid(e){var t,n;return A.isInvalid(e)||$T(e,null==(t=m.current)?void 0:t.start,null==(n=m.current)?void 0:n.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||$P}),{calendarProps:c,prevButtonProps:u,nextButtonProps:p,errorMessageProps:d,title:f}=(n=e,r=t,o=AU(n,l),i=(0,f4.useRef)(!1),AK(a=(0,f4.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),AK(a,"pointerup",e=>{if(i.current){i.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;r.current&&r.current.contains(document.activeElement)&&(!r.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&r.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},AK(r,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=yz({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return f5().createElement("div",{...h,...c,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},f5().createElement(yM,{values:[[vn,{slots:{previous:u,next:p}}],[vo,{"aria-hidden":!0,level:2,children:f}],[$J,l],[$K,e],[vi,{slots:{errorMessage:d}}]]},f5().createElement(AH,null,f5().createElement("h2",null,c["aria-label"])),h.children,f5().createElement(AH,null,f5().createElement("button",{"aria-label":p["aria-label"],disabled:p.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),$Q=(0,f4.createContext)(null),$0=(0,f4.forwardRef)(function(e,t){var n,r;let o=(0,f4.useContext)($Y),i=(0,f4.useContext)($J),a=yO($H),s=yO($K),l=null!=o?o:i,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let u=null!=(n=null==a?void 0:a.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:p,headerProps:d,weekDays:f,weeksInMonth:h}=function(e,t){let n,{startDate:r=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=vy(),s=AL(r,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=AR.get(t),u=AV({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),p=Aj({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=vy(),f=(0,f4.useMemo)(()=>{let e=Ag(Ac(t.timeZone),d,i);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return p.format(r)})},[d,t.timeZone,p,i]),h=(n=r.calendar.getDaysInMonth(r),Math.ceil((As(Ah(r),d,i)+n)/7));return{gridProps:yS(u,{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:f,weeksInMonth:h}}({startDate:c,endDate:Am(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:u},l);return f5().createElement($Q.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:h}},f5().createElement("table",{...yV(e),...p,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:f5().createElement(f5().Fragment,null,f5().createElement($1,null,e=>f5().createElement($2,null,e)),f5().createElement($3,null,e.children))))}),$1=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,{headerProps:i,weekDays:a}=(0,f4.useContext)($Q);return f5().createElement("thead",{...yV(e),...i,ref:t,style:r,className:o||"react-aria-CalendarGridHeader"},f5().createElement("tr",null,a.map((e,t)=>f5().cloneElement(n(e),{key:t}))))}),$2=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e;return f5().createElement("th",{...yV(e),ref:t,style:r,className:o||"react-aria-CalendarHeaderCell"},n)}),$3=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,i=(0,f4.useContext)($Y),a=(0,f4.useContext)($J),s=null!=i?i:a,{startDate:l,weeksInMonth:c}=(0,f4.useContext)($Q);return f5().createElement("tbody",{...yV(e),ref:t,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>f5().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?f5().cloneElement(n(e),{key:t}):f5().createElement("td",{key:t})))))}),$4=(0,f4.forwardRef)(function({date:e,...t},n){var r,o,i;let a=(0,f4.useContext)($Y),s=(0,f4.useContext)($J),l=null!=a?a:s,{startDate:c}=null!=(r=(0,f4.useContext)($Q))?r:{startDate:l.visibleRange.start},u=(0,f4.useRef)(null),{cellProps:p,buttonProps:d,...f}=function(e,t,n){var r;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=AR.get(t),c=AS((r=v_)&&r.__esModule?r.default:r,"@react-aria/calendar"),u=Aj({weekday:"long",day:"numeric",month:"long",year:"numeric",era:AF(i),timeZone:t.timeZone}),p=t.isSelected(i),d=t.isCellFocused(i);a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&Ar(t.value,i));m&&(p=!0),i=AB(i,Ao);let g=(0,f4.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),b=Ar(i,Ac(t.timeZone)),y=(0,f4.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Ar(i,t.value.start)||Ar(i,t.value.end))&&(e=l+", "),e+=u.format(g),b?e=c.format(p?"todayDateSelected":"todayDate",{date:e}):p&&(e=c.format("dateSelected",{date:e})),t.minValue&&Ar(i,t.minValue)?e+=", "+c.format("minimumDate"):t.maxValue&&Ar(i,t.maxValue)&&(e+=", "+c.format("maximumDate")),e},[u,g,c,p,b,i,t,l]),v="";"anchorDate"in t&&d&&!t.isReadOnly&&h&&(v=t.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let A=AZ(v),$=(0,f4.useRef)(!1),w=(0,f4.useRef)(!1),k=(0,f4.useRef)(void 0),{pressProps:x,isPressed:C}=_S({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(Ar(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),w.current=!0;return}else if(Ar(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),w.current=!0;return}}let n=()=>{t.setDragging(!0),k.current=void 0,t.selectDate(i),t.setFocusedDate(i),$.current=!0};"touch"===e.pointerType?k.current=setTimeout(n,200):n()}},onPressEnd(){w.current=!1,$.current=!1,clearTimeout(k.current),k.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&k.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(w.current)t.setAnchorDate(i);else if(t.anchorDate&&!$.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=Ar(i,t.focusedDate)?0:-1),(0,f4.useEffect)(()=>{d&&n.current&&(yX(n.current),"pointer"!==_B&&document.activeElement===n.current&&A0(n.current,{containingElement:A1(n.current)}))},[d,n]);let E=Aj({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),S=(0,f4.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":p||void 0,"aria-invalid":m||void 0},buttonProps:yS(x,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":y,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,A["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:C,isFocused:d,isSelected:p,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:S}}({date:e},l,u),{hoverProps:h,isHovered:m}=_7({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:b}=_3();b&&(b=f.isFocused);let y=(o=c,i=At(i=e,o.calendar),o=Ah(o),i=Ah(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,A=!1;"highlightedRange"in l&&l.highlightedRange&&(v=Ar(e,l.highlightedRange.start),A=Ar(e,l.highlightedRange.end));let $=yz({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:y,isFocusVisible:b,isSelectionStart:v,isSelectionEnd:A,...f}}),w={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":b||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":y||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":A||void 0,"data-invalid":f.isInvalid||void 0};return f5().createElement("td",{...p,ref:n},f5().createElement("div",{...yS(yV(t),d,g,h,w,$),ref:u}))}),$5=(0,f4.createContext)({}),$6=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,$5);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:u,isHovered:p}=_7({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:d,isFocusVisible:f,focusProps:h}=_3({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=yz({...e,values:{isHovered:p,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return f5().createElement("div",{...yS(c,h,u),...m,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":d||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),$8=(0,f4.createContext)({}),$7=ve(function(e,t){[e,t]=yP(e,t,$8);let{hoverProps:n,isHovered:r}=_7(e),{isFocused:o,isFocusVisible:i,focusProps:a}=_3({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=yz({...e,values:{isHovered:r,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return f5().createElement("input",{...yS((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...o}=e;return o})(e),a,n),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var $9={};$9={"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 we=f5().createContext(null),wt="react-aria-focus-scope-restore",wn=null;function wr(e){var t,n,r,o,i,a,s,l,c,u;let p,d,f,h,{children:m,contain:g,restoreFocus:b,autoFocus:y}=e,v=(0,f4.useRef)(null),A=(0,f4.useRef)(null),$=(0,f4.useRef)([]),{parentNode:w}=(0,f4.useContext)(we)||{},k=(0,f4.useMemo)(()=>new wy({scopeRef:$}),[$]);yd(()=>{let e=w||w_.root;if(w_.getTreeNode(e.scopeRef)&&wn&&!wl(wn,e.scopeRef)){let t=w_.getTreeNode(wn);t&&(e=t)}e.addChild(k),w_.addNode(k)},[k,w]),yd(()=>{let e=w_.getTreeNode($);e&&(e.contain=!!g)},[g]),yd(()=>{var e;let t=null==(e=v.current)?void 0:e.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==A.current;)n.push(t),t.addEventListener(wt,r),t=t.nextSibling;return $.current=n,()=>{for(let e of n)e.removeEventListener(wt,r)}},[m]),yd(()=>{if(n||r)return;let e=t.current,o=yJ(e?e[0]:void 0),i=e=>{let n=_v(e);wa(n,t.current)?wn=t:ws(n)||(wn=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=$,n=b,r=g]),o=$,i=g,p=(0,f4.useRef)(void 0),d=(0,f4.useRef)(void 0),yd(()=>{let e=o.current;if(!i){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let t=yJ(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!wi(o)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=o.current;if(!r||!wa(n,r))return;let i=wh(wo(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&wc(a,!0)},r=e=>{(!wn||wl(wn,o))&&wa(_v(e),o.current)?(wn=o,p.current=_v(e)):wi(o)&&!ws(_v(e),o)?p.current?p.current.focus():wn&&wn.current&&wp(wn.current):wi(o)&&(p.current=_v(e))},a=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let n=_B,r=("virtual"===n||null===n)&&_r()&&_n(),i=((e=document)=>e.activeElement)(t);if(!r&&i&&wi(o)&&!ws(i,o)){wn=o;let t=_v(e);if(t&&t.isConnected){var a;p.current=t,null==(a=p.current)||a.focus()}else wn.current&&wp(wn.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),yd(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),a=$,s=b,l=g,f=(0,f4.useRef)("u">typeof document?((e=document)=>e.activeElement)(yJ(a.current?a.current[0]:void 0)):null),yd(()=>{let e=a.current,t=yJ(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!wn||wl(wn,a))&&wa(((e=document)=>e.activeElement)(t),a.current)&&(wn=a)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[a,l]),yd(()=>{let e=yJ(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!wi(a)||t.isComposing)return;let n=e.activeElement;if(!ws(n,a)||!wd(a))return;let r=w_.getTreeNode(a);if(!r)return;let o=r.nodeToRestore,i=wh(e.body,{tabbable:!0});i.currentNode=n;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!ws(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(ws(s,a));(t.preventDefault(),t.stopPropagation(),s)?wc(s,!0):ws(o)?wc(o,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),yd(()=>{var e;let t=yJ(a.current?a.current[0]:void 0);if(!s)return;let n=w_.getTreeNode(a);if(n)return n.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=w_.getTreeNode(a);if(!e)return;let n=e.nodeToRestore,r=((e=document)=>e.activeElement)(t);if(s&&n&&(r&&ws(r,a)||r===t.body&&wd(a))){let e=w_.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void wf(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&w_.getTreeNode(t.scopeRef))return void wf(wu(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),c=$,u=y,h=f5().useRef(u),(0,f4.useEffect)(()=>{h.current&&(wn=c,!wa(((e=document)=>e.activeElement)(yJ(c.current?c.current[0]:void 0)),wn.current)&&c.current&&wp(c.current)),h.current=!1},[c]),(0,f4.useEffect)(()=>{let e=((e=document)=>e.activeElement)(yJ($.current?$.current[0]:void 0)),t=null;if(wa(e,$.current)){for(let n of w_.traverse())n.scopeRef&&wa(e,n.scopeRef.current)&&(t=n);t===w_.getTreeNode($)&&(wn=t.scopeRef)}},[$]),yd(()=>()=>{var e,t,n;let r=null!=(n=null==(t=w_.getTreeNode($))||null==(e=t.parent)?void 0:e.scopeRef)?n:null;($===wn||wl($,wn))&&(!r||w_.getTreeNode(r))&&(wn=r),w_.removeTreeNode($)},[$]);let x=(0,f4.useMemo)(()=>{var e;return e=$,{focusNext(t={}){var n;let r=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(yJ(null!=(n=r[0])?n:void 0)),c=r[0].previousElementSibling,u=wh(wo(r),{tabbable:i,accept:s},r);u.currentNode=wa(l,r)?l:c;let p=u.nextNode();return!p&&a&&(u.currentNode=c,p=u.nextNode()),p&&wc(p,!0),p},focusPrevious(t={}){var n;let r=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(yJ(null!=(n=r[0])?n:void 0)),c=r[r.length-1].nextElementSibling,u=wh(wo(r),{tabbable:i,accept:s},r);u.currentNode=wa(l,r)?l:c;let p=u.previousNode();return!p&&a&&(u.currentNode=c,p=u.previousNode()),p&&wc(p,!0),p},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=wh(wo(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&wc(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=wh(wo(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&wc(a,!0),a}}},[]),C=(0,f4.useMemo)(()=>({focusManager:x,parentNode:k}),[k,x]);return f5().createElement(we.Provider,{value:C},f5().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,f5().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:A}))}function wo(e){return e[0].parentElement}function wi(e){let t=w_.getTreeNode(wn);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wa(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function ws(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of w_.traverse(w_.getTreeNode(t)))if(n&&wa(e,n.current))return!0;return!1}function wl(e,t){var n;let r=null==(n=w_.getTreeNode(t))?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function wc(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{_Z(e)}catch{}}function wu(e,t=!0){let n=e[0].previousElementSibling,r=wo(e),o=wh(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&((o=wh(r=wo(e),{tabbable:!1},e)).currentNode=n,i=o.nextNode()),i}function wp(e,t=!0){wc(wu(e,t))}function wd(e){let t=w_.getTreeNode(wn);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function wf(e){e.dispatchEvent(new CustomEvent(wt,{bubbles:!0,cancelable:!0}))&&wc(e)}function wh(e,t,n){var r,o,i;let a=(null==t?void 0:t.tabbable)?yY:yK,s=yJ((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(r=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var r;return(null==t||null==(r=t.from)?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,n){return"#comment"!==t.nodeName&&function(e){let t=yZ(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o="none"!==n&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);o="none"!==n&&"hidden"!==r&&"collapse"!==r}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!n||"SUMMARY"===n.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!n||wa(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(r,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function wm(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(yJ(r)),c=wh(r,{tabbable:i,accept:s});r.contains(l)&&(c.currentNode=l);let u=c.nextNode();return!u&&a&&(c.currentNode=r,u=c.nextNode()),u&&wc(u,!0),u},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(yJ(r)),c=wh(r,{tabbable:i,accept:s});if(r.contains(l))c.currentNode=l;else{let e=wg(c);return e&&wc(e,!0),null!=e?e:null}let u=c.previousNode();if(!u&&a){c.currentNode=r;let e=wg(c);if(!e)return null;u=e}return u&&wc(u,!0),null!=u?u:null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=wh(r,{tabbable:o,accept:i}).nextNode();return a&&wc(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=wg(wh(r,{tabbable:o,accept:i}));return a&&wc(a,!0),null!=a?a:null}}}function wg(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class wb{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let o=new wy({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&wa(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.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 n=new wb;for(let r of this.traverse())n.addTreeNode(r.scopeRef,null!=(t=null==(e=r.parent)?void 0:e.scopeRef)?t:null,r.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new wy({scopeRef:null}),this.fastMap.set(null,this.root)}}class wy{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 w_=new wb;function wv(e,t,n){let{direction:r}=vy(),o=(0,f4.useMemo)(()=>wm(t),[t]),i=()=>{var e;if(!t.current)return;let n=null==(e=window.event)?void 0:e.target,r=wh(t.current,{tabbable:!0});if(n&&(r.currentNode=n,n=r.previousNode()),!n){let e;do(e=r.lastChild())&&(n=e);while(e)}for(;null==n?void 0:n.hasAttribute("data-placeholder");){let e=r.previousNode();if(e&&e.hasAttribute("data-placeholder"))n=e;else break}n&&n.focus()},{pressProps:a}=_S({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return yS(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)),!n))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=i.target,n=wA(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=i.target,n=wA(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else o.focusNext()}}})}function wA(e,t,n){let r=wh(e,{tabbable:!0}),o=r.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<a&&(i=o,a=s),o=r.nextNode()}return i}function w$(e,t,n){let r=(0,f4.useRef)(t),o=yf(()=>{n&&n(r.current)});(0,f4.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",o),()=>{null==n||n.removeEventListener("reset",o)}},[e,o])}function ww(e){let{description:t,errorMessage:n,isInvalid:r,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=yx(t);let a=yx(),s={};return n&&(r=r?`${a} ${r}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:AV({id:t,"aria-label":o,"aria-labelledby":r})}}(e),s=yC([!!t,!!n,r,o]),l=yC([!!t,!!n,r,o]);return{labelProps:i,fieldProps:a=yS(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function wk(e,t,n){let{validationBehavior:r,focus:o}=e;yd(()=>{if("native"===r&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let r,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(o),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=yf(()=>{t.resetValidation()}),a=yf(e=>{var r,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==n||null==(r=n.current)?void 0:r.form;!e.defaultPrevented&&n&&a&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(a)===n.current&&(o?o():null==(i=n.current)||i.focus(),_B="keyboard",_L("keyboard",null)),e.preventDefault()}),s=yf(()=>{t.commitValidation()});(0,f4.useEffect)(()=>{let e=null==n?void 0:n.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)}},[n,a,s,i,r])}let wx=new WeakMap,wC="__role_"+Date.now(),wE="__focusManager_"+Date.now();function wS(e,t,n){var r,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:u,descriptionProps:p,errorMessageProps:d}=ww({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),f=(0,f4.useRef)(null),{focusWithinProps:h}=_2({...e,onFocusWithin(n){var r;f.current=t.value,null==(r=e.onFocus)||r.call(e,n)},onBlurWithin:n=>{var r;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(r=e.onBlur)||r.call(e,n)},onFocusWithinChange:e.onFocusChange}),m=AS((o=$9)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",b="hour"===t.maxGranularity?"time":"date",y=AZ(t.value?m.format(g,{[b]:t.formatValue({month:"long"})}):""),v="presentation"===e[wC]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=e[wE],$=(0,f4.useMemo)(()=>A||wm(n),[A,n]),w=wv(t,n,"presentation"===e[wC]);wx.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:$});let k=(0,f4.useRef)(e.autoFocus);i="presentation"===e[wC]?{role:"presentation"}:yS(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,f4.useEffect)(()=>{k.current&&$.focusFirst(),k.current=!1},[$]),w$(e.inputRef,t.value,t.setValue),wk({...e,focus(){$.focusFirst()}},t,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(r=t.value)?void 0:r.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=yV(e);return{labelProps:{...c,onClick:()=>{$.focusFirst()}},fieldProps:yS(C,i,w,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:x,descriptionProps:p,errorMessageProps:d,isInvalid:a,validationErrors:s,validationDetails:l}}var wD={};wD={"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 wM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},wz={...wM,customError:!0,valid:!1},wO={isInvalid:!1,validationDetails:wM,validationErrors:[]},wP=(0,f4.createContext)({}),wT="__formValidationState"+Date.now();function wB(e){if(e[wT]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=e[wT];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:n,name:r,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:wz}:null,c=(0,f4.useMemo)(()=>a&&null!=o?wI(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return wj(n)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let u=(0,f4.useContext)(wP),p=(0,f4.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>wj(u[e])):wj(u[r]):[],[u,r]),[d,f]=(0,f4.useState)(u),[h,m]=(0,f4.useState)(!1);u!==d&&(f(u),m(!1));let g=(0,f4.useMemo)(()=>wI(h?[]:p),[h,p]),b=(0,f4.useRef)(wO),[y,v]=(0,f4.useState)(wO),A=(0,f4.useRef)(wO),[$,w]=(0,f4.useState)(!1);return(0,f4.useEffect)(()=>{if(!$)return;w(!1);let e=c||i||b.current;wN(e,A.current)||(A.current=e,v(e))}),{realtimeValidation:l||g||c||i||wO,displayValidation:"native"===s?l||g||y:l||g||c||i||y,updateValidation(e){"aria"!==s||wN(y,e)?b.current=e:v(e)},resetValidation(){wN(wO,A.current)||(A.current=wO,v(wO)),"native"===s&&w(!1),m(!0)},commitValidation(){"native"===s&&w(!0),m(!0)}}}(e)}function wj(e){return e?Array.isArray(e)?e:[e]:[]}function wI(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:wz}:null}function wN(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function wR(...e){let t=new Set,n=!1,r={...wM};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in n||(n=o.isInvalid),r)r[e]||(r[e]=o.validationDetails[e])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let wF=new A$((es=wD)&&es.__esModule?es.default:es);function wL(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function wW(e,t,n,r,o){let i=null!=e&&null!=n&&e.compare(n)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==r?void 0:r(e))||!1,l=i||a||s,c=[];if(l){let e=wL(),r=new Ax(e,A$.getGlobalDictionaryForPackage("@react-stately/datepicker")||wF),l=new AM(e,wU({},o)),u=l.resolvedOptions().timeZone;a&&null!=t&&c.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(u))})),i&&null!=n&&c.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(u))})),s&&c.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let wG={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},wV={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function wU(e,t){var n;e={...t.shouldForceLeadingZeros?wV:wG,...e};let r=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(n=t.maxGranularity)?n:"year");i<0&&(i=0);let a=o.indexOf(r);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===i&&(s.era="short"),s}function wq(e){return e&&"hour"in e?e:new vJ}function wH(e,t){return null===e?null:e?At(e,t):void 0}function wK(e,t,n,r){if(e)return wH(e,n);let o=At(Al(null!=r?r:Af()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?v9(o):r?o:Ae(o)}function wY(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=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,f4.useState)([r,n]);return e&&(o[0]!==r||o[1]!==n)&&i([r,n]),t||(t=e?r:o[0]),[t,e?n:o[1]]}let wJ=new A$({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"),wZ={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},wX={year:5,month:2,day:7,hour:2,minute:15,second:15},wQ={dayperiod:"dayPeriod"};function w0(e){var t,n;let{locale:r,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:c,maxValue:u,isDateUnavailable:p}=e,d=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=wY(d,e.granularity),m=h||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,f4.useMemo)(()=>new AM(r),[r]),b=(0,f4.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[y,v]=$L(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),A=(0,f4.useMemo)(()=>{var e;return null!=(e=wH(y,b))?e:null},[y,b]),[$,w]=(0,f4.useState)(()=>wK(e.placeholderValue,f,b,h)),k="gregory"===b.identifier&&"BC"===(A||$).era,x=(0,f4.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,i,k]),C=(0,f4.useMemo)(()=>wU({},x),[x]),E=(0,f4.useMemo)(()=>new AM(r,C),[r,C]),S=(0,f4.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,f4.useMemo)(()=>E.formatToParts(new Date).filter(e=>wZ[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[E]),[M,z]=(0,f4.useState)(()=>e.value||e.defaultValue?{...D}:{}),O=(0,f4.useRef)(null),P=(0,f4.useRef)(b);(0,f4.useEffect)(()=>{Ai(b,P.current)||(P.current=b,w(t=>Object.keys(M).length>0?At(t,b):wK(e.placeholderValue,f,b,h)))},[b,f,M,h,e.placeholderValue]),y&&Object.keys(M).length<Object.keys(D).length&&z(M={...D}),null==y&&Object.keys(M).length===Object.keys(D).length&&(z(M={}),w(wK(e.placeholderValue,f,b,h)));let T=A&&Object.keys(M).length>=Object.keys(D).length?A:$,B=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(M),r=Object.keys(D);null==t?(v(null),w(wK(e.placeholderValue,f,b,h)),z({})):n.length>=r.length||n.length===r.length-1&&D.dayPeriod&&!M.dayPeriod&&"dayPeriod"!==O.current?v(t=At(t,(null==d?void 0:d.calendar)||new vC)):w(t),O.current=null},j=(0,f4.useMemo)(()=>T.toDate(m),[T,m]),I=(0,f4.useMemo)(()=>(function(e,t,n,r,o,i,a,s){let l=["hour","minute","second"],c=n.formatToParts(e),u=[];for(let e of c){var p,d;let n=wZ[e.type];"era"===e.type&&1===i.getEras().length&&(n=!1);let c=wZ[e.type]&&!t[e.type],f=wZ[e.type]?(p=e.type,d=e.value,"era"===p||"dayPeriod"===p?d:"year"===p||"month"===p||"day"===p?wJ.getStringForLocale(p,a):"––"):null,h={type:wQ[e.type]||e.type,text:c?f:e.value,...w1(o,e.type,r),isPlaceholder:c,placeholder:f,isEditable:n};"hour"===e.type?(u.push({type:"literal",text:"⁦",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1}),u.push(h),e.type===s&&u.push({type:"literal",text:"⁩",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(u.push(h),u.push({type:"literal",text:"⁩",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):u.push(h)}return u})(j,M,E,S,T,b,r,f),[j,M,E,S,T,b,r,f]);D.era&&M.year&&!M.era?(M.era=!0,z({...M})):!D.era&&M.era&&(delete M.era,z({...M}));let N=e=>{M[e]=!0,"year"===e&&D.era&&(M.era=!0),z({...M})},R=(e,t)=>{if(M[e])B(function(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{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,n,{round:"hour"!==t,hourCycle:r.hour12?12:24})}throw Error("Unknown segment: "+t)}(T,e,t,S));else{N(e);let t=Object.keys(M),n=Object.keys(D);(t.length>=n.length||t.length===n.length-1&&D.dayPeriod&&!M.dayPeriod)&&B(T)}},F=(0,f4.useMemo)(()=>wW(y,c,u,p,x),[y,c,u,p,x]),L=wB({...e,value:y,builtinValidation:F}),W=L.displayValidation.isInvalid,G=e.validationState||(W?"invalid":null);return{...L,value:A,dateValue:j,calendar:b,setValue:B,segments:I,dateFormatter:E,validationState:G,isInvalid:W,granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){R(e,1)},decrement(e){R(e,-1)},incrementPage(e){R(e,wX[e]||1)},decrementPage(e){R(e,-(wX[e]||1))},setSegment(e,t){N(e),B(function(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e&&"number"==typeof n)switch(t){case"dayPeriod":{let t=e.hour,r=t>=12;if(n>=12===r)return e;return e.set({hour:r?t-12:t+12})}case"hour":if(r.hour12){let t=e.hour>=12;t||12!==n||(n=0),t&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}throw Error("Unknown segment: "+t)}(T,e,t,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(M),n=Object.keys(D);t.length===n.length-1&&D.dayPeriod&&!M.dayPeriod&&(z(M={...D}),B(T.copy()))},clearSegment(t){delete M[t],O.current=t,z({...M});let n=wK(e.placeholderValue,f,b,h),r=T;if("dayPeriod"===t&&"hour"in T&&"hour"in n){let e=T.hour>=12,t=n.hour>=12;e&&!t?r=T.set({hour:T.hour-12}):!e&&t&&(r=T.set({hour:T.hour+12}))}else"hour"===t&&"hour"in T&&T.hour>=12&&M.dayPeriod?r=T.set({hour:n.hour+12}):t in T&&(r=T.set({[t]:n[t]}));v(null),B(r)},formatValue:e=>A?new AM(r,wU(e,x)).format(j):"",getDateFormatter:(e,t)=>new AM(e,wU({},{...x,...t}))}}function w1(e,t,n){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(n.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 w2=(0,f4.createContext)(null),w3=(0,f4.createContext)(null),w4=(0,f4.createContext)(null),w5=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(w3),r=(0,f4.useContext)(w4);return n||r?f5().createElement(w8,{...e,ref:t}):f5().createElement(w6,{...e,ref:t})}),w6=(0,f4.forwardRef)((e,t)=>{let[n,r]=yP({slot:e.slot},t,w2),{locale:o}=vy(),i=w0({...n,locale:o,createCalendar:$P}),a=(0,f4.useRef)(null),{fieldProps:s,inputProps:l}=wS({...n,inputRef:a},i,r);return f5().createElement(yM,{values:[[w3,i],[$8,{...l,ref:a}],[$5,{...s,ref:r,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},f5().createElement(w8,e))}),w8=(0,f4.forwardRef)((e,t)=>{let{className:n,children:r}=e,o=(0,f4.useContext)(w3),i=(0,f4.useContext)(w4),a=null!=o?o:i;return f5().createElement(f5().Fragment,null,f5().createElement($6,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,f4.cloneElement)(r(e),{key:t}))),f5().createElement($7,null))}),w7=(0,f4.createContext)({});function w9({children:e}){let t=(0,f4.useMemo)(()=>({register:()=>{}}),[]);return f5().createElement(_f.Provider,{value:t},e)}f5().forwardRef(({children:e,...t},n)=>{let r=(0,f4.useRef)(!1),o=(0,f4.useContext)(_f);n=yu(n||(null==o?void 0:o.ref));let i=yS(o||{},{...t,ref:n,register(){r.current=!0,o&&o.register()}});return _b(o,n),(0,f4.useEffect)(()=>{r.current||(r.current=!0)},[]),f5().createElement(_f.Provider,{value:i},e)});let ke=f5().createContext(null);function kt(e){var t;let n=y$(),{portalContainer:r=n?null:document.body,isExiting:o}=e,[i,a]=(0,f4.useState)(!1),s=(0,f4.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,f4.useContext)(w7))?t:{};if(!e.portalContainer&&l&&(r=l()),!r)return null;let c=e.children;return e.disableFocusManagement||(c=f5().createElement(wr,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},c)),c=f5().createElement(ke.Provider,{value:s},f5().createElement(w9,null,c)),_k().createPortal(c,r)}let kn=(0,f4.createContext)(null),kr=(0,f4.createContext)(null),ko=(0,f4.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=yP(e,t,kn);let{dialogProps:r,titleProps:o}=function(e,t){let n,r,{role:o="dialog"}=e,i=yC();i=e["aria-label"]?void 0:i;let a=(0,f4.useRef)(!1);return(0,f4.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){_Z(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),_Z(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),yd(()=>{null==r||r(!0)},[r=null==(n=(0,f4.useContext)(ke))?void 0:n.setContain]),{dialogProps:{...yV(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":n},t),i=(0,f4.useContext)(kr);r["aria-label"]||r["aria-labelledby"]||e["aria-labelledby"]&&(r["aria-labelledby"]=e["aria-labelledby"]);let a=yz({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return f5().createElement("section",{...yV(e),...r,...a,ref:t,slot:e.slot||void 0},f5().createElement(yM,{values:[[vo,{slots:{[yD]:{},title:{...o,level:2}}}],[vn,{slots:{[yD]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),ki=(0,f4.createContext)(null),ka=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(ki);return(null==n?void 0:n.isInvalid)?f5().createElement(ks,{...e,ref:t}):null}),ks=(0,f4.forwardRef)((e,t)=>{let n=(0,f4.useContext)(ki),r=yV(e),o=yz({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==o.children?null:f5().createElement(va,{slot:"errorMessage",...r,...o,ref:t})}),kl=(0,f4.createContext)(null),kc=(0,f4.createContext)({}),ku=ve(function(e,t){[e,t]=yP(e,t,kc);let{elementType:n="label",...r}=e;return f5().createElement(n,{className:"react-aria-Label",...r,ref:t})}),kp=(0,f4.createContext)({placement:"bottom"}),kd=new WeakMap,kf=[];function kh(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function km(e,t){let n=e,r=t.toString(),o=r.indexOf("."),i=o>=0?r.length-o:0;if(i>0){let e=Math.pow(10,i);n=Math.round(n*e)/e}return n}function kg(e,t,n,r){t=Number(t),n=Number(n);let o=(e-(isNaN(t)?0:t))%r,i=km(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(km(n/r,r))*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor(km((n-t)/r,r))*r),i=km(i,r)}let kb={top:"top",bottom:"top",left:"left",right:"left"},ky={top:"bottom",bottom:"top",left:"right",right:"left"},k_={top:"left",left:"top"},kv={top:"height",left:"width"},kA={width:"totalWidth",height:"totalHeight"},k$={},kw="u">typeof document?window.visualViewport:null;function kk(e){var t,n,r,o,i;let a=0,s=0,l=0,c=0,u=0,p=0,d={},f=(null!=(t=null==kw?void 0:kw.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,c=t.clientHeight,a=null!=(n=null==kw?void 0:kw.width)?n:l,s=null!=(r=null==kw?void 0:kw.height)?r:c,d.top=t.scrollTop||e.scrollTop,d.left=t.scrollLeft||e.scrollLeft,kw&&(u=kw.offsetTop,p=kw.offsetLeft)}else({width:a,height:s,top:u,left:p}=kD(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=a,c=s;return _t()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,u=null!=(o=null==kw?void 0:kw.pageTop)?o:0,p=null!=(i=null==kw?void 0:kw.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:c,scroll:d,top:u,left:p}}function kx(e,t,n,r,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,c=r[kv[e]],u=r.scroll[kb[e]]+i,p=c+r.scroll[kb[e]]-i,d=t-l+a[e]-r[kb[e]],f=t-l+n+a[e]-r[kb[e]];return d<u?u-d:f>p?Math.max(p-f,u-d):0}function kC(e){if(k$[e])return k$[e];let[t,n]=e.split(" "),r=kb[t]||"right",o=k_[r];kb[n]||(n="center");let i=kv[r],a=kv[o];return k$[e]={placement:t,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:a},k$[e]}function kE(e,t,n,r,o,i,a,s,l,c){var u,p,d,f,h;let{placement:m,crossPlacement:g,axis:b,crossAxis:y,size:v,crossSize:A}=r,$={};$[y]=null!=(u=e[y])?u:0,"center"===g?$[y]+=((null!=(p=e[A])?p:0)-(null!=(d=n[A])?d:0))/2:g!==y&&($[y]+=(null!=(f=e[A])?f:0)-(null!=(h=n[A])?h:0)),$[y]+=i;let w=e[y]-n[A]+l+c,k=e[y]+e[A]-l-c;if($[y]=kh($[y],w,k),m===b){let n=s?a[v]:t[kA[v]];$[ky[b]]=Math.floor(n-e[b]+o)}else $[b]=Math.floor(e[b]+e[v]+o);return $}function kS(e,t,n,r,o,i){var a,s,l;let{placement:c,axis:u,size:p}=i;return c===u?Math.max(0,n[u]-e[u]-(null!=(a=e.scroll[u])?a:0)+t[u]-(null!=(s=r[u])?s:0)-r[ky[u]]-o):Math.max(0,e[p]+e[u]+e.scroll[u]-t[u]-n[u]-n[p]-(null!=(l=r[u])?l:0)-r[ky[u]]-o)}function kD(e){let{top:t,left:n,width:r,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:n+a-l,width:r,height:o}}function kM(e,t){let n,r=window.getComputedStyle(e);if("fixed"===r.position){let{top:t,left:r,width:o,height:i}=e.getBoundingClientRect();n={top:t,left:r,width:o,height:i}}else{n=kD(e);let r=kD(t),o=window.getComputedStyle(t);r.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=r.top,n.left-=r.left}return n.top-=parseInt(r.marginTop,10)||0,n.left-=parseInt(r.marginLeft,10)||0,n}function kz(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 kO=new WeakMap;function kP(e){let{ref:t,box:n,onResize:r}=e;(0,f4.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[r,t,n])}let kT="u">typeof document?window.visualViewport:null;function kB(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 kj=[],kI="u">typeof document&&window.visualViewport,kN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),kR=0;function kF(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function kL(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function kW(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=A1(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,r=n.getBoundingClientRect().top;r>t+n.clientHeight&&(e.scrollTop+=r-t)}n=e.parentElement}}var kG={};function kV(e){var t;let{onDismiss:n,...r}=e,o=AV(r,AS((t=kG)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return f5().createElement(AH,null,f5().createElement("button",{...o,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function kU(e,t,n){yd(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,_w.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}function kq(e){let[t,n]=$L(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,f4.useCallback)(()=>{n(!0)},[n]),o=(0,f4.useCallback)(()=>{n(!1)},[n]),i=(0,f4.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:o,toggle:i}}kG={"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 kH=(0,f4.createContext)(null),kK=(0,f4.createContext)(null),kY=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,kH);let n=(0,f4.useContext)(kr),r=kq(e),o=null==e.isOpen&&null==e.defaultOpen&&n?n:r,i=function(e,t){let[n,r]=(0,f4.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let o="exiting"===n;return kU(e,o,(0,f4.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,f4.useContext)(_9),{direction:s}=vy();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),f5().createElement(f5().Fragment,null,t)}return!o||o.isOpen||i?f5().createElement(kJ,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function kJ({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var o,i;let a=(0,f4.useRef)(null),[s,l]=(0,f4.useState)(0),c=(0,f4.useRef)(null),p=(0,f4.useContext)(kK),d=p&&"SubmenuTrigger"===r.trigger;yd(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:g}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:p,underlayProps:d}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,f4.useEffect)(()=>{if(o&&!kj.includes(t))return kj.push(t),()=>{let e=kj.indexOf(t);e>=0&&kj.splice(e,1)}},[o,t]);let l=()=>{kj[kj.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e,i=(0,f4.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=yf(e=>{n&&kB(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=yf(e=>{n&&n(e)});(0,f4.useEffect)(()=>{let e=i.current;if(r)return;let n=yJ(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&kB(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",a,!0),n.addEventListener("pointerup",r,!0),()=>{n.removeEventListener("pointerdown",a,!0),n.removeEventListener("pointerup",r,!0)}}},[t,r,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(kj[kj.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&kj[kj.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=_2({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||ws(e.relatedTarget,wn))&&(!s||s(e.relatedTarget))&&(null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||c,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},null!=o?o:r),{overlayProps:f,arrowProps:h,placement:m}=function(e){var t,n,r;let{direction:o}=vy(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:c="bottom",containerPadding:u=12,shouldFlip:p=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:g=!0,onClose:b,maxHeight:y,arrowBoundaryOffset:v=0}=e,[A,$]=(0,f4.useState)(null),w=[m,c,s.current,a.current,l.current,u,p,d,f,h,g,o,y,v,i],k=(0,f4.useRef)(null==kT?void 0:kT.scale);(0,f4.useEffect)(()=>{g&&(k.current=null==kT?void 0:kT.scale)},[g]);let x=(0,f4.useCallback)(()=>{var e,t,n,r,b,A;if(!1===m||!g||!s.current||!a.current||!d||(null==kT?void 0:kT.scale)!==k.current)return;let w=null;if(l.current&&l.current.contains(document.activeElement)){let r=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(w={type:"top",offset:(null!=(t=null==r?void 0:r.top)?t:0)-o.top}).offset>o.height/2&&(w.type="bottom",w.offset=(null!=(n=null==r?void 0:r.bottom)?n:0)-o.bottom)}let x=s.current;!y&&s.current&&(x.style.top="0px",x.style.bottom="",x.style.maxHeight=(null!=(b=null==(r=window.visualViewport)?void 0:r.height)?b:window.innerHeight)+"px");let C=function(e){var t,n,r,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:c,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:h,maxHeight:m,arrowSize:g=0,arrowBoundaryOffset:b=0}=e,y=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!kz(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!kz(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=y===document.documentElement,A=window.getComputedStyle(y).position,$=v?kD(s):kM(s,y);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);$.top+=parseInt(e,10)||0,$.left+=parseInt(t,10)||0}let w=kD(l),k={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};w.width+=(null!=(t=k.left)?t:0)+(null!=(n=k.right)?n:0),w.height+=(null!=(r=k.top)?r:0)+(null!=(o=k.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=kk(d),E=kk(y),S="BODY"===d.tagName?kD(y):kM(y,d);return"HTML"===y.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,t,n,r,o,i,a,s,l,c,u,p,d,f,h,m){var g,b,y,v,A,$,w,k,x,C,E,S,D,M;let z,O,P,T=kC(e),{size:B,crossAxis:j,crossSize:I,placement:N,crossPlacement:R}=T,F=kE(t,s,n,T,u,p,c,d,h,m),L=u,W=kS(s,c,t,o,i+u,T);if(a&&r[B]>W){let e=kC(`${ky[N]} ${R}`),r=kE(t,s,n,e,u,p,c,d,h,m);kS(s,c,t,o,i+u,e)>W&&(T=e,F=r,L=u)}let G="bottom";"top"===T.axis?"top"===T.placement?G="top":"bottom"===T.placement&&(G="bottom"):"top"===T.crossAxis&&("top"===T.crossPlacement?G="bottom":"bottom"===T.crossPlacement&&(G="top"));let V=kx(j,F[j],n[I],s,l,i,c);F[j]+=V;let U=(A=F,$=n.height,w=G,z=d?c.height:s[kA.height],O=null!=A.top?c.top+A.top:c.top+(z-(null!=(k=A.bottom)?k:0)-$),P="top"!==w?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-O-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+i)):Math.max(0,O+$-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(M=o.bottom)?M:0)+i)),Math.min(s.height-2*i,P));f&&f<U&&(U=f),n.height=Math.min(n.height,U),V=kx(j,(F=kE(t,s,n,T,L,p,c,d,h,m))[j],n[I],s,l,i,c),F[j]+=V;let q={},H=t[j]+.5*t[I]-F[j]-o[kb[j]],K=h/2+m,Y="left"===kb[j]?(null!=(g=o.left)?g:0)+(null!=(b=o.right)?b:0):(null!=(y=o.top)?y:0)+(null!=(v=o.bottom)?v:0),J=n[I]-Y-h/2-m,Z=kh(H,t[j]+h/2-(F[j]+o[kb[j]]),t[j]+t[I]-h/2-(F[j]+o[kb[j]]));return q[j]=kh(Z,K,J),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:T.placement}}(a,$,w,x,k,u,p,C,E,S,f,h,!!A&&"static"!==A,m,g,b)}({placement:(A=c,"rtl"===o?A.replace("start","right").replace("end","left"):A.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:h,maxHeight:y,arrowSize:i,arrowBoundaryOffset:v});if(C.position){if(x.style.top="",x.style.bottom="",x.style.left="",x.style.right="",Object.keys(C.position).forEach(e=>x.style[e]=C.position[e]+"px"),x.style.maxHeight=null!=C.maxHeight?C.maxHeight+"px":"",w&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),n=e[w.type]-t[w.type];l.current.scrollTop+=n-w.offset}$(C)}},w);yd(x,w),yd(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=x]),kP({ref:s,onResize:x}),kP({ref:a,onResize:x});let C=(0,f4.useRef)(!1);yd(()=>{let e,t=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},n=()=>{C.current&&t()};return null==kT||kT.addEventListener("resize",t),null==kT||kT.addEventListener("scroll",n),()=>{null==kT||kT.removeEventListener("resize",t),null==kT||kT.removeEventListener("scroll",n)}},[x]);let E=(0,f4.useCallback)(()=>{C.current||null==b||b()},[b,C]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,f4.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=r||kO.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:a,isOpen:g,onClose:b&&E}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==A?void 0:A.position,maxHeight:null!=(t=null==A?void 0:A.maxHeight)?t:"100vh"}},placement:null!=(n=null==A?void 0:A.placement)?n:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==A?void 0:A.arrowOffsetLeft,top:null==A?void 0:A.arrowOffsetTop}},updatePosition:x}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;yd(()=>{if(!t){let e,t,n,r;return 1==++kR&&(u=_e()?(n=null,r=yp(kL(document,"touchstart",n=>{((e=A1(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=kF(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),kL(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}),kL(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),kL(document,"focus",e=>{var t;let r=e.target;((t=r)instanceof HTMLInputElement&&!kN.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=yp(kL(window,"scroll",()=>{window.scrollTo(0,0)}),kF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),kF(document.documentElement,"overflow","hidden"),kF(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),r.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{r.style.transform="",kI&&(kI.height<window.innerHeight?requestAnimationFrame(()=>{kW(r)}):kI.addEventListener("resize",()=>kW(r),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),r()}):yp(kF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),kF(document.documentElement,"overflow","hidden"))),()=>{0==--kR&&u()}}},[t])}({isDisabled:i||!t.isOpen}),yd(()=>{if(t.isOpen&&r.current){if(!i)return function(e,t=document.body){let n=new Set(e),r=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(t);let t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of n)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 n=null!=(t=kd.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==n)&&(0===n&&e.setAttribute("aria-hidden","true"),r.add(e),kd.set(e,n+1))};kf.length&&kf[kf.length-1].disconnect(),o(t);let a=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...r].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?n.add(e):e instanceof Element&&o(e)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return kf.push(s),()=>{for(let e of(a.disconnect(),r)){let t=kd.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),kd.delete(e)):kd.set(e,t-1))}s===kf[kf.length-1]?(kf.pop(),kf.length&&kf[kf.length-1].observe()):kf.splice(kf.indexOf(s),1)}}([null!=(n=null==o?void 0:o.current)?n:r.current]);var e,n,a=null!=(e=null==o?void 0:o.current)?e:r.current;let t=kf[kf.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,r,o]),{popoverProps:yS(p,f),arrowProps:h,underlayProps:d,placement:m}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:d?p:c},e),b=r.popoverRef,y=function(e,t=!0){let[n,r]=(0,f4.useState)(!0),o=n&&t;return yd(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),kU(e,o,(0,f4.useCallback)(()=>r(!1),[])),o}(b,!!g)||r.isEntering||!1,v=yz({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:y,isExiting:t}}),A=!r.isNonModal||"SubmenuTrigger"===r.trigger,[$,w]=(0,f4.useState)(!1);yd(()=>{b.current&&w(A&&!b.current.querySelector("[role=dialog]"))},[b,A]),(0,f4.useEffect)(()=>{$&&b.current&&!b.current.contains(document.activeElement)&&_Z(b.current)},[$,b]);let k={...f.style,...v.style},x=f5().createElement("div",{...yS(yV(r),f),...v,role:$?"dialog":void 0,tabIndex:$?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:b,slot:r.slot||void 0,style:k,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":y||void 0,"data-exiting":t||void 0},!r.isNonModal&&f5().createElement(kV,{onDismiss:e.close}),f5().createElement(kp.Provider,{value:{...m,placement:g,ref:a}},v.children),f5().createElement(kV,{onDismiss:e.close}));return d?f5().createElement(kt,{...r,shouldContainFocus:$,isExiting:t,portalContainer:null!=(i=null!=n?n:null==p?void 0:p.current)?i:void 0},x):f5().createElement(kt,{...r,shouldContainFocus:$,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&f5().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),f5().createElement("div",{ref:c,style:{display:"contents"}},f5().createElement(kK.Provider,{value:c},x)))}function kZ(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let kX=(0,f4.createContext)(null),kQ=(0,f4.createContext)(null),k0=(0,f4.createContext)(null),k1=(0,f4.createContext)(null),k2=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,kX);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){var t;let n=kq(e),[r,o]=$L(e.value,e.defaultValue||null,e.onChange),i=r||e.placeholderValue||null,[a,s]=wY(i,e.granularity),l=null!=r?r.toDate(null!=s?s:"UTC"):null,c="hour"===a||"minute"===a||"second"===a,u=null==(t=e.shouldCloseOnSelect)||t,[p,d]=(0,f4.useState)(null),[f,h]=(0,f4.useState)(null);if(r&&(p=r,"hour"in r&&(f=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,g=(0,f4.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:b,maxValue:y,isDateUnavailable:v}=e,A=(0,f4.useMemo)(()=>wW(r,b,y,v,g),[r,b,y,v,g]),$=wB({...e,value:r,builtinValidation:A}),w=$.displayValidation.isInvalid,k=e.validationState||(w?"invalid":null),x=(e,t)=>{o("timeZone"in t?t.set(v9(e)):Ae(e,t)),d(null),h(null),$.commitValidation()};return{...$,value:r,setValue:o,dateValue:p,timeValue:f,setDateValue:t=>{let r="function"==typeof u?u():u;c?f||r?x(t,f||wq(e.defaultValue||e.placeholderValue)):d(t):(o(t),$.commitValidation()),r&&n.setOpen(!1)},setTimeValue:e=>{p&&e?x(p,e):h(e)},granularity:a,hasTime:c,...n,setOpen(t){!t&&!r&&p&&c&&x(p,f||wq(e.defaultValue||e.placeholderValue)),n.setOpen(t)},validationState:k,isInvalid:w,formatValue:(e,t)=>l?new AM(e,wU(t,g)).format(l):"",getDateFormatter:(e,t)=>new AM(e,wU({},{...g,...t}))}}({...e,validationBehavior:i}),s=(0,f4.useRef)(null),[l,c]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,fieldProps:d,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:g,errorMessageProps:b,...y}=function(e,t,n){var r;let o=yx(),i=yx(),a=yx(),s=AS((r=$9)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:u}=t.displayValidation,{labelProps:p,fieldProps:d,descriptionProps:f,errorMessageProps:h}=ww({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),m=wv(t,n),g=d["aria-labelledby"]||d.id,{locale:b}=vy(),y=t.formatValue(b,{month:"long"}),v=AZ(y?s.format("selectedDateDescription",{date:y}):""),A=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=yV(e),w=(0,f4.useMemo)(()=>wm(n),[n]),k=(0,f4.useRef)(!1),{focusWithinProps:x}=_2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(i);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,o;k.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!k.current){var n,r;k.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}});return{groupProps:yS($,m,d,v,x,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":A,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...p,onClick:()=>{w.focusFirst()}},fieldProps:{...d,id:a,[wC]:"presentation","aria-describedby":A,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,[wT]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":A,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${g}`},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:c,validationDetails:u}}({...yB(e),label:c,validationBehavior:i},a,s),[v,A]=(0,f4.useState)(null),$=(0,f4.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);kP({ref:s,onResize:$});let{focusProps:w,isFocused:k,isFocusVisible:x}=_3({within:!0}),C=yz({...e,values:{state:a,isFocusWithin:k,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),E=yV(e);return delete E.id,f5().createElement(yM,{values:[[k0,a],[$5,{...u,ref:s,isInvalid:a.isInvalid}],[w2,d],[vn,{...f,isPressed:a.isOpen}],[kc,{...p,ref:l,elementType:"span"}],[$H,m],[kr,a],[kH,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[kn,h],[vi,{slots:{description:g,errorMessage:b}}],[ki,y]]},f5().createElement("div",{...w,...E,...C,ref:t,slot:e.slot||void 0,"data-focus-within":k||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),k3=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,kQ);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){var t,n,r;let o=kq(e),[i,a]=$L(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,f4.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let c=i||s,u=e=>{l(e||{start:null,end:null}),kZ(e)?a(e):a(null)},[p,d]=wY((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===p||"minute"===p||"second"===p,h=null==(r=e.shouldCloseOnSelect)||r,[m,g]=(0,f4.useState)(null),[b,y]=(0,f4.useState)(null);c&&kZ(c)&&(m=c,"hour"in c.start&&(b=c));let v=(e,t)=>{u({start:"timeZone"in t.start?t.start.set(v9(e.start)):Ae(e.start,t.start),end:"timeZone"in t.end?t.end.set(v9(e.end)):Ae(e.end,t.end)}),g(null),y(null),D.commitValidation()},A=t=>{let n="function"==typeof h?h():h;f?kZ(t)&&(null==b?void 0:b.start)&&(null==b?void 0:b.end)?v(t,{start:(null==b?void 0:b.start)||wq(e.placeholderValue),end:(null==b?void 0:b.end)||wq(e.placeholderValue)}):g(t):kZ(t)?(u(t),D.commitValidation()):g(t),n&&o.setOpen(!1)},$=e=>{kZ(m)&&kZ(e)?v(m,e):y(e)},w=(null==c||null==(t=c.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===c.start.era||(null==c||null==(n=c.end)?void 0:n.calendar.identifier)==="gregory"&&"BC"===c.end.era,k=(0,f4.useMemo)(()=>({granularity:p,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[p,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,w]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,f4.useMemo)(()=>{var e,t;let n;return n=wR(wW(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,k),wW(null!=(t=null==c?void 0:c.end)?t:null,x,C,E,k)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(n=wR(n,{isInvalid:!0,validationErrors:[(A$.getGlobalDictionaryForPackage("@react-stately/datepicker")||wF).getStringForLocale("rangeReversed",wL())],validationDetails:{...wM,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),n},[c,x,C,E,k]),D=wB({...e,value:i,name:(0,f4.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),M=D.displayValidation.isInvalid,z=e.validationState||(M?"invalid":null);return{...D,value:c,setValue:u,dateRange:m,timeRange:b,granularity:p,hasTime:f,setDate(e,t){var n,r;"start"===e?A({start:t,end:null!=(n=null==m?void 0:m.end)?n:null}):A({start:null!=(r=null==m?void 0:m.start)?r:null,end:t})},setTime(e,t){var n,r;"start"===e?$({start:t,end:null!=(n=null==b?void 0:b.end)?n:null}):$({start:null!=(r=null==b?void 0:b.start)?r:null,end:t})},setDateTime(e,t){var n,r;"start"===e?u({start:t,end:null!=(n=null==c?void 0:c.end)?n:null}):u({start:null!=(r=null==c?void 0:c.start)?r:null,end:t})},setDateRange:A,setTimeRange:$,...o,setOpen(t){!t&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&kZ(m)&&f&&v(m,{start:(null==b?void 0:b.start)||wq(e.placeholderValue),end:(null==b?void 0:b.end)||wq(e.placeholderValue)}),o.setOpen(t)},validationState:z,isInvalid:M,formatValue(t,n){let r;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,i=e.granularity||(c.start&&"minute"in c.start?"minute":"day"),a="timeZone"in c.end?c.end.timeZone:void 0,s=e.granularity||(c.end&&"minute"in c.end?"minute":"day"),l=wU(n,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===c.start.calendar.identifier&&"BC"===c.start.era||"gregory"===c.end.calendar.identifier&&"BC"===c.end.era}),u=c.start.toDate(o||"UTC"),p=c.end.toDate(a||"UTC"),d=new AM(t,l);if(o===a&&i===s&&0!==c.start.compare(c.end)){try{let e=d.formatRangeToParts(u,p),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let o=0;o<e.length;o++)o<t?n+=e[o].value:o>t&&(r+=e[o].value);return{start:n,end:r}}catch{}r=d}else r=new AM(t,wU(n,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(u),end:r.format(p)}},getDateFormatter:(e,t)=>new AM(e,wU({},{...k,...t}))}}({...e,validationBehavior:i}),s=(0,f4.useRef)(null),[l,c]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,startFieldProps:d,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:g,descriptionProps:b,errorMessageProps:y,...v}=function(e,t,n){var r,o,i,a,s,l;let c=AS((l=$9)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:u,validationErrors:p,validationDetails:d}=t.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:g}=ww({...e,labelElementType:"span",isInvalid:u,errorMessage:e.errorMessage||p}),b=h["aria-labelledby"]||h.id,{locale:y}=vy(),v=t.formatValue(y,{month:"long"}),A=AZ(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),$={"aria-label":c.format("startDate"),"aria-labelledby":b},w={"aria-label":c.format("endDate"),"aria-labelledby":b},k=yx(),x=yx(),C=wv(t,n),E=[A["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,f4.useMemo)(()=>wm(n,{accept:e=>e.id!==k}),[n,k]),D={[wE]:S,[wC]:"presentation","aria-describedby":E,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},M=yV(e),z=(0,f4.useRef)(!1),{focusWithinProps:O}=_2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(x);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,o;z.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!z.current){var n,r;z.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}}),P=(0,f4.useRef)(wO),T=(0,f4.useRef)(wO);return{groupProps:yS(M,C,h,A,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...f,onClick:()=>{S.focusFirst()}},buttonProps:{...A,id:k,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${k} ${b}`,"aria-describedby":E,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${k} ${b}`},startFieldProps:{...$,...D,value:null!=(a=null==(r=t.value)?void 0:r.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[wT]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(wR(e,T.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...w,...D,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[wT]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){T.current=e,t.updateValidation(wR(P.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:g,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:u,validationErrors:p,validationDetails:d}}({...yB(e),label:c,validationBehavior:i},a,s),[A,$]=(0,f4.useState)(null),w=(0,f4.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);kP({ref:s,onResize:w});let{focusProps:k,isFocused:x,isFocusVisible:C}=_3({within:!0}),E=yz({...e,values:{state:a,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=yV(e);return delete S.id,f5().createElement(yM,{values:[[k1,a],[$5,{...u,ref:s,isInvalid:a.isInvalid}],[vn,{...h,isPressed:a.isOpen}],[kc,{...p,ref:l,elementType:"span"}],[$K,g],[kr,a],[kH,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":A}}],[kn,m],[w2,{slots:{start:d,end:f}}],[vi,{slots:{description:b,errorMessage:y}}],[ki,v]]},f5().createElement("div",{...k,...S,...E,ref:t,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function k4(e){return f5().createElement(vb,e)}function k5(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof vK||e instanceof vX||e instanceof v0)return t?At(e,t):e;{let n=mT()(e).toDate(),r=new vK(n.getFullYear(),n.getMonth()+1,n.getDate());return t?At(r,t):r}}function k6(e){if(e)return e.toDate(Af())}function k8(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ec=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ec=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var k7=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ec||"en-US"),k9=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},xe={};for(let e=1;e<100;e++)xe[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var xt={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},xn="[1234567890一二三四五六七八九〇\\d]",xr={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},xo={},xi={"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},xa={zone:xi,year:xe,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:{}},xs={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(xi).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,}"},xl={...xs,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}"},xc={},xu=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=k7){return xc[t.toLowerCase()]||(xc[t.toLowerCase()]=new e(t)),xc[t.toLowerCase()]}constructor(e=k7){this.locale=e,this.lookups={...xa},this.vars={...xs};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 n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);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 n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=xr: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(xo[e])return xo[e];if("fullwide"===e||"hanidec"===e)return{group:xn,lookup:{...xr}};let t=xt[e];if(!t)return{group:"\\d",lookup:{...xr}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return xo[e]={group:`[${n}-${r}]`,lookup:o},xo[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,xl)xl.hasOwnProperty(n)&&(this.vars[n]=xl[n].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((n,r)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.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(n[a]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(n[i]).find(r).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 n=[],r={};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(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=a}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},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);n.push(s),r[s]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}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")}},xp=["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"],xd={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},xf=()=>new Date;function xh(e){return function(t){let n={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(n[o]=t[r])}return n}}var xm=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;r=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},xg=["year","month","day","hour","minute","second","millisecond","offset"],xb={};function xy(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 x_=[[/([^\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"]],xv={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," "],...x_],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:x_,id:x_,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function xA(e,t=k7){let n=function(e){if(!xb[e]){var t,n;let r,o,i=xu.factory(e);xb[e]=new xm({doneChecker:xy,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:xh(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:xh(["","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:xh(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${xn}{2,4})\\s*\u5E74\\s*(${xn}{1,2})\\s*\u6708\\s*(${xn}{1,2})\\s*\u65E5$`),handler:xh(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:xh(["","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:xh(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=xf(),n=e[0].toLowerCase(),r={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==r&&t.setTime(t.getTime()+r);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...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,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?xd[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let o=xf();return"millisecond"===n?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===n?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===n?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===n?o.setUTCHours(o.getUTCHours()+t):"day"===n?o.setUTCDate(o.getUTCDate()+t):"month"===n?o.setUTCMonth(o.getUTCMonth()+t):"year"===n&&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:xh(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:xh(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:xh(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:xh(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:xh(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:xh(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:xh(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:xh(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:xh(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:xh(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:xh(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:xh(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:xh(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:xh(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:xh(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:xh(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:xh(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:xh(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:xh(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:xh(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:xh(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:xh(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:xh(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:xh(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:xh(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:xh(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:xh(["offset"])}],o=i.baseName.slice(0,5),xp.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=i,function(e){let t={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=n.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(o,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(o){let e=n.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(xg.includes(r)){let e=n.toInt(o);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=xe[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return xb[e]}(t),r=function(e,t){let n=xv[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function x$(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new k9(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 k9(t.valueOf()-60*e.offset*1e3):t}function xw(e,t=k7){let n=xA(e,t),r=n.invalid?new k9(NaN):x$(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function xk(e,t=k7){return e instanceof Date?new k9(e.valueOf()):"number"==typeof e?new k9(e):xw(e,t)}Date.fromString=k9.fromString=xw,Date.fromAny=k9.fromAny=xk,"u">typeof window&&(window.anyDateParser={fromString:xw,fromAny:xk,fromObject:x$,attempt:xA});var xx=n(5238),xC=n(3826);let xE=function(e){return null==e};function xS(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}mP.extend(mB),mP.extend(xC),mP.extend(xx);let xD="YYYY-MM-DDTHH:mm:ss.SSSZZ";function xM(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&mP(e,xD).isValid()}function xz(e){return mP(e).isToday()}function xO(e){return xM(e)?mP(e,xD).toDate():null}function xP(e,t=!1){let n=mP(e);return t&&(n=n.utc()),n.format(xD)}function xT(e){return mP(e).toDate()}var xB=new WeakMap;let xj=new class{register(e,t){xS(this,xB).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(xS(this,xB).has(t))return xS(this,xB).get(t)}if(e.language&&xS(this,xB).has(e.language))return xS(this,xB).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return xS(this,xB).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,xB,{writable:!0,value:new Map})}};function xI(e,t){xj.register(e,t)}function xN(e){let t=e??k8();return xj.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let xR={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function xF(e,t={}){let n=xA(e,k8());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!xE(n.day)&&xE(n.month)&&(n=Object.assign({},rk(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},rk(n,"day"),{date:n.day}));let r=mP().set(n).toDate();return xE(n.year)&&(t.year=!1),xE(n.month)&&(t.month=!1),xE(n.date)&&(t.day=!1),xL(r,t)}function xL(e,t){let n,r=t?.locale??k8(),o=new Intl.Locale(r),{calendar:i,mode:a,time:s,day:l,month:c,year:u,noToday:p,numberingSystem:d}={...xR,...{noToday:"am"===o.language},...t},f={calendar:i??xN(o),year:u?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},h=mP(e).isToday();if(h&&!p)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===o.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&u&&l&&(t=t.map(xW("-"))),"wide"==a&&(t=t.map(xW(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(n+=`, ${xG(e)}`),n}let xW=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function xG(e){return e.toLocaleTimeString(k8(),{hour:"2-digit",minute:"2-digit"})}function xV(e,t){return xL(e,{...t,time:!0})}function xU(e,t){let n=xN("string"==typeof t?new Intl.Locale(t):t);return n?At(e,$P(n)):e}function xq(e,t){return new Intl.DurationFormat(k8(),t).format(e)}function xH(e,t){if(null==e)return null;if("string"==typeof e){let n=xA(e,k8());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...rk(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...rk(n,"day"),...{date:n.day}}),mP(t).set(n))}return mP(e)}let xK=["years","months","days","hours","minutes","seconds"],xY={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},xJ={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xZ(e,t=mP(),n){let r,o=mP(t),i=xH(e,o);if(null==i)return null;if("string"==typeof n){let e=xY[n]??n;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?xY[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=xK.indexOf(n);for(let o=0;o<xK.length;o++){let i=xK[o];if(t.diff(e,i)>0)return o<=r?i:n}return n}(i,o,t??"seconds"):xY[s]??s,function(e,t,n,r){let o=xK.indexOf(n),i=xK.indexOf(r),a=xK.slice(o,i+1),s={},l=e;for(let e of a){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(i,o,e,t??e)}let c=(r=function(e){let t={...xJ};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[xY[n]??n]=r);return t}(a),o.diff(i,"seconds")<r.seconds?"seconds":o.diff(i,"minutes")<r.minutes?"minutes":o.diff(i,"hours")<r.hours?"hours":o.diff(i,"days")<r.days?"days":o.diff(i,"months")<r.months?"months":"years");return{[c]:o.diff(i,c)}}let xX={style:"short",localeMatcher:"lookup"};function xQ(e,t=mP(),n){let r=xZ(e,t,n);return null==r?null:xq(r,"object"==typeof n&&n.formatOptions?{...xX,...n.formatOptions}:xX)}let x0=(0,f4.createContext)(null);function x1(){let e=hZ({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,f4.useMemo)(()=>{let t=k8();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,f4.useMemo)(()=>{let e=xN(t);return void 0!==e?$P(e):void 0},[t]),r=(0,f4.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),o=(0,f4.useMemo)(()=>n?At(Ac(Af()),n):Ac(Af()),[n]);return{calendar:n,intlLocale:r,today_:o}}let x2=new vK(1793,1,1);var x3={};function x4(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}x3={"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 x5=n(137);function x6(e={}){let{locale:t}=vy();return(0,f4.useMemo)(()=>new(0,x5.K)(t,e),[t,e])}var x8={};function x7(e){var t;let n=(0,f4.useRef)(void 0),{value:r,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:u,onIncrementPage:p,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,g=AS((t=x8)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,f4.useEffect)(()=>()=>clearTimeout(n.current),[]);let b=(0,f4.useRef)(!1),y=()=>{b.current=!0},v=()=>{b.current=!1},A=""===o?g.format("Empty"):(o||`${r}`).replace("-","−");(0,f4.useEffect)(()=>{b.current&&(yI&&yI.clear("assertive"),yN(A,"assertive"))},[A]);let $=yf(e=>{clearTimeout(n.current),null==u||u(),n.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r<a)&&$(60)},e)}),w=yf(e=>{clearTimeout(n.current),null==d||d(),n.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r>i)&&w(60)},e)}),k=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=_y();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":A,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(p){e.preventDefault(),null==p||p();break}case"ArrowUp":case"Up":u&&(e.preventDefault(),null==u||u());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:y,onBlur:v},incrementButtonProps:{onPressStart:()=>{$(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(n.current),C()},onFocus:y,onBlur:v},decrementButtonProps:{onPressStart:()=>{w(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(n.current),C()},onFocus:y,onBlur:v}}}x8={"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 x9=n(7120);function Ce(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let o=t.toString().split("."),i=n.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),n=Math.round(n*a),r=("+"===e?t+n:t-n)/a}return r}let Ct=(0,f4.createContext)(null),Cn=(0,f4.createContext)(null),Cr=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,Ct);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",{locale:a}=vy(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:u}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===r||isNaN(r)?kh(i,t,n):kg(i,t,n,r)),isNaN(a)||(a=void 0===r||isNaN(r)?kh(a,t,n):kg(a,t,n,r));let[p,d]=$L(i,isNaN(a)?NaN:a,s),[f,h]=(0,f4.useState)(()=>isNaN(p)?"":new(0,x5.K)(l,o).format(p)),m=(0,f4.useMemo)(()=>new(0,x9.d)(l,o),[l,o]),g=(0,f4.useMemo)(()=>m.getNumberingSystem(f),[m,f]),b=(0,f4.useMemo)(()=>new(0,x5.K)(l,{...o,numberingSystem:g}),[l,o,g]),y=(0,f4.useMemo)(()=>b.resolvedOptions(),[b]),v=(0,f4.useCallback)(e=>isNaN(e)||null===e?"":b.format(e),[b]),A=wB({...e,value:p}),$=void 0===r||isNaN(r)?1:r;"percent"===y.style&&(void 0===r||isNaN(r))&&($=.01);let[w,k]=(0,f4.useState)(p),[x,C]=(0,f4.useState)(l),[E,S]=(0,f4.useState)(o);Object.is(p,w)&&l===x&&o===E||(h(v(p)),k(p),C(l),S(o));let D=(0,f4.useMemo)(()=>m.parse(f),[m,f]),M=(e,r=0)=>{if(isNaN(D))return kg(isNaN(r)?0:r,t,n,$);{let r=kg(D,t,n,$);return"+"===e&&r>D||"-"===e&&r<D?r:kg(Ce(e,D,$),t,n,$)}},z=(0,f4.useMemo)(()=>!c&&!u&&(isNaN(D)||void 0===n||isNaN(n)||kg(D,t,n,$)>D||Ce("+",D,$)<=n),[c,u,t,n,$,D]),O=(0,f4.useMemo)(()=>!c&&!u&&(isNaN(D)||void 0===t||isNaN(t)||kg(D,t,n,$)<D||Ce("-",D,$)>=t),[c,u,t,n,$,D]);return{...A,validate:e=>m.isValidPartialNumber(e,t,n),increment:()=>{let e=M("+",t);e===p&&h(v(e)),d(e),A.commitValidation()},incrementToMax:()=>{null!=n&&(d(kg(n,t,n,$)),A.commitValidation())},decrement:()=>{let e=M("-",n);e===p&&h(v(e)),d(e),A.commitValidation()},decrementToMin:()=>{null!=t&&(d(t),A.commitValidation())},canIncrement:z,canDecrement:O,minValue:t,maxValue:n,numberValue:D,setNumberValue:d,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),h(void 0===i?"":v(p));return}isNaN(D)?h(v(p)):(e=void 0===r||isNaN(r)?kh(D,t,n):kg(D,t,n,r),d(e=m.parse(v(e))),h(v(void 0===i?e:p)))}}}({...e,locale:a,validationBehavior:i}),l=(0,f4.useRef)(null),[c,u]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:p,groupProps:d,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:g,errorMessageProps:b,...y}=function(e,t,n){var r,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:u,isRequired:p,minValue:d,maxValue:f,autoFocus:h,label:m,formatOptions:g,onBlur:b=()=>{},onFocus:y,onFocusChange:v,onKeyDown:A,onKeyUp:$,description:w,errorMessage:k,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:M,numberValue:z,inputValue:O,commit:P,commitValidation:T}=t,B=AS((o=x3)&&o.__esModule?o.default:o,"@react-aria/numberfield"),j=yx(a),{focusProps:I}=_X({onBlur(){P()}}),N=x6(g),R=(0,f4.useMemo)(()=>N.resolvedOptions(),[N]),F=x6({...g,currencySign:void 0}),L=(0,f4.useMemo)(()=>isNaN(z)?"":F.format(z),[F,z]),{spinButtonProps:W,incrementButtonProps:G,decrementButtonProps:V}=x7({isDisabled:c,isReadOnly:u,isRequired:p,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:M,value:z,textValue:L}),[U,q]=(0,f4.useState)(!1),{focusWithinProps:H}=_2({isDisabled:c,onFocusWithinChange:q});!function(e,t){let{onScroll:n,isDisabled:r}=e,o=(0,f4.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);AK(t,"wheel",r?void 0:o)}({onScroll:(0,f4.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?E():e.deltaY<0&&D())},[D,E]),isDisabled:x||c||u||!U},n);let K=(null!=(r=R.maximumFractionDigits)?r:0)>0,Y=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,J="numeric";y7()?Y?J="text":K&&(J="decimal"):_r()&&(Y?J="numeric":K&&(J="decimal"));let Z=yV(e),X=(0,f4.useCallback)(e=>{"Enter"===e.key?(P(),T()):e.continuePropagation()},[P,T]),{isInvalid:Q,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:en,inputProps:er,descriptionProps:eo,errorMessageProps:ei}=function(e,t,n){let r=yf(e=>{let r=n.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,f4.useEffect)(()=>{if(!x4()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n,r]);let o=x4()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...c}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,c]=$L(e.value,e.defaultValue||"",e.onChange),{focusableProps:u}=_1(e,t),p=wB({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:h}=p.displayValidation,{labelProps:m,fieldProps:g,descriptionProps:b,errorMessageProps:y}=ww({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=yV(e,{labelable:!0}),A={type:a,pattern:e.pattern};return w$(t,l,c),wk(e,p,t),(0,f4.useEffect)(()=>{if(t.current instanceof yZ(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:yS(v,"input"===n?A:void 0,{disabled:r,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":d||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>c(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(f5().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,...u,...g}),descriptionProps:b,errorMessageProps:y,isInvalid:d,validationErrors:f,validationDetails:h}}(e,n),u=(0,f4.useRef)(null);return{inputProps:yS(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=u.current;n.current.value=e,n.current.setSelectionRange(r,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...c}}({...C,...Z,name:void 0,label:m,autoFocus:h,isDisabled:c,isReadOnly:u,isRequired:p,validate:void 0,[wT]:t,value:O,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:j,type:"text",inputMode:J,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:b,onFocus:y,onFocusChange:v,onKeyDown:(0,f4.useMemo)(()=>yp(X,A),[X,A]),onKeyUp:$,description:w,errorMessage:k},t,n);w$(n,t.numberValue,t.setNumberValue);let ea=yS(W,I,er,{role:null,"aria-roledescription":_e()?null:B.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!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?en.id:e["aria-labelledby"]);let ec=yx(),eu=yx(),ep=yS(G,{"aria-label":l||B.format("increase",{fieldLabel:el}).trim(),id:i&&!l?ec:null,"aria-labelledby":i&&!l?`${ec} ${i}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ed=yS(V,{"aria-label":s||B.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?eu:null,"aria-labelledby":i&&!s?`${eu} ${i}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...H,role:"group","aria-disabled":c,"aria-invalid":Q?"true":void 0},labelProps:en,inputProps:ea,incrementButtonProps:ep,decrementButtonProps:ed,errorMessageProps:ei,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:et}}({...yB(e),label:u,validationBehavior:i},s,l),v=yz({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),A=yV(e);return delete A.id,f5().createElement(yM,{values:[[Cn,s],[$5,d],[$8,{...f,ref:l}],[kc,{...p,ref:c}],[vn,{slots:{increment:h,decrement:m}}],[vi,{slots:{description:g,errorMessage:b}}],[ki,y]]},f5().createElement("div",{...A,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":y.isInvalid||void 0}),e.name&&f5().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function Co(e,t){return Number.parseInt(xL(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let Ci=(0,f4.forwardRef)(function(e,t){let{className:n}=e,r=(0,f4.useContext)($Y),o=(0,f4.useContext)($J),i=r??o,a=(0,f4.useContext)(x0),s=Af(),l=xL(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),c=Co(i.visibleRange.start.toDate(s),a),u=i.maxValue?Co(i.maxValue.toDate(s),a):void 0,p=i.minValue?Co(i.minValue.toDate(s),a):void 0,d=(0,f4.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,mX.jsxs)("span",{ref:t,className:n,children:[(0,mX.jsx)("span",{children:l}),(0,mX.jsxs)(Cr,{formatOptions:{useGrouping:!1},maxValue:u,minValue:p,onChange:d,value:c,children:[(0,mX.jsx)($7,{}),(0,mX.jsxs)($6,{children:[(0,mX.jsx)(vr,{slot:"increment",children:(0,mX.jsx)(gK,{size:8})}),(0,mX.jsx)(vr,{slot:"decrement",children:(0,mX.jsx)(gU,{size:8})})]})]})]})});var Ca=n(4782),Cs={};Cs.styleTagTransform=gn(),Cs.setAttributes=m7(),Cs.insert=m6().bind(null,"head"),Cs.domAPI=m4(),Cs.insertStyleElement=ge(),m2()(Ca.A,Cs);let Cl=Ca.A&&Ca.A.locals?Ca.A.locals:void 0;function Cc({children:e}){let t=(0,f4.useContext)(k0),n=(0,f4.useContext)(k1),r=t??n,o=m$(()=>r?.close());return(0,mX.jsx)(ko,{className:Cl.dialog,ref:o,children:e})}let Cu=(0,f4.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},o){let i="range"===e;return(0,mX.jsx)(kY,{ref:o,className:Cl.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,mX.jsx)(Cc,{children:(0,mX.jsxs)(i?$X:$Z,{...i?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,mX.jsxs)("header",{className:Cl.header,children:[(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,Cl.flatButtonMd),slot:"previous",children:(0,mX.jsx)(g1,{size:16})}),(0,mX.jsx)(Ci,{className:Cl.monthYear}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,Cl.flatButtonMd),slot:"next",children:(0,mX.jsx)(g2,{size:16})})]}),(0,mX.jsx)($0,{className:Cl.calendarGrid,children:e=>(0,mX.jsx)($4,{className:m0()("cds--date-picker__day",{[Cl.today]:0===t.compare(e)}),date:e},e.toString())})]})})})}),Cp=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(k0),[r,o]=yP({slot:e.slot},t,w2),{locale:i}=vy(),a=w0({...r,locale:i,createCalendar:$P}),s=(0,f4.useRef)(null),{fieldProps:l,inputProps:c}=wS({...r,inputRef:s},a,o),u=(0,f4.useCallback)(()=>{a.isDisabled||n.toggle()},[]);return(0,mX.jsxs)(yM,{values:[[w3,a],[$8,{...c,ref:s}],[$5,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,mX.jsx)($6,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:u,children:a.segments.map((t,n)=>(0,f4.cloneElement)(e.children(t),{key:n}))}),(0,mX.jsx)($7,{})]})}),Cd=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(k0),r=(0,f4.useContext)(k1);return(n??r).isInvalid?(0,mX.jsx)(b8,{ref:t,size:16,...e}):(0,mX.jsx)(gV,{ref:t,size:16,...e})});class Cf{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let Ch=new Map,Cm=(0,f4.forwardRef)(function({segment:e,...t},n){let r=(0,f4.useContext)(w3),o=yu(n),{segmentProps:i}=function(e,t,n){let r,o,i,a,s=(0,f4.useRef)(""),{locale:l,direction:c}=vy(),u=function(){var e;let{locale:t}=vy(),n=AE((e=$9)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,f4.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Cf(t,n)}},[t,n])}(),{ariaLabel:p,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:h}=wx.get(t),m=e.isPlaceholder?"":e.text,g=(0,f4.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),b=Aj({month:"long",timeZone:g.timeZone}),y=Aj({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=y.format(t.dateValue));else{let e=b.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=x7({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)}}),A=(0,f4.useMemo)(()=>new(0,x9.d)(l,{maximumFractionDigits:0}),[l]),$=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!A.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=A.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:w}=(r=function(e){let{locale:t}=vy(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Ch.has(n))return Ch.get(n);let r=new Intl.Collator(t,e);return Ch.set(n,r),r}({usage:"search",sensitivity:"base"}),o=(0,f4.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),i=(0,f4.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),a=(0,f4.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,o=(t=t.normalize("NFC")).length;for(;n+o<=e.length;n++){let i=e.slice(n,n+o);if(0===r.compare(t,i))return!0}return!1},[r]),(0,f4.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),k=Aj({hour:"numeric",hour12:!0}),x=(0,f4.useMemo)(()=>{let e=new Date;return e.setHours(0),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),C=(0,f4.useMemo)(()=>{let e=new Date;return e.setHours(12),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),E=Aj({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,f4.useMemo)(()=>{if("era"!==e.type)return[];let n=At(new vK(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:E.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[E,t.calendar,e.type]),D=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(w(x,n))t.setSegment("dayPeriod",0);else if(w(C,n))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=S.find(e=>w(e.formatted,n));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!A.isValidPartialNumber(r))return;let o=A.parse(r),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=A.parse(n));break;case"h12":a=!1,o>12&&(i=A.parse(n))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=A.parse(n));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=r}}};AK((0,f4.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=n.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(n.current)});let M=(0,f4.useRef)("");AK(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":A.isValidPartialNumber(e.text)&&!t.isReadOnly&&$();break;case"insertCompositionText":M.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&D(r.data)}}),AK(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=M.current),null!=r&&(w(x,r)||w(C,r))&&D(r))}),yd(()=>{let e=n.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[n,h]);let z=_e()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,f4.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let O=yx(),P=!t.isDisabled&&!t.isReadOnly&&e.isEditable,T="literal"===e.type?"":u.of(e.type),B=AV({"aria-label":`${T}${p?`, ${p}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let j={caretColor:"transparent"};if("rtl"===c){j.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(j.direction="ltr")}return{segmentProps:yS(v,B,{id:O,...z,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:P,suppressContentEditableWarning:P,spellCheck:P?"false":void 0,autoCorrect:P?"off":void 0,[parseInt(f5().version,10)>=17?"enterKeyHint":"enterkeyhint"]:P?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!P?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(y8()?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(),$()}},onFocus:()=>{s.current="",n.current&&A0(n.current,{containingElement:A1(n.current)});let e=window.getSelection();null==e||e.collapse(n.current)},style:j,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:a,isFocused:s,isFocusVisible:l}=_3(),{hoverProps:c,isHovered:u}=_7({...t,isDisabled:r.isDisabled||"literal"===e.type}),p=function(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,f4.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:e??o,style:l||a?{...a,...l}:void 0,children:c??i,"data-rac":""}},[t,n,r,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:u,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,f4.useCallback)(e=>{e.stopPropagation()},[]);return(0,mX.jsx)("span",{...yS(yV(t),i,a,c),...p,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":u||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:d})}),Cg={short:!1,size:"md"},Cb=(0,f4.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:c,light:u,maxDate:p,minDate:d,onChange:f,onChangeRaw:h,short:m,size:g,value:b,...y}={...Cg,...e},{calendar:v,intlLocale:A,today_:$}=x1(),w=(0,f4.useId)(),k=!!(c??l),x=(0,f4.useMemo)(()=>k5(r,v),[r,v]),C=(0,f4.useMemo)(()=>k5(b,v,!0),[b,v]),E=(0,f4.useMemo)(()=>k5(p,v),[p,v]),S=(0,f4.useMemo)(()=>k5(d??x2,v),[d,v]),D=(0,f4.useMemo)(()=>i||s,[i,s]),M=(0,f4.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(k6(e)))),[h,f]);return(0,mX.jsx)(k4,{locale:A.toString(),children:(0,mX.jsx)("div",{className:m0()("cds--form-item",n),children:(0,mX.jsx)(yM,{values:[[x0,A]],children:(0,mX.jsxs)(k2,{className:m0()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":u}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===A.language||void 0,...y,onChange:M,children:[(0,mX.jsxs)("div",{className:"cds--date-picker-container",children:[k&&(0,mX.jsx)(ku,{className:m0()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:c??l}),(0,mX.jsxs)($6,{className:Cl.inputGroup,children:[(0,mX.jsx)(Cp,{id:k?w:void 0,ref:t,className:m0()("cds--date-picker-input__wrapper",Cl.inputWrapper,{[Cl.inputWrapperSm]:"sm"===g,[Cl.inputWrapperMd]:"md"===g||!g||0===g.length,[Cl.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e}):(0,mX.jsx)(f5().Fragment,{})}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,{[Cl.flatButtonSm]:"sm"===g,[Cl.flatButtonMd]:"md"===g||!g||0===g.length,[Cl.flatButtonLg]:"lg"===g}),children:(0,mX.jsx)(Cd,{})})]}),(0,mX.jsx)(ka,{className:Cl.invalidText,children:a})]}),(0,mX.jsx)(Cu,{variant:"single",today_:$})]})})})})}),Cy=(0,f4.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:c,minDate:u,onChange:p,onChangeRaw:d,size:f="md",value:h,...m},g){let{calendar:b,intlLocale:y,today_:v}=x1(),A=(0,f4.useId)(),$=!!(s??a),w=(0,f4.useMemo)(()=>{if(h)return{start:k5(h[0],b,!1),end:k5(h[1],b,!1)}},[h,b]),k=(0,f4.useMemo)(()=>{if(t)return{start:k5(t[0],b,!1),end:k5(t[1],b,!1)}},[t,b]),x=(0,f4.useMemo)(()=>k5(u??x2,b,!0),[u,b]),C=(0,f4.useMemo)(()=>k5(c,b,!0),[c,b]),E=(0,f4.useMemo)(()=>n||i,[n,i]),S=(0,f4.useMemo)(()=>(d&&p&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),d??(e=>p?.([k6(e.start),k6(e.end)]))),[d,p]);return(0,mX.jsx)(k4,{locale:y.toString(),children:(0,mX.jsx)("div",{className:m0()("cds--form-item",e),children:(0,mX.jsx)(yM,{values:[[x0,y]],children:(0,mX.jsx)(k3,{id:$?A:void 0,className:m0()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:E,shouldForceLeadingZeros:"en"===y.language||void 0,maxValue:C,minValue:x,value:w,defaultValue:k,ref:g,isDisabled:o,...m,onChange:S,children:(0,mX.jsxs)("div",{className:"cds--date-picker-container",children:[$&&(0,mX.jsx)(ku,{className:m0()("cds--label",{"cds--label--disabled":o}),htmlFor:A,children:s??a}),(0,mX.jsxs)($6,{className:Cl.inputGroup,children:[(0,mX.jsxs)("div",{className:m0()(Cl.inputsWrapper,{[Cl.inputsWrapperSm]:"sm"===f,[Cl.inputsWrapperMd]:"md"===f||!f||0===f.length,[Cl.inputsWrapperLg]:"lg"===f}),children:[(0,mX.jsx)(w5,{className:m0()("cds--date-picker-input__wrapper",Cl.startInput,Cl.dateInputWrapper),slot:"start",children:e=>(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e})}),(0,mX.jsx)("div",{className:Cl.separator,children:(0,mX.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,mX.jsx)(w5,{className:m0()("cds--date-picker-input__wrapper",Cl.endInput,Cl.dateInputWrapper),slot:"end",children:e=>(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e})})]}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,{[Cl.flatButtonSm]:"sm"===f,[Cl.flatButtonMd]:"md"===f||!f||0===f.length,[Cl.flatButtonLg]:"lg"===f}),children:(0,mX.jsx)(Cd,{})})]}),(0,mX.jsx)(ka,{className:Cl.invalidText,children:r}),(0,mX.jsx)(Cu,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var C_=n(9124),Cv={};Cv.styleTagTransform=gn(),Cv.setAttributes=m7(),Cv.insert=m6().bind(null,"head"),Cv.domAPI=m4(),Cv.insertStyleElement=ge(),m2()(C_.A,Cv);let CA=C_.A&&C_.A.locals?C_.A.locals:void 0,C$=({diagnoses:e})=>{let{diagnosisTags:t}=hZ({externalModuleName:"@openmrs/esm-styleguide"});return(0,mX.jsx)("div",{className:CA.container,children:e.map(e=>{let{rank:n,uuid:r,display:o}=e,i=t[1===n?"primaryColor":"secondaryColor"];return(0,mX.jsx)(gu.vwO,{type:i,children:o},r)})})};var Cw=n(7770),Ck={};Ck.styleTagTransform=gn(),Ck.setAttributes=m7(),Ck.insert=m6().bind(null,"head"),Ck.domAPI=m4(),Ck.insertStyleElement=ge(),m2()(Cw.A,Ck);let Cx=Cw.A&&Cw.A.locals?Cw.A.locals:void 0,CC=({width:e="64",height:t="64"})=>(0,mX.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,mX.jsx)("use",{href:"#omrs-empty-data-illustration"})}),CE=e=>{let t="tablet"===mb(),n=e.launchForm;return(0,mX.jsx)(gu.Wdr,{className:Cx.layer,children:(0,mX.jsxs)(gu.FAs,{className:Cx.tile,children:[(0,mX.jsx)("div",{className:t?Cx.tabletHeading:Cx.desktopHeading,children:(0,mX.jsx)("h4",{children:e.headerTitle})}),(0,mX.jsx)(CC,{}),(0,mX.jsx)("p",{className:Cx.content,children:sv("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,mX.jsx)("p",{className:Cx.action,children:n&&(0,mX.jsx)(gu.$nd,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:sv("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var CS=n(6099),CD={};CD.styleTagTransform=gn(),CD.setAttributes=m7(),CD.insert=m6().bind(null,"head"),CD.domAPI=m4(),CD.insertStyleElement=ge(),m2()(CS.A,CD);let CM=CS.A&&CS.A.locals?CS.A.locals:void 0,Cz=({error:e,headerTitle:t})=>{let n="tablet"===mb();return(0,mX.jsx)(gu.Wdr,{children:(0,mX.jsxs)(gu.FAs,{className:CM.tile,children:[(0,mX.jsx)("div",{className:n?CM.tabletHeading:CM.desktopHeading,children:(0,mX.jsx)("h4",{children:t})}),(0,mX.jsxs)("p",{className:CM.errorMessage,children:[sv("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,mX.jsx)("p",{className:CM.errorCopy,children:sv("errorCopy")})]})})},CO=Cz;var CP=n(5764),CT={};CT.styleTagTransform=gn(),CT.setAttributes=m7(),CT.insert=m6().bind(null,"head"),CT.domAPI=m4(),CT.insertStyleElement=ge(),m2()(CP.A,CT);let CB=CP.A&&CP.A.locals?CP.A.locals:void 0,Cj=f5().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:o,state:i}=mv(),a=window.location??{pathname:""},s=hi(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,mX.jsxs)(gu.f8J,{"aria-label":sv("leftNavigation","Left navigation"),className:CB.leftNav,expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,mX.jsx)(hl,{name:"global-nav-menu-slot"}),n?(0,mX.jsx)(hW,{value:o,fallback:(0,mX.jsx)(hl,{name:n,state:{basePath:r,currentPath:a,...i}}),children:(0,mX.jsx)(f6.Provider,{value:o,children:(0,mX.jsx)(hl,{name:n,state:{basePath:r,currentPath:a,...i}})})}):null]}):null});var CI=n(8500),CN={};CN.styleTagTransform=gn(),CN.setAttributes=m7(),CN.insert=m6().bind(null,"head"),CN.domAPI=m4(),CN.insertStyleElement=ge(),m2()(CI.A,CN);let CR=CI.A&&CI.A.locals?CI.A.locals:void 0,CF=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:o})=>{let[i,a]=(0,f4.useState)(""),s=(0,f4.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:o}=(0,h1.A)(t,ar,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,f4.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&o}),[n,o,r,t])}(t),{locations:c,isLoading:u,hasMore:p,loadingNewData:d,error:f,setPage:h}=function(e,t=0,n=""){let r=h0(n),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=mc(function(n,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=`${ae}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),n&&a.append("_getpagesoffset",""+n*t),e&&a.append("_tag",e),"string"==typeof r&&""!==r&&a.append("name:contains",r),i+a.toString()},ar);return(0,f4.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])}(n,r,i),m=(0,f4.useMemo)(()=>l&&!i&&t?[l,...c.filter(({resource:e})=>e.id!==t)]:c??[],[l,c,t,i]),g=(0,f4.useCallback)(e=>{o(),a(e.trim())},[o]),b=mw((0,f4.useCallback)(()=>{!d&&p&&h(e=>e+1)},[d,p,h])),y=p?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)(gu.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:sv("searchForLocation"),id:s,placeholder:sv("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,mX.jsx)("div",{className:CR.errorNotification,id:`${s}-error`,children:(0,mX.jsx)(gu.jeF,{kind:"error",subtitle:sv("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:sv("error","Error")})}),(0,mX.jsx)("div",{className:CR.searchResults,children:u?(0,mX.jsx)("div",{className:CR.loadingContainer,children:Array.from({length:5}).map((e,t)=>(0,mX.jsx)(gu.Psq,{className:CR.radioButtonSkeleton,role:"progressbar"},t))}):(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("div",{className:CR.locationResultsContainer,children:m.length>0?(0,mX.jsx)(gu.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,mX.jsx)(gu.aaP,{className:CR.locationRadioButton,id:e.resource.id,labelText:(0,mX.jsx)("span",{ref:t===y?b:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,mX.jsx)("div",{className:CR.emptyState,children:(0,mX.jsx)("p",{className:CR.locationNotFound,children:sv("noResultsToDisplay")})})}),d&&(0,mX.jsx)("div",{className:CR.loadingIcon,children:(0,mX.jsx)(gu.OuH,{description:sv("loading")})})]})})]})},CL=V("modalState",{modalContainer:null,modalStack:[]}),CW=0;async function CG(e,t,n={}){let r=fL(t),o=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=r,a=await i(),s=CW++;o=o9({...a,name:`${t}-${s}`},{...n,domElement:e})}else T(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}let CV=window.getComputedStyle(document.body).overflow;function CU({modalStack:e,modalContainer:t}){t&&(e.length?(t.style.visibility||(addEventListener("keydown",CH),document.body.style.overflow="hidden",t.style.visibility="unset"),e.forEach((n,r)=>{switch(n.state){case"NEW":{let e=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:n.props?.size??"md"});n.container=e,CG(e,n.modalName,n.props).then(r=>{n.parcel=r,n.state="MOUNTED",t.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":n.container&&(n.container.style.visibility=r?"hidden":"unset");break;case"TO_BE_DELETED":n.onClose(),n.parcel?.unmount?.(),n.container?.remove(),setTimeout(()=>{CL.setState({modalContainer:t,modalStack:e.filter(e=>e!==n)})},0)}})):(t.style.removeProperty("visibility"),document.body.style.overflow=CV,removeEventListener("keydown",CH)))}function Cq(e){let t=CL.getState(),n=t.modalStack.map(t=>t===e?{...t,state:"TO_BE_DELETED"}:t);CL.setState({...t,modalStack:n})}function CH(e){"Escape"===e.key&&function(){let[e]=CL.getState().modalStack;e&&Cq(e)}()}function CK(e){CL.subscribe(CU),CL.setState({...CL.getState(),modalContainer:e})}function CY(e,t={},n=()=>{}){let r=()=>{let e=CL.getState().modalStack.find(e=>e.onClose===n);e&&Cq(e)};if(fL(e)){var o;let i,a;o={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},a=[o,...(i=CL.getState()).modalStack],CL.setState({...i,modalStack:a})}else T(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let CJ=({notification:e})=>{let{description:t,action:n,kind:r,critical:o,title:i,onAction:a}=e;return(0,mX.jsx)(gu.kZS,{actionButtonLabel:n,kind:r||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},CZ=({subject:e})=>{let[t,n]=(0,f4.useState)([]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(CJ,{notification:e},e.id))})},CX=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...c}=e,[u,p]=(0,f4.useState)(t);return(0,mX.jsx)(gu.kZS,{kind:o||"info",actionButtonLabel:u,ariaLabel:sv("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&p(s)},statusIconDescription:sv("actionableNotification","Actionable notification"),subtitle:r,title:i,lowContrast:a,inline:!0,...c})},CQ=({subject:e})=>{let[t,n]=(0,f4.useState)([]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(CX,{notification:e},e.id))})};var C0=Object.prototype.hasOwnProperty;let C1=function(e){if(null==e)return!0;if(tk(e)&&(t$(e)||"string"==typeof e||"function"==typeof e.splice||tS(e)||tI(e)||tA(e)))return!e.length;var t=nj(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tm(e))return!ng(e).length;for(var n in e)if(C0.call(e,n))return!1;return!0},C2=new dx,C3=0,C4=new dx,C5=0;function C6(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(CZ,{subject:C2}))}function C8(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!C1(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{C2.next({...e,id:C3++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function C7(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(CQ,{subject:C4}))}function C9(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!C1(t))?setTimeout(()=>{C4.next({...e,id:C5++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Ee=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Et=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var En=n(4112),Er={};Er.styleTagTransform=gn(),Er.setAttributes=m7(),Er.insert=m6().bind(null,"head"),Er.domAPI=m4(),Er.insertStyleElement=ge(),m2()(En.A,Er);let Eo=En.A&&En.A.locals?En.A.locals:void 0,Ei=({value:e,unit:t,label:n,interpretation:r,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,f4.useId)(),{referenceRange:c,isLoading:u}=function(e,t){let n=null;e&&(n=t?`${i9}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i9}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:i}=(0,h1.A)(n,ar),a=r?.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||r?void 0:i,s),p=o??c,d=(0,f4.useMemo)(()=>{if(r)return r?"--"===r?"normal":Ee.includes(r)?r.toLowerCase():Et.includes(r)?r:"normal":void 0;if(p&&!u){if(!p||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==p.hiAbsolute&&void 0!==p.hiAbsolute&&t>p.hiAbsolute?"off_scale_high":null!==p.hiCritical&&void 0!==p.hiCritical&&t>=p.hiCritical?"critically_high":null!==p.hiNormal&&void 0!==p.hiNormal&&t>p.hiNormal?"high":null!==p.lowAbsolute&&void 0!==p.lowAbsolute&&t<p.lowAbsolute?"off_scale_low":null!==p.lowCritical&&void 0!==p.lowCritical&&t<=p.lowCritical?"critically_low":null!==p.lowNormal&&void 0!==p.lowNormal&&t<p.lowNormal?"low":"normal"}return"normal"},[r,p,e,u])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,h="normal"!==d,m=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,y=null!=e&&""!==e,v=y?e:sv("notAvailable","Not available"),A=m0()({[Eo["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[Eo["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[Eo.low]:"low"===d,[Eo.high]:"high"===d,[Eo["off-scale-low"]]:"off_scale_low"===d,[Eo["off-scale-high"]]:"off_scale_high"===d}),$=m0()({[Eo.container]:!0,[Eo.card]:!0,[Eo["critical-value"]]:f,[Eo["abnormal-value"]]:h&&!f}),w=m0()({[Eo.cell]:!0,[A]:!0});return"cell"===a?(0,mX.jsxs)("div",{className:w,children:[v,y&&t?` ${t}`:""]}):(0,mX.jsxs)("section",{className:$,"data-testid":"numeric-observation-card",children:[n&&(0,mX.jsxs)("div",{className:Eo["label-container"],children:[(0,mX.jsx)("span",{id:m,className:Eo.label,children:n}),h&&(0,mX.jsx)("span",{className:Eo[d.replace("_","-")],title:sv("abnormalValue","Abnormal value")})]}),(0,mX.jsxs)("div",{className:Eo["value-container"],children:[(0,mX.jsx)("span",{id:g,"aria-labelledby":m&&b?`${m} ${b}`:m||b||void 0,className:Eo.value,children:v}),y&&t&&(0,mX.jsx)("span",{id:b,className:Eo.units,children:t})]})]})};var Ea=n(292),Es={};Es.styleTagTransform=gn(),Es.setAttributes=m7(),Es.insert=m6().bind(null,"head"),Es.domAPI=m4(),Es.insertStyleElement=ge(),m2()(Ea.A,Es);let El=Ea.A&&Ea.A.locals?Ea.A.locals:void 0,Ec=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,mX.jsx)("div",{className:m0()(El.pageHeader,n),...r,children:t})}{let{title:t,illustration:n,className:r,...o}=e;return(0,mX.jsx)("div",{className:m0()(El.pageHeader,r),...o,children:(0,mX.jsx)(Eu,{title:t,illustration:n})})}},Eu=({title:e,illustration:t,className:n})=>{let[r,o]=(0,f4.useState)(null);return(0,f4.useEffect)(()=>{r1("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,mX.jsxs)("div",{className:m0()(El.pageHeaderContent,n),children:[t,(0,mX.jsxs)("div",{className:El.pageLabels,children:[r?.implementationName&&(0,mX.jsx)("p",{children:sv(r.implementationName)}),(0,mX.jsx)("p",{className:El.pageName,children:e})]})]})};var Ep=n(2886),Ed={};Ed.styleTagTransform=gn(),Ed.setAttributes=m7(),Ed.insert=m6().bind(null,"head"),Ed.domAPI=m4(),Ed.insertStyleElement=ge(),m2()(Ep.A,Ed);let Ef=Ep.A&&Ep.A.locals?Ep.A.locals:void 0,Eh=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=mC(t,e,r,i),c="tablet"===mb(),u=sv("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,mX.jsx)(mX.Fragment,{children:e>0&&(0,mX.jsxs)("div",{className:m0()({[Ef.tablet]:c,[Ef.desktop]:!c}),children:[(0,mX.jsxs)("div",{children:[u,o&&(0,mX.jsx)(f8,{to:o,className:Ef.configurableLink,children:a??sv("seeAll","See all")})]}),(0,mX.jsx)(gu.dKS,{className:Ef.pagination,page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>sv("paginationOfPages","of {{count}} pages",{count:t}),size:c?"lg":"sm"})]})})};function Em(e){return Eb(E_(e,"usual","official"))}function Eg(e){return Em(e)}function Eb(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function Ey(e){return Eb(e)}function E_(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function Ev(e,t=mP()){let n=mP(t),r=xH(e,n);if(null==r)return null;let o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),c={};if(o<2)c.minutes=n.diff(r,"minutes");else if(i<2)c.hours=o;else if(a<4)c.days=i;else if(l<1){let e=n.subtract(a,"weeks").diff(r,"days");c.weeks=a,c.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");c.months=s,c.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");c.years=l,c.months=e}else c.years=l;return c}function EA(e,t=mP()){let n=Ev(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),xq(n,r)}var E$=n(6010),Ew={};Ew.styleTagTransform=gn(),Ew.setAttributes=m7(),Ew.insert=m6().bind(null,"head"),Ew.domAPI=m4(),Ew.insertStyleElement=ge(),m2()(E$.A,Ew);let Ek=E$.A&&E$.A.locals?E$.A.locals:void 0;function Ex({showIdentifierLabel:e,type:t,value:n}){return(0,mX.jsx)("span",{className:Ek.primaryIdentifier,children:(0,mX.jsxs)(gu.vwO,{className:Ek.tag,type:"gray",children:[e&&t?.text&&(0,mX.jsxs)("span",{className:Ek.label,children:[t.text,": "]}),(0,mX.jsx)("span",{className:Ek.value,children:n})]})})}function EC({showIdentifierLabel:e,type:t,value:n}){return(0,mX.jsxs)(gu.lRv,{className:Ek.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,mX.jsxs)("span",{className:Ek.label,children:[t?.text,": "]}),(0,mX.jsx)("span",{className:Ek.value,children:n})]})}function EE({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=hZ(),{primaryIdentifierCode:r}=mD(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,mX.jsx)(mX.Fragment,{children:o?.length?o.map(({value:e,type:n},i)=>(0,mX.jsxs)(f5().Fragment,{children:[(0,mX.jsx)("span",{className:Ek.identifier,children:n?.coding?.[0]?.code===r?(0,mX.jsx)(Ex,{showIdentifierLabel:t,type:n,value:e}):(0,mX.jsx)(EC,{showIdentifierLabel:t,type:n,value:e})}),i<o.length-1&&(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"})]},e)):""})}let ES={Female:bo,Male:bi,Other:ba,Unknown:bs},ED=({gender:e})=>{let t=ES[e];return t?(0,mX.jsx)(t,{fill:"#525252"}):null},EM={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Ez({patient:e,renderedFrom:t}){var n;let r,o,i=Em(e),a=e?.gender&&(o=EM[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:sv(r,n),iconKey:o}),s=(0,f4.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,mX.jsxs)("div",{className:Ek.patientInfo,children:[(0,mX.jsx)("div",{className:m0()(Ek.row,Ek.patientNameRow),children:(0,mX.jsxs)("div",{className:Ek.flexRow,children:[(0,mX.jsx)("span",{className:Ek.patientName,children:i}),a&&(0,mX.jsxs)("div",{className:Ek.gender,children:[(0,mX.jsx)(ED,{gender:a.iconKey}),(0,mX.jsx)("span",{children:a.displayText})]}),(0,mX.jsx)(hl,{className:Ek.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,mX.jsxs)("div",{className:Ek.demographics,children:[e.birthDate&&(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("span",{children:EA(e.birthDate)}),(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"}),(0,mX.jsx)("span",{children:xF(e.birthDate,{time:!1})}),(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"})]}),(0,mX.jsx)(EE,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,mX.jsx)(hl,{className:Ek.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var EO=n(1673),EP=n(9102),ET={};ET.styleTagTransform=gn(),ET.setAttributes=m7(),ET.insert=m6().bind(null,"head"),ET.domAPI=m4(),ET.insertStyleElement=ge(),m2()(EP.A,ET);let EB=EP.A&&EP.A.locals?EP.A.locals:void 0;function Ej({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[o,i]=(0,f4.useState)(!1),{extensions:a}=ha(n),s="tablet"===mb(),l=m$(()=>i(!1),o),c=(0,f4.useRef)(null),u=(0,f4.useRef)(null),p=(0,f4.useId)(),d=`patient-actions-menu-trigger-${p}`,f=`patient-actions-menu-${p}`,h=(0,f4.useCallback)(()=>i(e=>!e),[]),m=(0,f4.useCallback)(()=>{i(!1),c.current?.focus()},[]),g=(0,f4.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=u.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,f4.useEffect)(()=>{if(o&&u.current){let e=u.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let b=(0,f4.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...r}),[t,e,m,r]);return 0===a.length?null:(0,mX.jsx)("div",{className:EB.overflowMenuContainer,children:(0,mX.jsxs)("div",{"data-overflow-menu":!0,className:m0()("cds--overflow-menu",gm.container),ref:l,children:[(0,mX.jsxs)("button",{className:m0()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},gm.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:h,onKeyDown:g,ref:c,children:[(0,mX.jsx)("span",{className:EB.actionsButtonText,children:sv("actions","Actions")})," ",(0,mX.jsx)(EO.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,mX.jsxs)("div",{className:m0()("cds--overflow-menu-options","cds--overflow-menu--flip",gm.menu,{[gm.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:u,role:"menu",tabIndex:-1,children:[(0,mX.jsx)("ul",{className:m0()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,mX.jsx)(hl,{name:n,state:b},n)}),(0,mX.jsx)("span",{})]})]})})}var EI=n(6767),EN=n.n(EI);function ER(e){let{patientPhotoConceptUuid:t}=hZ({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${i9}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:o,isLoading:i}=(0,hk.Ay)(e?n:null,ar),a=r?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let EF=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,hw.useTranslation)();return(0,mX.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,mX.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,mX.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})};var EL=n(7268),EW={};EW.styleTagTransform=gn(),EW.setAttributes=m7(),EW.insert=m6().bind(null,"head"),EW.domAPI=m4(),EW.insertStyleElement=ge(),m2()(EL.A,EW);let EG=EL.A&&EL.A.locals?EL.A.locals:void 0;function EV({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:o}=ER(e),[i,a]=(0,f4.useState)(null),[s,l]=(0,f4.useState)(!1),c=(0,f4.useMemo)(()=>EN().generate(e),[e]);(0,f4.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(a(e),l(!1))},n.onerror=()=>{t||(a(null),l(!1))},n.src=e,()=>{t=!0}}a(null),l(!1)},[r?.imageSrc]);let u=(0,f4.useMemo)(()=>n||(i?sv("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):sv("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,i,t]);return o||s?(0,mX.jsx)(gu.ryE,{className:EG.skeleton,"data-testid":"skeleton-icon"}):r?.imageSrc&&!i?(0,mX.jsx)(EF,{"aria-label":sv("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,mX.jsx)("div",{"aria-label":u,children:(0,mX.jsx)("img",{className:EG.avatar,src:i,alt:u,title:t})}):(0,mX.jsx)("div",{"aria-label":u,children:(0,mX.jsx)("div",{className:EG.avatar,title:t,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,mX.jsx)("span",{className:EG.initials,children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}var EU=n(1636),Eq={};Eq.styleTagTransform=gn(),Eq.setAttributes=m7(),Eq.insert=m6().bind(null,"head"),Eq.domAPI=m4(),Eq.insertStyleElement=ge(),m2()(EU.A,Eq);let EH=EU.A&&EU.A.locals?EU.A.locals:void 0,EK=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],EY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),EJ=EY,EZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),EX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),EQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),E0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),E1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),E2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),E3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),E4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),E5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),E6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),E8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),E7=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),E9=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Se=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),St=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Sn=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Sr=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),So=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Si=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Sa=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Ss=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Sl=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Sc=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Su=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Sp=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Sd=E4,Sf=Sn,Sh=(0,f4.memo)((0,f4.forwardRef)(function({pictogram:e,fallback:t,...n},r){let o=(0,f4.useRef)(document.getElementById(e));return(0,f4.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,mX.jsx)(hW,{value:o.current,fallback:t,children:(0,mX.jsx)(Sm,{ref:r,pictogram:e,pictogramProps:n})})})),Sm=(0,f4.memo)((0,f4.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,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,mX.jsx)("svg",{ref:n,className:m0()(EH.pictogram,r),height:o,width:o,children:(0,mX.jsx)("use",{href:`#${e}`})})})),Sg=({children:e})=>"tablet"===mb()?(0,mX.jsx)(gu.Wdr,{children:e}):(0,mX.jsx)(mX.Fragment,{children:e});var Sb=n(5925),Sy={};Sy.styleTagTransform=gn(),Sy.setAttributes=m7(),Sy.insert=m6().bind(null,"head"),Sy.domAPI=m4(),Sy.insertStyleElement=ge(),m2()(Sb.A,Sy);let S_=Sb.A&&Sb.A.locals?Sb.A.locals:void 0,Sv=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==r,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==r,title:u,id:p,...d}=e,[f,h]=(0,f4.useState)(n),[m,g]=(0,f4.useState)(!0),[b,y]=(0,f4.useState)(!1),v=(0,f4.useCallback)(()=>{setTimeout(t,250)},[t]),A=(0,f4.useCallback)(()=>{y(!0),v()},[v]);return(0,f4.useEffect)(()=>{if(c){let e=setTimeout(A,l);return()=>clearTimeout(e)}},[l,c,A]),(0,f4.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,mX.jsx)(gu.kZS,{actionButtonLabel:f,"aria-label":sv("closeSnackbar","Close snackbar"),className:m0()(S_.slideIn,{[S_.animated]:m,[S_.slideOut]:b}),kind:r,lowContrast:i,onActionButtonClick:()=>{o(),A(),a&&h(a)},onClose:v,statusIconDescription:sv("snackbarNotification","Snackbar notification"),subtitle:s,title:u,...d})},SA=({subject:e})=>{let[t,n]=(0,f4.useState)([]),r=(0,f4.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(Sv,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},S$=new dx,Sw=0;function Sk(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(SA,{subject:S$}))}function Sx(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{S$.next({...e,id:Sw++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let SC=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,f4.useCallback)(()=>{s(),t()},[t,s]);return(0,mX.jsx)("div",{children:(0,mX.jsx)(gu.kZS,{actionButtonLabel:a,kind:r||"info",lowContrast:o,subtitle:n,title:i||"",onActionButtonClick:l,onClose:t})})},SE=({subject:e})=>{let[t,n]=(0,f4.useState)([]),r=(0,f4.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(SC,{toast:e,closeToast:()=>r(e)},e.id))})},SS=new dx,SD=0;function SM(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(SE,{subject:SS}))}function Sz(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!C1(t))?setTimeout(()=>{SS.next({...e,id:SD++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function SO(e,t=!1){if(t)return!0;let n=SI[e];return!n||!n()}function SP(e,t){let n=SU.getState()?.workspaceGroup,r=n?.name;r&&e===r&&SY(()=>{let r=S0(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),SU.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function ST(e,t){let{name:n,additionalProps:r}=t;fH(n);let o=()=>{SW(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>SB(n,r),closeWorkspaceGroup:!1})};SO(e.name)?o():SZ("closing-workspace-launching-new-workspace",o,e.title??e.name)}function SB(e,t){let n=fH(e),r=SU.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void SP(r.name,()=>{SB(e,t)});let o=SU.getState().workspaceGroup?.name,i={...n,title:SX(n,t),closeWorkspace:(t={})=>SW(e,t),closeWorkspaceWithSavedChanges:t=>SW(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(SI[n]=r)},setTitle:(t,n)=>{i.title=t,i.titleNode=n,SU.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){SU.setState(n=>{let r=[e,...t??n.openWorkspaces],o=SK(e);return{...n,openWorkspaces:r,workspaceWindowState:o}})}o&&S0(o,t);let s=SU.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),c=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===SX(t,t.additionalProps)&&{title:SX(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else c?(a(c,SU.getState().openWorkspaces.filter(e=>e.type!=i.type)),ST(c,{name:e,additionalProps:t})):a(i);else ST(s[0],{name:e,additionalProps:t})}function Sj({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){SG(t),SB(n,r),iQ({to:e})}let SI={};function SN(e,t){SI[e]=t}function SR(e){return SI[e]}function SF(){let e=SU.getState();SU.setState({...e,prompt:null})}let SL={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function SW(e,t={}){t={...SL,...t};let n=()=>{let n=SU.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),o=SU.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&SP(o),SI[e]=()=>!1,SU.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:SK(r?.[0])})),t?.onWorkspaceClose?.()};return SO(e,t?.ignoreChanges)?(n(),!0):(SZ("closing-workspace",n,fH(e).title??e),!1)}function SG(e){SU.getState().context!=e&&SU.setState({context:e,openWorkspaces:[],prompt:null})}let SV={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},SU=V("workspace",SV);function Sq(){return SU}function SH(e){let t=SU.getState();SU.setState({...t,workspaceWindowState:e})}function SK(e){return e?.preferredWindowSize??"normal"}function SY(e=()=>{},t=()=>!0){let n=SU.getState().openWorkspaces.filter(t).every(({name:e})=>SO(e)),r=()=>{SQ(),e?.()};n?r():SZ("closing-all-workspaces",r)}function SJ(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=ht(SU);return(0,f4.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function SZ(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:sv("unsavedChangesTitleText","Unsaved changes"),body:sv("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:sv("discard","Discard")};break;case"closing-all-workspaces":{let e=SU.getState().openWorkspaces.filter(({name:e})=>!SO(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:sv("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:sv("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:sv("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:sv("unsavedChangesTitleText","Unsaved changes"),body:sv("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{SU.setState(e=>({...e,prompt:null})),t?.()},confirmText:sv("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}SU.setState(e=>({...e,prompt:r}))}function SX(e,t){return t?.workspaceTitle??e.title}function SQ(){SU.setState(SV)}function S0(e,t={}){if(!e||"default"===e)return;let n=q(e,{});return t&&n.setState(e=>({...e,...t})),n}var S1=n(1341),S2={};S2.styleTagTransform=gn(),S2.setAttributes=m7(),S2.insert=m6().bind(null,"head"),S2.domAPI=m4(),S2.insertStyleElement=ge(),m2()(S1.A,S2);let S3=S1.A&&S1.A.locals?S1.A.locals:void 0;function S4({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,mX.jsxs)(mX.Fragment,{children:[e({size:16}),t?(0,mX.jsx)("span",{className:S3.interruptedTag,children:"!"}):(0,mX.jsx)("span",{className:S3.countTag,children:n})]})}let S5=({getIcon:e,label:t,iconDescription:n,handler:r,type:o,tagContent:i})=>{let a=mb(),{workspaces:s,workspaceWindowState:l}=SJ(),c=s?.findIndex(({type:e})=>e===o)??-1,u="hidden"!==l&&0===c,p=c>0||0===c&&"hidden"===l;return"tablet"===a||"phone"===a?(0,mX.jsxs)(gu.$nd,{className:m0()(S3.container,{[S3.active]:u}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,mX.jsx)("span",{className:S3.elementContainer,children:(0,mX.jsx)(S4,{formOpenInTheBackground:p,getIcon:e,tagContent:i})}),(0,mX.jsx)("span",{children:t})]}):(0,mX.jsx)(gu.K0,{align:"left","aria-label":n,className:m0()(S3.container,{[S3.active]:u}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,mX.jsx)("div",{className:S3.elementContainer,children:(0,mX.jsx)(S4,{formOpenInTheBackground:p,getIcon:e,tagContent:i})})})};var S6=n(4535),S8=n(771),S7=/[\\^$.*+?()[\]{}|]/g,S9=RegExp(S7.source);let De=function(e){return(e=rd(e))&&S9.test(e)?e.replace(S7,"\\$&"):e};var Dt=n(7781),Dn={};Dn.styleTagTransform=gn(),Dn.setAttributes=m7(),Dn.insert=m6().bind(null,"head"),Dn.domAPI=m4(),Dn.insertStyleElement=ge(),m2()(Dt.A,Dn);let Dr=Dt.A&&Dt.A.locals?Dt.A.locals:void 0;function Do({contextKey:e}){let{prompt:t}=SJ();return(0,f4.useEffect)(()=>{RegExp(`/${De(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,f4.useEffect)(()=>(SG(e),()=>{SG(null)}),[e]),(0,f4.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,o=RegExp(`/${De(e)}(/|$)`),i=new URL(r),a=o.test(i.pathname),s=SU.getState().openWorkspaces.every(({name:e})=>SO(e));a||(s?SQ():(n?.(),SY(()=>{iQ({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,mX.jsxs)(gu.KXP,{open:!0,onClose:SF,children:[(0,mX.jsx)(gu.rQ0,{title:t.title}),(0,mX.jsx)(gu.cwr,{children:(0,mX.jsx)("p",{className:Dr.messageBody,children:t.body})}),(0,mX.jsxs)(gu.jlY,{children:[(0,mX.jsx)(gu.$nd,{kind:"secondary",onClick:SF,children:t.cancelText??sv("cancel")}),(0,mX.jsx)(gu.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??sv("confirm")})]})]}):null}function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Di(Object(n),!0).forEach(function(t){Dl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ds(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e){return(Dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Du(e,t){return(Du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dp(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dd=function(e){var t=f4.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&&Du(a,t);var n,r,o,i=(n=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=Dc(a);e=n?Reflect.construct(t,arguments,Dc(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 Dp(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),Dl(Dp(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Dl(Dp(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),Dl(Dp(t),"getParcelProps",function(){var e=Da(Da({},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 r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)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(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,Da({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 hm&&hm.Consumer?f4.createElement(hm.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=hm&&hm.Consumer?f4.createElement(hm.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return f4.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ds(a.prototype,r),o&&Ds(a,o),a}();Dl(Dd,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Df=n(7515),Dh={};Dh.styleTagTransform=gn(),Dh.setAttributes=m7(),Dh.insert=m6().bind(null,"head"),Dh.domAPI=m4(),Dh.insertStyleElement=ge(),m2()(Df.A,Dh);let Dm=Df.A&&Df.A.locals?Df.A.locals:void 0;function Dg({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,f4.useState)(),o=function(e){let[t,n]=(0,f4.useState)({}),[r,o]=(0,f4.useState)(e);return(0,f4.useEffect)(()=>{r!==e&&o(e)},[e]),(0,f4.useEffect)(()=>{let e,t=S0(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,f4.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let i=(0,f4.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return n?(0,mX.jsx)(Dd,{config:n,mountParcel:o9,...i},e.name):(0,mX.jsx)(gu.OuH,{className:Dm.loader,description:`${sv("loading","Loading")} ...`})}var Db=n(4646),Dy={};Dy.styleTagTransform=gn(),Dy.setAttributes=m7(),Dy.insert=m6().bind(null,"head"),Dy.domAPI=m4(),Dy.insertStyleElement=ge(),m2()(Db.A,Dy);let D_=Db.A&&Db.A.locals?Db.A.locals:void 0;function Dv({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,o]=(0,f4.useState)(!1),i=(0,f4.useRef)(window.innerHeight),{featureName:a}=(0,f4.useContext)(f6),s=mb();(0,f4.useEffect)(()=>{let e=()=>{o(!my(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,mX.jsx)("aside",{className:m0()(D_.sideRail,{[D_.withinWorkspace]:e,[D_.sideRailHidden]:r,[D_.sideRailVisible]:!r}),children:(0,mX.jsx)("div",{className:D_.container,children:(0,mX.jsx)(hl,{className:D_.chartExtensions,name:l,state:n})})})}function DA({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:o}){let i=mb(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=SJ(),c=l?.name,u=a[0],p="hidden"===s||null==u,d=u?.width??(t?"wider":"narrow"),f=(0,f4.useMemo)(()=>n||c&&!p,[c,p,n]);return hK(!p&&!my(i)),(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)("div",{className:n?Dm.workspaceContainerWithActionMenu:Dm.workspaceContainerWithoutActionMenu,children:[(0,mX.jsx)("aside",{className:m0()(t?Dm.workspaceOverlayOuterContainer:Dm.workspaceWindowSpacer,{[Dm.hiddenRelative]:p,[Dm.narrowWorkspace]:"narrow"===d,[Dm.widerWorkspace]:"wider"===d,[Dm.extraWideWorkspace]:"extra-wide"===d}),children:(0,mX.jsx)("div",{className:m0()(Dm.workspaceFixedContainer,{[Dm.maximizedWindow]:"maximized"===s,[Dm.hiddenFixed]:p}),children:a.map((e,t)=>(0,mX.jsx)("div",{className:m0()(Dm.workspaceInnerContainer,{[Dm.hiddenExtraWorkspace]:0!==t}),children:(0,mX.jsx)(f4.Suspense,{fallback:null,children:(0,mX.jsx)(hw.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,mX.jsx)(D$,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,mX.jsx)(Do,{contextKey:e})]}),f&&(0,mX.jsx)(Dv,{name:c,isWithinWorkspace:!n,actionMenuProps:o})]})}function D$({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,hw.useTranslation)(),r=mb(),{workspaceWindowState:o,workspaceGroup:i}=SJ(),a=i?.name,s="maximized"===o;(0,f4.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,f4.useContext)(f6),c=(0,f4.useCallback)(()=>{SH(s?"normal":"maximized")},[s]),{canHide:u=!1,canMaximize:p=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,f4.useMemo)(()=>e??{},[e]),h=(0,f4.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)(gu.Y9Y,{"aria-label":sv("workspaceHeader","Workspace Header"),className:Dm.header,children:[!my(r)&&!u&&(0,mX.jsx)(gu.dJ2,{"aria-label":sv("close","Close"),renderMenuIcon:(0,mX.jsx)(gR,{}),onClick:()=>f()}),(0,mX.jsx)(gu.bCw,{prefix:"",children:e.titleNode??n(e.title)}),(0,mX.jsx)("div",{className:Dm.overlayHeaderSpacer}),(0,mX.jsxs)(gu.wdv,{className:Dm.headerButtons,children:[(0,mX.jsx)(hl,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,mX.jsx)(hl,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,mX.jsx)(hl,{name:`workspace-header-${l}-slot`,state:h}),my(r)&&(0,mX.jsxs)(mX.Fragment,{children:[(p||s)&&(0,mX.jsx)(gu.V8d,{"aria-label":s?sv("minimize","Minimize"):sv("maximize","Maximize"),onClick:c,children:s?(0,mX.jsx)(S6.Xj,{}):(0,mX.jsx)(S6.hz,{})}),u&&!a?(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide","Hide"),onClick:()=>SH("hidden"),children:(0,mX.jsx)(gF,{})}):(0,mX.jsx)(gu.V8d,{"aria-label":sv("close","Close"),onClick:()=>f?.(),children:(0,mX.jsx)(g4,{})})]}),"tablet"===r&&u&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("close","Close"),onClick:()=>f?.(),children:(0,mX.jsx)(S8.d3,{})})]})]}),(0,mX.jsx)("div",{className:m0()(Dm.workspaceContent,{[Dm.marginWorkspaceContent]:!!d}),children:(0,mX.jsx)(Dg,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function Dw(e,t){let{openedGroup:n}=fY.getState();if(n){if(n.groupName===e&&DC(n.props,t))return!0;else if(!await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return fY.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Dk(e){let{openedGroup:t,openedWindows:n}=fY.getState();if(t){if(n.length>0&&!(e||await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;fY.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Dx(e,t=null,n=null,r=null){let o=fY.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=fJ(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=fZ(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let c=fX(e);if(a&&(a.groupName!==l.name||!DC(a.props,r)))return!!await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let r=o.openedWindows[c],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:u}=r;if(DC(r.props,n)){let p=u.find(t=>t.workspaceName===e);return p&&DC(p.props,t)?((a||c!==o.openedWindows.length-1)&&fY.setState(DS.restoreWindow(o,s)),!0):!!await DE({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==c),{windowName:s,openedWorkspaces:[DO(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await DE({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==c),{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(fY.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await DE({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function DC(e,t){return null==e||null==t||I(e,t)}function DE(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&n.push(o),t&&o.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=fY.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=CY("workspace2-close-prompt",{onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let DS={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[r],maximized:n};return o[r]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],o=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=fX(t);if(n<0)return e;let r={...e.openedWindows[n]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;i.splice(n,1),t&&i.length>0&&(a=!1)}else i[n]=r;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,n,r){let o=e.registeredWorkspacesByName[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} 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 ${n} 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 ${n} from parent workspace ${t} as the parent is not opened within the workspace window`);let c=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...c,DO(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=fX(t);if(r<0)return e;let o={...e.openedWindows[r]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:n};let a=[...e.openedWindows];return a[r]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function DD(){return hn(fY,DS)}let DM=()=>(0,f4.useContext)(hm),Dz=()=>Object.keys(fY.getState().registeredWorkspacesByName);function DO(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:p1()}}var DP=n(1179),DT={};DT.styleTagTransform=gn(),DT.setAttributes=m7(),DT.insert=m6().bind(null,"head"),DT.domAPI=m4(),DT.insertStyleElement=ge(),m2()(DP.A,DT);let DB=DP.A&&DP.A.locals?DP.A.locals:void 0,Dj=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=mb(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:u,registeredWorkspacesByName:p,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=DD(),{workspaceName:m,isRootWorkspace:g,closeWorkspace:b,showActionMenu:y}=DM(),v=fX(m),A=s[v],$=A?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,f4.useEffect)(()=>{$?.hasUnsavedChanges!=n&&a(m,n??!1)},[$?.hasUnsavedChanges,n,m,a]),(0,f4.useEffect)(()=>{d[m]!==e&&f(m,e)},[d,m,e,f]),v<0||null==l||null==$)return null;let w=c[l.groupName];if(!w)throw Error(`Cannot find registered workspace group ${l.groupName}`);let k=p[m].window,x=u[k];if(!x)throw Error(`Cannot find registered workspace window ${k}`);let{icon:C,canMaximize:E}=x,S="closable"===w.persistence,D=!!C&&!S,{maximized:M}=A,z=x?.width??"narrow",O=Object.values(u).some(e=>e.group===l.groupName&&void 0!==e.icon),P=v<s.length-1||h;return(0,mX.jsxs)("div",{className:m0()(DB.workspaceOuterContainer,{[DB.narrowWorkspace]:"narrow"===z,[DB.widerWorkspace]:"wider"===z,[DB.extraWideWorkspace]:"extra-wide"===z,[DB.isActionMenuOpened]:O}),children:[(0,mX.jsx)("div",{className:m0()(DB.workspaceSpacer,{[DB.hidden]:P})}),(0,mX.jsx)("div",{className:m0()(DB.workspaceMiddleContainer,{[DB.maximized]:M,[DB.hidden]:P,[DB.isRootWorkspace]:g,[DB.showActionMenu]:y}),children:(0,mX.jsxs)("div",{className:m0()(DB.workspaceInnerContainer,{[DB.maximized]:M,[DB.hidden]:P,[DB.isRootWorkspace]:g}),children:[(0,mX.jsxs)(gu.Y9Y,{"aria-label":sv("workspaceHeader"),className:DB.header,children:[(0,mX.jsx)(gu.bCw,{prefix:"",children:e}),(0,mX.jsx)("div",{className:DB.overlayHeaderSpacer}),(0,mX.jsx)(gu.wdv,{className:DB.headerButtons,children:my(r)?(0,mX.jsxs)(mX.Fragment,{children:[(E||M)&&(0,mX.jsx)(gu.V8d,{"aria-label":M?sv("minimize"):sv("maximize"),onClick:()=>o(k,!M),children:M?(0,mX.jsx)(S6.Xj,{}):(0,mX.jsx)(S6.hz,{})}),D&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide"),onClick:()=>i(),children:(0,mX.jsx)(gF,{})}),!S&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("close"),onClick:()=>b({closeWindow:!0}),children:(0,mX.jsx)(g4,{})})]}):(0,mX.jsxs)(mX.Fragment,{children:[D&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide"),onClick:()=>i(),children:(0,mX.jsx)(S8.d3,{})}),(0,mX.jsx)(gu.V8d,{"aria-label":sv("close"),onClick:()=>{S?Dk():b({closeWindow:!0})},children:(0,mX.jsx)(g4,{})})]})})]}),(0,mX.jsx)("div",{className:m0()(DB.workspaceContent),children:t})]})})]})};var DI=n(7810),DN={};DN.styleTagTransform=gn(),DN.setAttributes=m7(),DN.insert=m6().bind(null,"head"),DN.domAPI=m4(),DN.insertStyleElement=ge(),m2()(DI.A,DN);let DR=DI.A&&DI.A.locals?DI.A.locals:void 0;function DF({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,mX.jsxs)(mX.Fragment,{children:[e({size:16}),t?(0,mX.jsx)("span",{className:DR.interruptedTag,children:"!"}):(0,mX.jsx)("span",{className:DR.countTag,children:n})]})}let DL=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let i=mb(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=DD(),{extension:u}=(0,f4.useContext)(f6),p=a.findIndex(e=>e.windowName===u?.extensionId),d=a[p],f=null!=d,h=f&&(p<a.length-1||c),m=f&&!h,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(f)h?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;Dx(e,t,n)}};return"tablet"===i||"phone"===i?(0,mX.jsxs)(gu.$nd,{className:m0()(DR.container,{[DR.active]:f&&!m,[DR.focused]:m}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",children:[(0,mX.jsx)("span",{className:DR.elementContainer,children:(0,mX.jsx)(DF,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,mX.jsx)("span",{children:t})]}):(0,mX.jsx)(gu.K0,{align:"left","aria-label":t,className:m0()(DR.container,{[DR.active]:f&&!m,[DR.focused]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",children:(0,mX.jsx)("div",{className:DR.elementContainer,children:(0,mX.jsx)(DF,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function DW({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,mX.jsx)(gu.$nd,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?g3:g0,children:e?sv("showLess","Show less"):sv("showMore","Show more")})}var DG=n(5804),DV={};DV.styleTagTransform=gn(),DV.setAttributes=m7(),DV.insert=m6().bind(null,"head"),DV.domAPI=m4(),DV.insertStyleElement=ge(),m2()(DG.A,DV);let DU=DG.A&&DG.A.locals?DG.A.locals:void 0,Dq=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${i9}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=(0,hk.Ay)(t,ar),o=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,f4.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)("p",{className:DU.heading,children:[sv("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>xT(e?.startDate).getTime()-xT(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,mX.jsx)("li",{children:(0,mX.jsx)(f8,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,mX.jsx)("li",{children:"--"})})(),t.length>3&&(0,mX.jsx)("li",{className:DU.link,children:(0,mX.jsx)(f8,{to:`${window.spaBase}/home/patient-lists`,children:sv("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},DH=({patientId:e})=>{let{patient:t,isLoading:n}=mS(e),r=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("address","Address")}),(0,mX.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,mX.jsxs)("li",{children:[sv(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,mX.jsxs)("li",{children:[sv(e,e),": ",t]},`address-${e}`)):(0,mX.jsx)("li",{children:"--"})})]})},DK=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=hZ({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:o}=(e=>{let{data:t,error:n,isLoading:r}=(0,h1.A)(`${i9}/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)))`,ar);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,f4.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:o,error:r}})(e),r=(0,f4.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?sv(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("contactDetails","Contact Details")}),t?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,mX.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,mX.jsx)("li",{children:"--"})})]})},DY=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${i9}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:o,isValidating:i}=(0,hk.Ay)(e?t:null,ar),a=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?a:null,error:r,isLoading:o,isValidating:i}}(e);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("relationships","Relationships")}),n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsx)("ul",{children:t&&t.length>0?(0,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsxs)("li",{className:DU.relationship,children:[(0,mX.jsx)("div",{children:(0,mX.jsx)(f8,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,mX.jsx)("div",{children:e.relationshipType}),(0,mX.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?sv("yearAbbreviation","yr"):sv("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,mX.jsx)("li",{children:"--"})})]})};function DJ({patientId:e,deceased:t}){return(0,mX.jsxs)("div",{className:m0()(DU.contactDetails,{[DU.deceased]:t}),children:[(0,mX.jsxs)("div",{className:DU.row,children:[(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DH,{patientId:e})}),(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DK,{patientUuid:e})})]}),(0,mX.jsxs)("div",{className:DU.row,children:[(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DY,{patientId:e})}),(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(Dq,{patientUuid:e})})]})]})}function DZ(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}var DX=n(4039),DQ={};DQ.styleTagTransform=gn(),DQ.setAttributes=m7(),DQ.insert=m6().bind(null,"head"),DQ.domAPI=m4(),DQ.insertStyleElement=ge(),m2()(DX.A,DQ);let D0=DX.A&&DX.A.locals?DX.A.locals:void 0;function D1({workspaceGroup:e,groupProps:t}){let n=mb(),{persistence:r}=e;return(0,mX.jsx)("aside",{className:D0.sideRail,children:(0,mX.jsxs)("div",{className:D0.container,children:["closable"==r&&my(n)&&(0,mX.jsx)(gu.K0,{align:"left",onClick:()=>Dk(),label:sv("close"),kind:"ghost",children:(0,mX.jsx)(g4,{})}),(0,mX.jsx)(f6.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,mX.jsx)(hl,{className:D0.container,name:e.name,state:{groupProps:t}})})]})})}let D2=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=DD(),c=(0,f4.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await DE({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(o||await DE({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await DE({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:r,isLeafWorkspace:o,windowName:n.windowName,showActionMenu:i},[t,s,a,n]);if(!e){let{registeredWorkspacesByName:e}=fY.getState(),n=e[t.workspaceName],o=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=fY.getState(),l=o?s[o]:void 0,c=l&&l.width?l.width:"narrow",u=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,mX.jsxs)("div",{className:m0()(DB.workspaceOuterContainer,{[DB.narrowWorkspace]:"narrow"===c,[DB.widerWorkspace]:"wider"===c,[DB.extraWideWorkspace]:"extra-wide"===c,[DB.isActionMenuOpened]:u}),children:[(0,mX.jsx)("div",{className:DB.workspaceSpacer}),(0,mX.jsx)("div",{className:m0()(DB.workspaceMiddleContainer,{[DB.isRootWorkspace]:r,[DB.showActionMenu]:i}),children:(0,mX.jsx)("div",{className:m0()(DB.workspaceInnerContainer,{[DB.isRootWorkspace]:r}),children:(0,mX.jsx)(gu.OuH,{className:DB.loader,description:`${sv("loading")} ...`})})})]})}return(0,mX.jsx)(Dd,{config:e,mountParcel:o9,...c},t.workspaceName)},D3=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,o]=(0,f4.useState)(),{registeredWorkspacesByName:i}=fY.getState();return(0,f4.useEffect)(()=>{Promise.all(n.map(e=>{let{moduleName:t,component:n}=i[e.workspaceName];return mL(t,n)})).then(o)},[n]),(0,mX.jsx)(mX.Fragment,{children:n.map((o,i)=>(0,mX.jsx)(D2,{openedWorkspace:o,openedWindow:e,lifeCycle:r&&r[i]?r[i]:void 0,isRootWorkspace:0===i,isLeafWorkspace:i===n.length-1,showActionMenu:t},o.uuid))})};var D4=n(297),D5={};D5.styleTagTransform=gn(),D5.setAttributes=m7(),D5.insert=m6().bind(null,"head"),D5.domAPI=m4(),D5.insertStyleElement=ge(),m2()(D4.A,D5);let D6=D4.A&&D4.A.locals?D4.A.locals:void 0;function D8(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(D7,{}))}function D7(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=DD();if((0,f4.useEffect)(()=>dg("before-page-changed",t=>{let{newPage:r,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(r)return void o(Dk().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new URL(t,window.location.origin).pathname,o=new URL(n,window.location.origin).pathname,i=new RegExp(e),a=r.match(i),s=o.match(i);if(!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(Dk().then(e=>!e))}),[e,n]),!e)return null;let o=n[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(r).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,mX.jsxs)("div",{className:m0()(D6.workspaceWindowsAndMenuContainer,{[D6.overlay]:o.overlay,[D6.hasMaximizedWindow]:i}),children:[(0,mX.jsx)("div",{className:D6.workspaceWindowsContainer,children:t.map(e=>(0,mX.jsx)(D3,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,mX.jsx)(D1,{workspaceGroup:o,groupProps:e.props})]})}function D9(e){if("string"!=typeof e||0===e.trim().length)return;let t=e.replaceAll("_","-");try{return new Intl.Locale(t).toString()}catch{return}}function Me(e,t,n){if(null==e)return n;let r=D9(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let o=[];for(let e of t){let t=D9(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=r;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",n=o.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===i){i="fr-HT";continue}let r=i.lastIndexOf("-");if(-1===r)break;let a=(i=i.slice(0,r)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return n}function Mt(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Mn(e){return!!e&&e.constructor===Object}var Mr=n(9589);function Mo(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function Mi(e,t){let n=function(e){let t=e.indexOf("-");if(t>=0){let n=Mo(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return Mo(e)}(t);return Mr.satisfies(n,e,{includePrerelease:!0})}async function Ma(e,t={}){let n,{shouldRetry:r,getDelay:o,onError:i}=t;r=r??(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 Ms(o(a)),await e()}catch(e){i?.(e,a),n=e}while(r(a++));throw n}async function Ms(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let mK={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 mY(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<mK.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>mK.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>mK.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<mK.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<mK.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<mK.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>mK.SMALL_DESKTOP_MAX)}let mJ=!1;function mZ(){mJ||(window.addEventListener("resize",mY),mY(),mJ=!0)}var mX=n(4848),mQ=n(6942),m0=n.n(mQ),m1=n(5072),m2=n.n(m1),m3=n(7825),m4=n.n(m3),m5=n(7659),m6=n.n(m5),m8=n(5056),m7=n.n(m8),m9=n(540),ge=n.n(m9),gt=n(1113),gn=n.n(gt),gr=n(6097),go={};go.styleTagTransform=gn(),go.setAttributes=m7(),go.insert=m6().bind(null,"head"),go.domAPI=m4(),go.insertStyleElement=ge(),m2()(gr.A,go);let gi=gr.A&&gr.A.locals?gr.A.locals:void 0;function ga({title:e,children:t}){let n="tablet"===mb();return(0,mX.jsxs)("div",{className:m0()({[gi.tabletHeader]:n,[gi.desktopHeader]:!n}),children:[(0,mX.jsx)("h4",{children:e}),t]})}let gs=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],gl={primaryColor:{_type:rx.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[om.oneOf(gs)]},secondaryColor:{_type:rx.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[om.oneOf(gs)]}},gc={"Brand color #1":{_default:"#005d5d",_type:rx.String},"Brand color #2":{_default:"#004144",_type:rx.String},"Brand color #3":{_default:"#007d79",_type:rx.String},excludePatientIdentifierCodeTypes:{uuids:{_type:rx.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:rx.UUID}}},implementationName:{_type:rx.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:rx.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:rx.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[om.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:rx.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:rx.String}},diagnosisTags:gl};var gu=n(6129);let gp={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},gd=e=>(0,mX.jsx)(gu.GGC,{translateWithId:(e,t)=>{let n=gp[e];return n?sv(n,e,t):e},...e});var gf=n(9158),gh={};gh.styleTagTransform=gn(),gh.setAttributes=m7(),gh.insert=m6().bind(null,"head"),gh.domAPI=m4(),gh.insertStyleElement=ge(),m2()(gf.A,gh);let gm=gf.A&&gf.A.locals?gf.A.locals:void 0,gg=(0,f4.createContext)(null);function gb(){let e=(0,f4.useContext)(gg);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function gy({menuTitle:e,children:t}){let[n,r]=f5().useState(!1),o=m$(()=>r(!1),n),i="tablet"===mb(),a=(0,f4.useCallback)(()=>r(e=>!e),[]),s=(0,f4.useRef)(null),l=(0,f4.useRef)(null),c=(0,f4.useId)(),u=`custom-overflow-menu-trigger-${c}`,p=`custom-overflow-menu-${c}`,d=(0,f4.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,f4.useMemo)(()=>({closeMenu:d}),[d]),h=(0,f4.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),d())},[d,n]),m=f4.Children.toArray(t);(0,f4.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,f4.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(n).indexOf(r);if(-1===o)return void n[t>0?0:n.length-1]?.focus();let i=o+t,a=i<0?n.length-1:i>=n.length?0:i;n[a]?.focus()},[]),b=m.map((e,t)=>(0,f4.isValidElement)(e)?(0,f4.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:t}):e);return(0,mX.jsxs)("div",{"data-overflow-menu":!0,className:m0()("cds--overflow-menu",gm.container),ref:o,children:[(0,mX.jsx)("button",{className:m0()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},gm.overflowMenuButton),"aria-controls":p,"aria-expanded":n,"aria-haspopup":"true",id:u,onClick:a,onKeyDown:h,ref:s,children:e}),(0,mX.jsxs)("div",{className:m0()("cds--overflow-menu-options","cds--overflow-menu--flip",gm.menu,{[gm.show]:n}),"aria-labelledby":u,"data-floating-menu-direction":"bottom",id:p,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,mX.jsx)("ul",{className:m0()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,mX.jsx)(gg.Provider,{value:f,children:b})}),(0,mX.jsx)("span",{})]})]})}function g_(e){let t=(0,f4.useContext)(gg);return(0,mX.jsx)(gu.XSD,{...e,closeMenu:t?.closeMenu})}var gv=n(8168);(ea=el||(el={})).Pop="POP",ea.Push="PUSH",ea.Replace="REPLACE";var gA=function(e){return e},g$="beforeunload";function gw(e){e.preventDefault(),e.returnValue=""}function gk(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function gx(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}let gC=(0,f4.createContext)(null),gE=(0,f4.createContext)(null);function gS(e,t){if(!e)throw Error(t)}function gD(){return null!=(0,f4.useContext)(gE)}function gM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=el.Pop,navigator:i,static:a=!1}=e;gD()&&gS(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,f4.useMemo)(()=>({basename:s,navigator:i,static:a}),[s,i,a]);"string"==typeof r&&(r=gx(r));let{pathname:c="/",search:u="",hash:p="",state:d=null,key:f="default"}=r,h=(0,f4.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}(c,s);return null==e?null:{pathname:e,search:u,hash:p,state:d,key:f}},[s,c,u,p,d,f]);return null==h?null:(0,f4.createElement)(gC.Provider,{value:l},(0,f4.createElement)(gE.Provider,{children:n,value:{location:h,navigationType:o}}))}function gz(e){let{basename:t,children:n,window:r}=e,o=(0,f4.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,gA({pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"})]}var i=null;n.addEventListener("popstate",function(){if(i)p.call(i),i=null;else{var e=el.Pop,t=o(),n=t[0],r=t[1];if(p.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){b(-1*a)}},b(a))}}else g(e)}});var a=el.Pop,s=o(),l=s[0],c=s[1],u=gk(),p=gk();function d(e){var t,n,r,o,i,a,s;return"string"==typeof e?e:(r=void 0===(n=(t=e).pathname)?"/":n,i=void 0===(o=t.search)?"":o,s=void 0===(a=t.hash)?"":a,i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r)}function f(e,t){return void 0===t&&(t=null),gA((0,gv.A)({pathname:c.pathname,hash:"",search:""},"string"==typeof e?gx(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function h(e,t){return[{usr:e.state,key:e.key,idx:t},d(e)]}function m(e,t,n){return!p.length||(p.call({action:e,location:t,retry:n}),!1)}function g(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function b(e){r.go(e)}return null==l&&(l=0,r.replaceState((0,gv.A)({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:d,push:function e(t,o){var i=el.Push,a=f(t,o);if(m(i,a,function(){e(t,o)})){var s=h(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}g(i)}},replace:function e(t,n){var o=el.Replace,i=f(t,n);if(m(o,i,function(){e(t,n)})){var a=h(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),g(o)}},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return u.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&n.addEventListener(g$,gw),function(){t(),p.length||n.removeEventListener(g$,gw)}}}}({window:r}));let i=o.current,[a,s]=(0,f4.useState)({action:i.action,location:i.location});return(0,f4.useLayoutEffect)(()=>i.listen(s),[i]),(0,f4.createElement)(gM,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}var gO=n(424),gP={};gP.styleTagTransform=gn(),gP.setAttributes=m7(),gP.insert=m6().bind(null,"head"),gP.domAPI=m4(),gP.insertStyleElement=ge(),m2()(gO.A,gP);let gT=gO.A&&gO.A.locals?gO.A.locals:void 0,gB=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],gj=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),gI=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-add",iconProps:e})})),gN=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),gR=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),gF=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),gL=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),gW=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),gG=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),gV=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),gU=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),gq=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),gH=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),gK=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),gY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),gJ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),gZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),gX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),gQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),g0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),g1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),g2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),g3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),g4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close",iconProps:e})})),g5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),g6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),g8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-document",iconProps:e})})),g7=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),g9=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-download",iconProps:e})})),be=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),bt=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),bn=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),br=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-events",iconProps:e})})),bo=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),bi=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),ba=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),bs=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),bl=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),bc=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-group",iconProps:e})})),bu=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),bp=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),bd=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),bf=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information",iconProps:e})})),bh=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),bm=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),bg=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),bb=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),by=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),b_=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-location",iconProps:e})})),bv=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),bA=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),b$=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),bw=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),bk=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),bx=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-money",iconProps:e})})),bC=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),bE=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),bS=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),bD=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),bM=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-password",iconProps:e})})),bz=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),bO=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),bP=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),bT=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),bB=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),bj=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),bI=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),bN=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-report",iconProps:e})})),bR=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),bF=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-save",iconProps:e})})),bL=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-search",iconProps:e})})),bW=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),bG=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),bV=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),bU=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),bq=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),bH=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),bK=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),bY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-table",iconProps:e})})),bJ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-time",iconProps:e})})),bZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),bX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),bQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),b0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),b1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),b2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),b3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),b4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-user",iconProps:e})})),b5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),b6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-view",iconProps:e})})),b8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(yo,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),b7=b8,b9=g7,ye=by,yt=bd,yn=bU,yr=(0,f4.memo)((0,f4.forwardRef)(function({icon:e,fallback:t,...n},r){let o=(0,f4.useRef)(e?document.getElementById(e):void 0);return(0,f4.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,mX.jsx)(hW,{value:o.current,fallback:t,children:(0,mX.jsx)(yo,{ref:r,icon:e,iconProps:n})})})),yo=(0,f4.memo)((0,f4.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,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,f4.useRef)(null);return(0,f4.useImperativeHandle)(n,()=>a.current),(0,f4.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,mX.jsx)("svg",{ref:a,className:m0()("omrs-icon",gT.icon,r),height:i,width:i,viewBox:"0 0 16 16",children:(0,mX.jsx)("use",{href:`#${e}`})})}));var yi=n(8852),ya={};ya.styleTagTransform=gn(),ya.setAttributes=m7(),ya.insert=m6().bind(null,"head"),ya.domAPI=m4(),ya.insertStyleElement=ge(),m2()(yi.A,ya);let ys=yi.A&&yi.A.locals?yi.A.locals:void 0,yl=({path:e,title:t,basePath:n,icon:r})=>{let{t:o}=(0,hw.useTranslation)(),i=(gD()||gS(!1),(0,f4.useContext)(gE).location),a=(0,f4.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[i.pathname,e]);return(0,mX.jsx)("div",{children:(0,mX.jsx)(f8,{className:m0()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${n}/${encodeURIComponent(e)}`,children:(0,mX.jsxs)("span",{className:ys.menu,children:[(0,mX.jsx)(yr,{icon:r,className:ys.icon,size:16}),(0,mX.jsx)("span",{children:o(t)})]})})},e)};function yc(e){return function({basePath:t}){return(0,mX.jsx)(gz,{children:(0,mX.jsx)(yl,{basePath:t,...e})})}}function yu(e){let t=(0,f4.useRef)(null);return(0,f4.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function yp(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let yd="u">typeof document?f5().useLayoutEffect:()=>{};function yf(e){let t=(0,f4.useRef)(null);return yd(()=>{t.current=e},[e]),(0,f4.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let yh={prefix:String(Math.round(1e10*Math.random())),current:0},ym=f5().createContext(yh),yg=f5().createContext(!1),yb=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),yy="function"==typeof f5().useId?function(e){let t=f5().useId(),[n]=(0,f4.useState)(y$()),r=n?"react-aria":`react-aria${yh.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,f4.useContext)(ym),n=function(e=!1){let t=(0,f4.useContext)(ym),n=(0,f4.useRef)(null);if(null===n.current&&!e){var r,o;let e=null==(o=f5().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=o.ReactCurrentOwner)?void 0:r.current;if(e){let n=yb.get(e);null==n?yb.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,yb.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function y_(){return!1}function yv(){return!0}function yA(e){return()=>{}}function y$(){return"function"==typeof f5().useSyncExternalStore?f5().useSyncExternalStore(yA,y_,yv):(0,f4.useContext)(yg)}let yw=!!("u">typeof window&&window.document&&window.document.createElement),yk=new Map;function yx(e){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(null),o=yy(t),i=(0,f4.useRef)(null);if(s&&s.register(i,o),yw){let e=yk.get(o);e&&!e.includes(r)?e.push(r):yk.set(o,[r])}return yd(()=>()=>{s&&s.unregister(i),yk.delete(o)},[o]),(0,f4.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),o}function yC(e=[]){let t=yx(),[n,r]=function(e){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(null),o=yf(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?o():n(e.value)});yd(()=>{r.current&&o()});let i=yf(e=>{r.current=e(t),o()});return[t,i]}(t),o=(0,f4.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return yd(o,[t,o,...e]),n}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{yk.delete(e)}));let yE=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r};function yS(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],o=r[e];"function"==typeof n&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=yp(n,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof o?t[e]=yE(n,o):"id"===e&&n&&o?t.id=function(e,t){if(e===t)return e;let n=yk.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=yk.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,o):t[e]=void 0!==o?o:n}}return t}let yD=Symbol("default");function yM({values:e,children:t}){for(let[n,r]of e)t=f5().createElement(n.Provider,{value:r},t);return t}function yz(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,f4.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=c?c:i,"data-rac":""}},[t,n,r,o,i,a,s])}function yO(e,t){let n=(0,f4.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||yD;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function yP(e,t,n){let{ref:r,...o}=yO(n,e.slot)||{},i=yu((0,f4.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}})(t,r),[t,r])),a=yS(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 n="function"==typeof o.style?o.style(t):o.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:a.style={...o.style,...e.style}),[a,i]}function yT(e=!0){let[t,n]=(0,f4.useState)(e),r=(0,f4.useRef)(!1),o=(0,f4.useCallback)(e=>{r.current=!0,n(!!e)},[]);return yd(()=>{r.current||n(!1)},[]),[o,t]}function yB(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let yj=(0,f4.createContext)(null),yI=null;function yN(e,t="assertive",n=7e3){yI?yI.announce(e,t,n):(yI=new yR,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yI.announce(e,t,n):setTimeout(()=>{(null==yI?void 0:yI.isAttached())&&(null==yI||yI.announce(e,t,n))},100))}class yR{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",n=7e3){var r,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==(r=this.assertiveLog)||r.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},n)}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 yF=new Set(["id"]),yL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yW=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yG=/^(data-.*)$/;function yV(e,t={}){let{labelable:n,isLink:r,propNames:o}=t,i={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yF.has(t)||n&&yL.has(t)||r&&yW.has(t)||(null==o?void 0:o.has(t))||yG.test(t))&&(i[t]=e[t]);return i}let yU=["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"])'],yq=yU.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yU.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yH=yU.join(':not([hidden]):not([tabindex="-1"]),');function yK(e){return e.matches(yq)}function yY(e){return e.matches(yH)}let yJ=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},yZ=e=>e&&"window"in e&&e.window===e?e:yJ(e).defaultView||window;function yX(e){if(function(){if(null==yQ){yQ=!1;try{document.createElement("div").focus({get preventScroll(){return yQ=!0,!0}})}catch{}}return yQ}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let yQ=null;function y0(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function y1(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function y2(e){let t=(0,f4.useRef)({isFocused:!1,observer:null});yd(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=yf(t=>{null==e||e(t)});return(0,f4.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(y0(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let y3=!1;function y4(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 y5(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 y6(e){let t=null;return()=>(null==t&&(t=e()),t)}let y8=y6(function(){return y5(/^Mac/i)}),y7=y6(function(){return y5(/^iPhone/i)}),y9=y6(function(){return y5(/^iPad/i)||y8()&&navigator.maxTouchPoints>1}),_e=y6(function(){return y7()||y9()});y6(function(){return y8()||_e()});let _t=y6(function(){return y4(/AppleWebKit/i)&&!_n()}),_n=y6(function(){return y4(/Chrome/i)}),_r=y6(function(){return y4(/Android/i)}),_o=y6(function(){return y4(/Firefox/i)}),_i=new Map,_a=new Set;function _s(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=_i.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),_i.delete(n.target)),0===_i.size)){for(let e of _a)e();_a.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=_i.get(n.target);r||(r=new Set,_i.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function _l(e){requestAnimationFrame(()=>{0===_i.size?e():_a.add(e)})}"u">typeof document&&("loading"!==document.readyState?_s():document.addEventListener("DOMContentLoaded",_s));let _c="default",_u="",_p=new WeakMap;function _d(e){if(_e())"disabled"===_c&&(_c="restoring",setTimeout(()=>{_l(()=>{if("restoring"===_c){let t=yJ(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=_u||""),_u="",_c="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&_p.has(e)){let t=_p.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),_p.delete(e)}}let _f=f5().createContext({register:()=>{}});function _h(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function _m(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function _g(e,t,n){var r=_h(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function _b(e,t){yd(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function _y(){let e=(0,f4.useRef)(new Map),t=(0,f4.useCallback)((t,n,r,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=(0,f4.useCallback)((t,n,r,o)=>{var i;let a=(null==(i=e.current.get(r))?void 0:i.fn)||r;t.removeEventListener(n,a,o),e.current.delete(r)},[]),r=(0,f4.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,f4.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}_f.displayName="PressResponderContext";function __(e,t){return!!t&&!!e&&e.contains(t)}function _v(e){return e.target}function _A(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;_o()&&(null==(o=window.event)||null==(r=o.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(y8()?i=!0:a=!0);let c=_t()&&y8()&&!y9()&&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});_A.isOpening=n,yX(e),e.dispatchEvent(c),_A.isOpening=!1}function _$(e){return 0===e.mozInputSource&&!!e.isTrusted||(_r()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}_A.isOpening=!1;var _w=n(1779),_k=n.n(_w),_x=new WeakMap;class _C{continuePropagation(){_g(this,_x,!1)}get shouldStopPropagation(){var e;return e=_h(this,_x,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var o;_m(this,_x,{writable:!0,value:void 0}),_g(this,_x,!0);let i=null!=(o=null==r?void 0:r.target)?o:n.currentTarget;const a=null==i?void 0:i.getBoundingClientRect();let s,l=0,c,u=null;null!=n.clientX&&null!=n.clientY&&(c=n.clientX,u=n.clientY),a&&(null!=c&&null!=u?(s=c-a.left,l=u-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l}}let _E=Symbol("linkClicked");function _S(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,f4.useContext)(_f);if(t){let{register:n,...r}=t;e=yS(r,e),n()}return _b(t,e.ref),e}(e),[h,m]=(0,f4.useState)(!1),g=(0,f4.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:y}=_y(),v=yf((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,r){let n=new _C("pressstart",t,e);r(n),i=n.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i}),A=yf((e,r,i=!0)=>{let a=g.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new _C("pressend",r,e);o(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&i&&!s){let n=new _C("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),$=yf((e,t)=>{let n=g.current;if(s)return!1;if(i){n.isTriggeringEvent=!0;let r=new _C("pressup",t,e);return i(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=yf(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(_z(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,y(),p||_d(t.target),t.disposables))n();t.disposables=[]}}),k=yf(e=>{u&&w(e)}),x=yf(e=>{null==a||a(e)}),C=yf((e,t)=>{if(a){let n=new MouseEvent("click",e);y1(n,t),a(y0(n))}}),E=(0,f4.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(_M(t.nativeEvent,t.currentTarget)&&__(t.currentTarget,_v(t.nativeEvent))){var r;_O(_v(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=v(t,"keyboard");let r=t.currentTarget;b(yJ(t.currentTarget),"keyup",yp(t=>{_M(t,r)&&!t.repeat&&__(r,_v(t))&&e.target&&$(_z(e.target,t),"keyboard")},n),!0)}o&&t.stopPropagation(),t.metaKey&&y8()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||__(t.currentTarget,_v(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!_A.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||_$(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),o=A(t,"virtual");x(t),n=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual";n=A(_z(t.currentTarget,t),r,!0),e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,o;if(e.isPressed&&e.target&&_M(t,e.target)){_O(_v(t),t.key)&&t.preventDefault();let n=_v(t),o=__(e.target,_v(t));A(_z(e.target,t),"keyboard",o),o&&C(t,e.target),y(),"Enter"!==t.key&&_D(e.target)&&__(e.target,n)&&!t[_E]&&(t[_E]=!0,_A(e.target,t,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(t.key)}else if("Meta"===t.key&&(null==(n=e.metaKeyEvents)?void 0:n.size)){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!__(t.currentTarget,_v(t.nativeEvent)))return;if(o=t.nativeEvent,!_r()&&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,p||function(e){if(_e()){if("default"===_c){let t=yJ(e);_u=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}_c="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";_p.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=_v(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),b(yJ(t.currentTarget),"pointerup",n,!1),b(yJ(t.currentTarget),"pointercancel",r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(__(t.currentTarget,_v(t.nativeEvent))&&0===t.button){if(c){let n=function(e){for(;e&&!yK(e);)e=e.parentElement;let t=yZ(e),n=t.document.activeElement;if(!n||n===e)return;y3=!0;let r=!1,o=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},i=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,yX(n),l()))},a=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,yX(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),y3=!1,r=!1},c=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{__(t.currentTarget,_v(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&$(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_z(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_z(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(__(e.target,_v(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(yX(e.target),e.target.click()))},80);b(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(t);e.isOverTarget=!1}},r=e=>{w(e)};t.onDragStart=e=>{__(e.currentTarget,_v(e.nativeEvent))&&w(e)}}return t},[b,s,c,y,p,w,k,A,v,$,x,C]);return(0,f4.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof yZ(e).Element&&"auto"===yZ(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,f4.useEffect)(()=>{let e=g.current;return()=>{var t;for(let n of(p||_d(null!=(t=e.target)?t:void 0),e.disposables))n();e.disposables=[]}},[p]),{isPressed:l||h,pressProps:yS(f,E)}}function _D(e){return"A"===e.tagName&&e.hasAttribute("href")}function _M(e,t){let{key:n,code:r}=e,o=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof yZ(t).HTMLInputElement&&!_T(t,n)||t instanceof yZ(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&_D(t))&&"Enter"!==n)}function _z(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function _O(e,t){return e instanceof HTMLInputElement?!_T(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!_D(e))}let _P=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _T(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:_P.has(e.type)}let _B=null,_j=new Set,_I=new Map,_N=!1,_R=!1,_F={Tab:!0,Escape:!0};function _L(e,t){for(let n of _j)n(e,t)}function _W(e){_N=!0,e.metaKey||!y8()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(_B="keyboard",_L("keyboard",e))}function _G(e){_B="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(_N=!0,_L("pointer",e))}function _V(e){_$(e)&&(_N=!0,_B="virtual")}function _U(e){e.target!==window&&e.target!==document&&!y3&&e.isTrusted&&(_N||_R||(_B="virtual",_L("virtual",e)),_N=!1,_R=!1)}function _q(){y3||(_N=!1,_R=!0)}function _H(e){if("u"<typeof window||_I.get(yZ(e)))return;let t=yZ(e),n=yJ(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){_N=!0,r.apply(this,arguments)},n.addEventListener("keydown",_W,!0),n.addEventListener("keyup",_W,!0),n.addEventListener("click",_V,!0),t.addEventListener("focus",_U,!0),t.addEventListener("blur",_q,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",_G,!0),n.addEventListener("pointermove",_G,!0),n.addEventListener("pointerup",_G,!0)),t.addEventListener("beforeunload",()=>{_K(e)},{once:!0}),_I.set(t,{focus:r})}let _K=(e,t)=>{let n=yZ(e),r=yJ(e);t&&r.removeEventListener("DOMContentLoaded",t),_I.has(n)&&(n.HTMLElement.prototype.focus=_I.get(n).focus,r.removeEventListener("keydown",_W,!0),r.removeEventListener("keyup",_W,!0),r.removeEventListener("click",_V,!0),n.removeEventListener("focus",_U,!0),n.removeEventListener("blur",_q,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",_G,!0),r.removeEventListener("pointermove",_G,!0),r.removeEventListener("pointerup",_G,!0)),_I.delete(n))};function _Y(){return"pointer"!==_B}"u">typeof document&&("loading"!==(d=yJ(void 0)).readyState?_H(void 0):d.addEventListener("DOMContentLoaded",()=>{_H(void 0)}));let _J=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _Z(e){let t=yJ(e),n=((e=document)=>e.activeElement)(t);"virtual"===_B?_l(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&yX(e)}):yX(e)}function _X(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e,i=(0,f4.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),a=y2(i),s=(0,f4.useCallback)(e=>{let t=yJ(e.target),r=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&r===_v(e.nativeEvent)&&(n&&n(e),o&&o(!0),a(e))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function _Q(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}let _0=f5().createContext(null);function _1(e,t){let{focusProps:n}=_X(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:_Q(e.onKeyDown),onKeyUp:_Q(e.onKeyUp)}},o=yS(n,r),i=function(e){let t=(0,f4.useContext)(_0)||{};_b(t,e);let{ref:n,...r}=t;return r}(t),a=e.isDisabled?{}:i,s=(0,f4.useRef)(e.autoFocus);(0,f4.useEffect)(()=>{s.current&&t.current&&_Z(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:yS({...o,tabIndex:l},a)}}function _2(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=(0,f4.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=_y(),l=(0,f4.useCallback)(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),c=y2(l),u=(0,f4.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=yJ(e.target),n=((e=document)=>e.activeElement)(t);if(!i.current.isFocusWithin&&n===_v(e.nativeEvent)){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,c(e);let n=e.currentTarget;a(t,"focus",e=>{if(i.current.isFocusWithin&&!__(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});y1(r,n),l(y0(r))}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function _3(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:o}=e,i=(0,f4.useRef)({isFocused:!1,isFocusVisible:n||_Y()}),[a,s]=(0,f4.useState)(!1),[l,c]=(0,f4.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),u=(0,f4.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),p=(0,f4.useCallback)(e=>{i.current.isFocused=e,s(e),u()},[u]);t={isTextInput:r},_H(),(0,f4.useEffect)(()=>{let e=(e,n)=>{var r;let o,a,s,l,c;r=!!(null==t?void 0:t.isTextInput),o=yJ(null==n?void 0:n.target),a="u">typeof window?yZ(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?yZ(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?yZ(null==n?void 0:n.target).HTMLElement:HTMLElement,c="u">typeof window?yZ(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(r=r||o.activeElement instanceof a&&!_J.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof c&&!_F[n.key]||(e=>{i.current.isFocusVisible=e,u()})(_Y())};return _j.add(e),()=>{_j.delete(e)}},[]);let{focusProps:d}=_X({isDisabled:o,onFocusChange:p}),{focusWithinProps:f}=_2({isDisabled:!o,onFocusWithinChange:p});return{isFocused:a,isFocusVisible:l,focusProps:o?f:d}}f5().forwardRef(function(e,t){let{children:n,...r}=e,o=yu(t),i={...r,ref:o};return f5().createElement(_0.Provider,{value:i},n)});let _4=!1,_5=0;function _6(e){"touch"===e.pointerType&&(_4=!0,setTimeout(()=>{_4=!1},50))}function _8(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",_6),_5++,()=>{!(--_5>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",_6)}}function _7(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,a]=(0,f4.useState)(!1),s=(0,f4.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,f4.useEffect)(_8,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=_y(),{hoverProps:u,triggerHoverEnd:p}=(0,f4.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:o,pointerType:t}),n&&n(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=r=>{_4&&"mouse"===r.pointerType||((r,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let c=r.currentTarget;s.target=c,l(yJ(r.target),"pointerover",t=>{s.isHovered&&s.target&&!__(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:i}),n&&n(!0),a(!0)})(r,r.pointerType)},i.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,n,r,o,s,l,c]);return(0,f4.useEffect)(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,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 _9=(0,f4.createContext)(!1);function ve(e){let t=(t,n)=>(0,f4.useContext)(_9)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,f4.forwardRef)(t)}let vt=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),vn=(0,f4.createContext)({}),vr=ve(function(e,t){var n;[e,t]=yP(e,t,vn);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:o}=r,{buttonProps:i,isPressed:a}=function(e,t){let n,{elementType:r="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:p,onClick:d,href:f,target:h,rel:m,type:g="button"}=e;n="button"===r?{type:g,disabled:o}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?g:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:b,isPressed:y}=_S({onPressStart:a,onPressEnd:s,onPressChange:c,onPress:i,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:u,ref:t}),{focusableProps:v}=_1(e,t);p&&(v.tabIndex=o?-1:v.tabIndex);let A=yS(v,b,yV(e,{labelable:!0}));return{isPressed:y,buttonProps:yS(n,A,{"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:c}=_3(e),{hoverProps:u,isHovered:p}=_7({...e,isDisabled:e.isDisabled||o}),d={isHovered:p,isPressed:(r.isPressed||a)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=yz({...e,values:d,defaultClassName:"react-aria-Button"}),h=yx(i.id),m=yx(),g=i["aria-labelledby"];o&&(g?g=`${g} ${m}`:i["aria-label"]&&(g=`${h} ${m}`));let b=(0,f4.useRef)(o);return(0,f4.useEffect)(()=>{let e={"aria-labelledby":g||h};!b.current&&l&&o?yN(e,"assertive"):b.current&&l&&!o&&yN(e,"assertive"),b.current=o},[o,l,g,h]),f5().createElement("button",{...yV(e,{propNames:vt}),...yS(i,s,u),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":p||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},f5().createElement(yj.Provider,{value:{id:m}},f.children))});(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null),(0,f4.createContext)(null);let vo=(0,f4.createContext)({}),vi=(0,f4.createContext)({}),va=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,vi);let{elementType:n="span",...r}=e;return f5().createElement(n,{className:"react-aria-Text",...r,ref:t})}),vs=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),vl=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function vc(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return vs.has(t.script)}let t=e.split("-")[0];return vl.has(t)}let vu=Symbol.for("react-aria.i18n.locale");function vp(){let e="u">typeof window&&window[vu]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:vc(e)?"rtl":"ltr"}}let vd=vp(),vf=new Set;function vh(){for(let e of(vd=vp(),vf))e(vd)}function vm(){let e=y$(),[t,n]=(0,f4.useState)(vd);return((0,f4.useEffect)(()=>(0===vf.size&&window.addEventListener("languagechange",vh),vf.add(n),()=>{vf.delete(n),0===vf.size&&window.removeEventListener("languagechange",vh)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let vg=f5().createContext(null);function vb(e){let{locale:t,children:n}=e,r=vm(),o=f5().useMemo(()=>t?{locale:t,direction:vc(t)?"rtl":"ltr"}:r,[r,t]);return f5().createElement(vg.Provider,{value:o},n)}function vy(){let e=vm();return(0,f4.useContext)(vg)||e}var v_={};function vv(e,t){return e-t*Math.floor(e/t)}function vA(e,t,n,r){let o=(t=vw(e,t))-1,i=-2;return n<=2?i=0:v$(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)}function v$(e){return e%4==0&&(e%100!=0||e%400==0)}function vw(e,t){return"BC"===e?1-t:t}function vk(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}v_={"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 vx={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 vC{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=vv(t,146097),o=Math.floor(r/36524),i=vv(r,36524),a=Math.floor(i/1461),s=Math.floor(vv(i,1461)/365),[l,c]=vk(400*n+100*o+4*a+s+ +(4!==o&&4!==s)),u=e-vA(l,c,1,1),p=2;e<vA(l,c,3,1)?p=0:v$(c)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-vA(l,c,d,1)+1;return new vK(l,c,d,f)}toJulianDay(e){return vA(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return vx[v$(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return v$(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 vE(e,t){let n=e.copy(),r="hour"in n?vI(n,t):0;vS(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,vD(n),vM(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,vD(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,vD(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let o=n.calendar.getYearsInEra(n);if(n.year>o){var i,a;let e=null==(i=(a=n.calendar).isInverseEra)?void 0:i.call(a,n);n.year=o,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vS(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function vD(e){for(;e.month<1;)vS(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vS(e,1)}function vM(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 vz(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),vM(e)}function vO(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function vP(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),vz(n),n}function vT(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),vB(n),n}function vB(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 vj(e,t){let n=e%t;return n<0&&(n+=t),n}function vI(e,t){let n;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=vj(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=vj(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=vj(e.minute,60),n=Math.floor(e.hour/24),e.hour=vj(e.hour,24),n}function vN(e,t){let n=e.copy();return vI(n,t),n}function vR(e,t,n,r){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=vL(i,n,0,t.length-1,null==r?void 0:r.round),o.era=t[i],vz(o);break}case"year":var i,a;(null==(i=(a=o.calendar).isInverseEra)?void 0:i.call(a,o))&&(n=-n),o.year=vL(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=vL(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=vL(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),vz(o),o}function vF(e,t,n,r){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=vL(t,n,i,a,null==r?void 0:r.round);break}case"minute":o.minute=vL(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=vL(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=vL(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return o}function vL(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function vW(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?v6(vE(Ae(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):v1(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),At(v7(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function vG(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 vV(e){let t,n=At(e,new vC);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function vU(e){return`${vV(e)}T${vG(e)}`}function vq(e){let t,n="object"==typeof e[0]?e.shift():new vC;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var vH=new WeakMap;class vK{copy(){return this.era?new vK(this.calendar,this.era,this.year,this.month,this.day):new vK(this.calendar,this.year,this.month,this.day)}add(e){return vE(this,e)}subtract(e){return vE(this,vO(e))}set(e){return vP(this,e)}cycle(e,t,n){return vR(this,e,t,n)}toDate(e){return v8(this,e)}toString(){return vV(this)}compare(e){return Au(this,e)}constructor(...e){_m(this,vH,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,vz(this)}}var vY=new WeakMap;class vJ{copy(){return new vJ(this.hour,this.minute,this.second,this.millisecond)}add(e){return vN(this,e)}subtract(e){return vN(this,vO(e))}set(e){return vT(this,e)}cycle(e,t,n){return vF(this,e,t,n)}toString(){return vG(this)}compare(e){var t,n;return t=this,n=e,Ap(t)-Ap(n)}constructor(e=0,t=0,n=0,r=0){_m(this,vY,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,vB(this)}}var vZ=new WeakMap;class vX{copy(){return this.era?new vX(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new vX(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return vE(this,e)}subtract(e){return vE(this,vO(e))}set(e){return vP(vT(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return vR(this,e,t,n);default:return vF(this,e,t,n)}}toDate(e,t){return v8(this,e,t)}toString(){return vU(this)}compare(e){var t,n;let r=Au(this,e);return 0===r?(t=this,n=Ae(e),Ap(t)-Ap(n)):r}constructor(...e){_m(this,vZ,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e);this.calendar=t,this.era=n,this.year=r,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,vz(this)}}var vQ=new WeakMap;class v0{copy(){return this.era?new v0(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new v0(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vW(this,e)}subtract(e){return vW(this,vO(e))}set(e,t){let n,r;return 0===(r=vT(vP(n=Ae(this),e),e)).compare(n)?this:At(v7(v6(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,o=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let i=Ae(e),a=At(vT(i,{hour:t}),new vC),s=[v6(a,e.timeZone,"earlier"),v6(a,e.timeZone,"later")].filter(t=>v7(t,e.timeZone).day===a.day)[0],l=At(vT(i,{hour:o}),new vC),c=[v6(l,e.timeZone,"earlier"),v6(l,e.timeZone,"later")].filter(t=>v7(t,e.timeZone).day===l.day).pop(),u=v1(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return At(v7(u=36e5*vL(p,n,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return vF(e,t,n,r);case"era":case"year":case"month":case"day":return At(v7(v6(vR(Ae(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(v1(e)-e.offset)}toString(){var e;let t,n,r;return`${vU(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof v0){var n,r;return e.timeZone===t?e:(n=e,r=t,At(v7(v1(n)-n.offset,r),n.calendar))}return v7(v6(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){_m(this,vQ,{writable:!0,value:void 0});let[t,n,r,o,i]=vq(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,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,vz(this)}}function v1(e){return v2(vw((e=At(e,new vC)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function v2(e,t,n,r,o,i,a){let s=new Date;return s.setUTCHours(r,o,i,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function v3(e,t){if("UTC"===t)return 0;if(e>0&&t===Af())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:o,hour:i,minute:a,second:s}=v5(e,t);return v2(n,r,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let v4=new Map;function v5(e,t){let n=v4.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v4.set(t,n));let r=n.formatToParts(new Date(e)),o={};for(let e of r)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function v6(e,t,n="compatible"){var r,o,i;let a=Ae(e);if("UTC"===t)return v1(a);if(t===Af()&&"compatible"===n){a=At(a,new vC);let e=new Date,t=vw(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=v1(a),l=v3(s-864e5,t),c=v3(s+864e5,t),u=(r=a,((o=s-l)==(i=s-c)?[o]:[o,i]).filter(e=>{var n;let o;return n=r,o=v5(e,t),n.year===o.year&&n.month===o.month&&n.day===o.day&&n.hour===o.hour&&n.minute===o.minute&&n.second===o.second}));if(1===u.length)return u[0];if(u.length>1)switch(n){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function v8(e,t,n="compatible"){return new Date(v6(e,t,n))}function v7(e,t){let n=v3(e,t),r=new Date(e+n),o=r.getUTCFullYear();return new v0(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function v9(e){return new vK(e.calendar,e.era,e.year,e.month,e.day)}function Ae(e,t){let n=0,r=0,o=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:o,millisecond:i}=t),new vX(e.calendar,e.era,e.year,e.month,e.day,n,r,o,i)}function At(e,t){if(Ai(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,vz(r),r}let An={"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 Ar(e,t){return t=At(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Ao(e,t){return Ai(e.calendar,t.calendar)&&Ar(e,t)}function Ai(e,t){var n,r,o,i;return null!=(i=null!=(o=null==(n=e.isEqual)?void 0:n.call(e,t))?o:null==(r=t.isEqual)?void 0:r.call(t,e))?i:e.identifier===t.identifier}let Aa={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function As(e,t,n){let r,o=Math.ceil(e.calendar.toJulianDay(e)+1-(n?Aa[n]:(r=function(e){if(Intl.Locale){let t=Ab.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&Ab.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&An[r]||0))%7;return o<0&&(o+=7),o}function Al(e){return v7(Date.now(),e)}function Ac(e){return v9(Al(e))}function Au(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ap(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let Ad=null;function Af(){return null==Ad&&(Ad=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ad}function Ah(e){return e.subtract({days:e.day-1})}function Am(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ag(e,t,n){let r=As(e,t,n);return e.subtract({days:r})}let Ab=new Map;function Ay(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function A_(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let Av=Symbol.for("react-aria.i18n.locale"),AA=Symbol.for("react-aria.i18n.strings");class A${getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[Av];if(void 0===f){let e=window[AA];if(!e)return null;for(let n in f={},e)f[n]=new A$({[t]:e[n]},t)}let n=null==f?void 0:f[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let Aw=new Map,Ak=new Map;class Ax{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+n,i=Aw.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:n}),Aw.set(o,i)),"function"==typeof(r=t[i.select(e)]||t.other)?r():r}number(e){let t=Ak.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Ak.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}let AC=new WeakMap;function AE(e,t){let n;return t&&A$.getGlobalDictionaryForPackage(t)||((n=AC.get(e))||(n=new A$(e),AC.set(e,n)),n)}function AS(e,t){let{locale:n}=vy(),r=AE(e,t);return(0,f4.useMemo)(()=>new Ax(n,r),[n,r])}let AD=new Map;class AM{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 n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==AT&&(AT="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),AT&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=AO(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=AO(e,t),this.options=t}}let Az={true:{ja:"h11"},false:{}};function AO(e,t={}){if("boolean"==typeof t.hour12&&(null==AP&&(AP="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),AP)){let n=Az[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=null!=n?n:r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(AD.has(n))return AD.get(n);let r=new Intl.DateTimeFormat(e,t);return AD.set(n,r),r}let AP=null,AT=null;function AB(e,t){let n=(0,f4.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function Aj(e){e=AB(null!=e?e:{},AI);let{locale:t}=vy();return(0,f4.useMemo)(()=>new AM(t,e),[t,e])}function AI(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function AN(e){return e&&e.__esModule?e.default:e}let AR=new WeakMap;function AF(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function AL(e,t,n,r){let o=AS(AN(v_),"@react-aria/calendar"),i=AF(e)||AF(t),a=Aj({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n}),s=Aj({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n});return(0,f4.useMemo)(()=>{if(Ar(e,Ah(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),Ar(t,Am(e)))return a.format(i.toDate(n));if(Ar(t,Am(t)))return r?AW(a,o,i,s,n):a.formatRange(i.toDate(n),s.toDate(n))}return r?AW(s,o,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,a,s,o,n,r])}function AW(e,t,n,r,o){let i=e.formatRangeToParts(n.toDate(o),r.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 AG(e,t){let n=(0,f4.useRef)(!0),r=(0,f4.useRef)(null);(0,f4.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,f4.useEffect)(()=>{let o=r.current;n.current?n.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),r.current=t},t)}function AV(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=yx(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function AU(e,t){var n,r;let o,i,a,s,l,c=AS((n=v_)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=yV(e),p=AL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=AL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);AG(()=>{t.isFocused||yN(d)},[d]);let f=(a=AS(AN(v_),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:i}=t.highlightedRange||{}:o=i=null!=(r=t.value)?r:void 0,s=Aj({weekday:"long",month:"long",year:"numeric",day:"numeric",era:AF(o)||AF(i),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,f4.useMemo)(()=>{if(!l&&o&&i)if(Ar(o,i)){let e=s.format(o.toDate(t.timeZone));return a.format("selectedDateDescription",{date:e})}else{let e=AW(s,a,o,i,t.timeZone);return a.format("selectedRangeDescription",{dateRange:e})}return""},[o,i,l,t.timeZone,a,s]));AG(()=>{f&&yN(f,"polite",4e3)},[f]);let h=yC([!!e.errorMessage,e.isInvalid,e.validationState]);AR.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,g]=(0,f4.useState)(!1),b=e.isDisabled||t.isNextVisibleRangeInvalid();b&&m&&(g(!1),t.setFocused(!0));let[y,v]=(0,f4.useState)(!1),A=e.isDisabled||t.isPreviousVisibleRangeInvalid();return A&&y&&(v(!1),t.setFocused(!0)),{calendarProps:yS(u,AV({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":c.format("next"),isDisabled:b,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:A,onFocusChange:v},errorMessageProps:{id:h},title:p}}let Aq={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 AH(e){let{children:t,elementType:n="div",isFocusable:r,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:n}=e,[r,o]=(0,f4.useState)(!1),{focusWithinProps:i}=_2({isDisabled:!n,onFocusWithinChange:e=>o(e)}),a=(0,f4.useMemo)(()=>r?t:t?{...Aq,...t}:Aq,[r]);return{visuallyHiddenProps:{...i,style:a}}}(e);return f5().createElement(n,yS(i,a),t)}function AK(e,t,n,r){let o=yf(n),i=null==n;(0,f4.useEffect)(()=>{if(i||!e.current)return;let n=e.current;return n.addEventListener(t,o,r),()=>{n.removeEventListener(t,o,r)}},[e,t,r,i,o])}let AY=0,AJ=new Map;function AZ(e){let[t,n]=(0,f4.useState)();return yd(()=>{if(!e)return;let t=AJ.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${AY++}`;n(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},AJ.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),AJ.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function AX(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function AQ(e,t,n){let r="left"===n?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function A0(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;)AX(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let n=AQ(e,t,"left"),r=AQ(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:u,scrollPaddingRight:p,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),h=a+parseInt(c,10),m=s+parseInt(l,10),g=h+e.clientWidth,b=m+e.clientHeight,y=parseInt(u,10)||0,v=parseInt(d,10)||0,A=parseInt(p,10)||0,$=parseInt(f,10)||0;n<=a+$?a=n-parseInt(c,10)-$:n+o>g-A&&(a+=n+o-g+A),r<=m+y?s=r-parseInt(l,10)-y:r+i>b-v&&(s+=r+i-b+v),e.scrollLeft=a,e.scrollTop=s}(t,e);else{var n,r,o,i;let{left:a,top:s}=e.getBoundingClientRect();null==e||null==(n=e.scrollIntoView)||n.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(a-l)>1||Math.abs(s-c)>1)&&(null==t||null==(o=t.containingElement)||null==(r=o.scrollIntoView)||r.call(o,{block:"center",inline:"center"}),null==(i=e.scrollIntoView)||i.call(e,{block:"nearest"}))}}}function A1(e,t){let n=e;for(AX(n,t)&&(n=n.parentElement);n&&!AX(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}class A2 extends vC{fromJulianDay(e){let t=super.fromJulianDay(e);return new vK(this,vw(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(A3(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(A3(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function A3(e){let[t,n]=vk(e.year+-543);return new vK(t,n,e.month,e.day)}function A4(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function A5(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-A4(e,n,1,1))/30),o=t+1-A4(e,n,r,1);return[n,r,o]}function A6(e){return Math.floor(e%4/3)}function A8(e,t){return t%13!=0?30:A6(e)+5}class A7{fromJulianDay(e){let[t,n,r]=A5(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new vK(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),A4(1723856,t,e.month,e.day)}getDaysInMonth(e){return A8(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+A6(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class A9 extends A7{fromJulianDay(e){let[t,n,r]=A5(1723856,e);return new vK(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class $e extends A7{fromJulianDay(e){let[t,n,r]=A5(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new vK(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),A4(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),A8(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 $t=765433;function $n(e){return 7>vv(7*e+1,19)}function $r(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>vv(3*(n+1),7)&&(n+=1),n}function $o(e){let t,n;return $r(e)+(t=$r(e-1),n=$r(e),$r(e+1)-n==356?2:+(n-t==382))}function $i(e){return $o(e+1)-$o(e)}function $a(e,t){if(t>=6&&!$n(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=$i(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!$n(e):30}class $s{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/$t*19+234)/235)+1,r=$o(n),o=Math.floor(t-r);for(;o<1;)o=Math.floor(t-(r=$o(--n)));let i=1,a=0;for(;a<o;)a+=$a(n,i),i++;let s=o-(a-=$a(n,--i));return new vK(this,n,i,s)}toJulianDay(e){let t=$o(e.year);for(let n=1;n<e.month;n++)t+=$a(e.year,n);return t+e.day+347997}getDaysInMonth(e){return $a(e.year,e.month)}getMonthsInYear(e){return $n(e.year)?13:12}getDaysInYear(e){return $i(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&($n(t.year)&&!$n(e.year)&&t.month>6?e.month--:!$n(t.year)&&$n(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class $l extends vC{fromJulianDay(e){let t,n,r,o=super.fromJulianDay(e),i=o.year-78,a=e-vA(o.era,o.year,1,1);if(a<80?(i--,a+=(t=v$(o.year-1)?31:30)+155+90+10):(t=v$(o.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new vK(this,i,n,r)}toJulianDay(e){let t,n,[r,o]=vk(e.year+78);return(v$(o)?(t=31,n=vA(r,o,3,21)):(t=30,n=vA(r,o,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&v$(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 $c(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function $u(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+$c(t,r,1,1)))/29.5)+1),i=n-$c(t,r,o,1)+1;return new vK(e,r,o,i)}function $p(e){return(14+11*e)%30<11}class $d{fromJulianDay(e){return $u(this,1948440,e)}toJulianDay(e){return $c(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&$p(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return $p(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class $f extends $d{fromJulianDay(e){return $u(this,1948439,e)}toJulianDay(e){return $c(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function $h(e){return 460322+c[e-1300]}function $m(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function $g(e,t){let n=$h(e);for(let r=1;r<t;r++)n+=$m(e,r);return n}function $b(e){return c[e+1-1300]-c[e-1300]}class $y extends $d{fromJulianDay(e){let t=e-1948440,n=$h(1300),r=$h(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-$h(++e)+1;let o=$b(e);if(r===o){n=12;break}if(r<o){let t=$m(e,n);for(n=1;r>t;)r-=t,t=$m(e,++n);break}}return new vK(this,e,n,t-$g(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+$g(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):$m(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):$b(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=$m(t,n)}}}}let $_=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],$v=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$A=[1867,1911,1925,1988,2018],$$=["meiji","taisho","showa","heisei","reiwa"];function $w(e){let t=$_.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?$_.length-1:0===t?0:t-1}function $k(e){let t=$A[$$.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new vK(e.year+t,e.month,e.day)}class $x extends vC{fromJulianDay(e){let t=super.fromJulianDay(e),n=$w(t);return new vK(this,$$[n],t.year-$A[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay($k(e))}balanceDate(e){let t=$k(e),n=$w(t);$$[n]!==e.era&&(e.era=$$[n],e.year=t.year-$A[n]),this.constrainDate(e)}constrainDate(e){let t=$$.indexOf(e.era),n=$v[t];if(null!=n){let[r,o,i]=n,a=r-$A[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[,n,r]=$_[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return $$}getYearsInEra(e){let t=$$.indexOf(e.era),n=$_[t],r=$_[t+1];if(null==r)return 9999-n[0]+1;let o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth($k(e))}getMinimumMonthInYear(e){let t=$C(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=$C(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function $C(e){if(1===e.year)return $_[$$.indexOf(e.era)]}let $E=[0,31,62,93,124,155,186,216,246,276,306,336];class $S{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),i=r-$E[o]+1;return new vK(this,n,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=$E[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>vv(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function $D(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function $M(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class $z extends vC{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=$M(vw(t.era,t.year));return new vK(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay($O(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=$M($D(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth($O(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function $O(e){let[t,n]=vk($D(e));return new vK(t,n,e.month,e.day)}function $P(e){switch(e){case"buddhist":return new A2;case"ethiopic":return new A7;case"ethioaa":return new A9;case"coptic":return new $e;case"hebrew":return new $s;case"indian":return new $l;case"islamic-civil":return new $d;case"islamic-tbla":return new $f;case"islamic-umalqura":return new $y;case"japanese":return new $x;case"persian":return new $S;case"roc":return new $z;default:return new vC}}function $T(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function $B(e,t,n,r,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=$j(e,t,n).subtract(i);return $N(e,a,t,n,r,o)}function $j(e,t,n,r,o){let i=e;if(t.years)i=Ah(e.subtract({months:e.month-1}));else t.months?i=Ah(e):t.weeks&&(i=Ag(e,n));return $N(e,i,t,n,r,o)}function $I(e,t,n,r,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=$j(e,t,n).subtract(i);return $N(e,a,t,n,r,o)}function $N(e,t,n,r,o,i){if(o&&e.compare(o)>=0){let e=A_(t,$j(v9(o),n,r));e&&(t=e)}if(i&&0>=e.compare(i)){let e=Ay(t,$I(v9(i),n,r));e&&(t=e)}return t}function $R(e,t,n){if(t){let n=A_(e,v9(t));n&&(e=n)}if(n){let t=Ay(e,v9(n));t&&(e=t)}return e}function $F(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function $L(e,t,n){let[r,o]=(0,f4.useState)(e||t),i=(0,f4.useRef)(void 0!==e),a=void 0!==e;(0,f4.useEffect)(()=>{i.current,i.current=a},[a]);let s=a?e:r,l=(0,f4.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),a||(s=e)};"function"==typeof e?o((n,...o)=>{let i=e(a?s:n,...o);return(r(i,...t),a)?n:i}):(a||o(e),r(e,...t))},[a,s,n]);return[s,l]}function $W(e){var t,n,r;let o=(0,f4.useMemo)(()=>new AM(e.locale),[e.locale]),i=(0,f4.useMemo)(()=>o.resolvedOptions(),[o]),{locale:a,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:u,selectionAlignment:p,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,f4.useMemo)(()=>s(i.calendar),[s,i.calendar]),[g,b]=$L(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),y=(0,f4.useMemo)(()=>g?At(v9(g),m):null,[g,m]),v=(0,f4.useMemo)(()=>g&&"timeZone"in g?g.timeZone:i.timeZone,[g,i.timeZone]),[A,$]=$L((0,f4.useMemo)(()=>e.focusedValue?$R(At(v9(e.focusedValue),m),c,u):void 0,[e.focusedValue,m,c,u]),(0,f4.useMemo)(()=>$R(e.defaultFocusedValue?At(v9(e.defaultFocusedValue),m):y||At(Ac(v),m),c,u),[e.defaultFocusedValue,y,v,m,c,u]),e.onFocusChange),[w,k]=(0,f4.useState)(()=>{switch(p){case"start":return $j(A,l,a,c,u);case"end":return $I(A,l,a,c,u);default:return $B(A,l,a,c,u)}}),[x,C]=(0,f4.useState)(e.autoFocus||!1),E=(0,f4.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,w.add(e)},[w,l]),[S,D]=(0,f4.useState)(m);if(!Ai(m,S)){let e=At(A,m);k($B(e,l,a,c,u)),$(e),D(m)}function M(e){$(e=$R(e,c,u))}function z(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void b(null);(e=$F(e=$R(e,c,u),w,d))&&(e=At(e,(null==g?void 0:g.calendar)||new vC),g&&"hour"in g?b(g.set(e)):b(e))}}$T(A,c,u)?$($R(A,c,u)):0>A.compare(w)?k($I(A,l,a,c,u)):A.compare(E)>0&&k($j(A,l,a,c,u));let O=(0,f4.useMemo)(()=>!!y&&(!!(d&&d(y))||$T(y,c,u)),[y,d,c,u]),P=e.isInvalid||"invalid"===e.validationState||O,T=(0,f4.useMemo)(()=>"visible"===f?l:$G(l),[f,l]);return{isDisabled:null!=(n=e.isDisabled)&&n,isReadOnly:null!=(r=e.isReadOnly)&&r,value:y,setValue:z,visibleRange:{start:w,end:E},minValue:c,maxValue:u,focusedDate:A,timeZone:v,validationState:P?"invalid":null,isValueInvalid:P,setFocusedDate(e){M(e),C(!0)},focusNextDay(){M(A.add({days:1}))},focusPreviousDay(){M(A.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&M(A.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&M(A.subtract({weeks:1}))},focusNextPage(){let e=w.add(T);$($R(A.add(T),c,u)),k($j($N(A,e,T,a,c,u),T,a))},focusPreviousPage(){let e=w.subtract(T);$($R(A.subtract(T),c,u)),k($j($N(A,e,T,a,c,u),T,a))},focusSectionStart(){l.days?M(w):l.weeks?M(Ag(A,a)):(l.months||l.years)&&M(Ah(A))},focusSectionEnd(){l.days?M(E):l.weeks?M(Ag(A,a,void 0).add({days:6})):(l.months||l.years)&&M(Am(A))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?M(A.add({months:1})):(l.months||l.years)&&M(A.add({years:1})):M(A.add($G(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?M(A.subtract({months:1})):(l.months||l.years)&&M(A.subtract({years:1})):M(A.subtract($G(l)))},selectFocusedDate(){d&&d(A)||z(A)},selectDate(e){z(e)},isFocused:x,setFocused:C,isInvalid:e=>$T(e,c,u),isSelected(e){return null!=y&&Ar(e,y)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&A&&Ar(e,A),isCellDisabled(t){return e.isDisabled||0>t.compare(w)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=w.subtract({days:1});return Ar(e,w)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return Ar(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=w){let n=t.add({weeks:e}),r=[],o=As(n=Ag(n,a,h),a,h);for(let e=0;e<o;e++)r.push(null);for(;r.length<7;){r.push(n);let e=n.add({days:1});if(Ar(n,e))break;n=e}for(;r.length<7;)r.push(null);return r}}}function $G(e){let t={...e};for(let n in e)t[n]=1;return t}function $V(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:v9(e),end:v9(t)}):null}function $U(e,t){return(e=At(e,(null==t?void 0:t.calendar)||new vC),t&&"hour"in t)?t.set(e):e}function $q(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let $H=(0,f4.createContext)(null),$K=(0,f4.createContext)(null),$Y=(0,f4.createContext)(null),$J=(0,f4.createContext)(null),$Z=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,$H);let{locale:n}=vy(),r=$W({...e,locale:n,createCalendar:e.createCalendar||$P}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=AU(e,r),c=yz({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return f5().createElement("div",{...c,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},f5().createElement(yM,{values:[[vn,{slots:{previous:i,next:a}}],[vo,{"aria-hidden":!0,level:2,children:l}],[$Y,r],[$H,e],[vi,{slots:{errorMessage:s}}]]},f5().createElement(AH,null,f5().createElement("h2",null,o["aria-label"])),c.children,f5().createElement(AH,null,f5().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),$X=(0,f4.forwardRef)(function(e,t){var n,r;let o,i,a;[e,t]=yP(e,t,$K);let{locale:s}=vy(),l=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...c}=e,[u,p]=$L(t,n||null,r),[d,f]=(0,f4.useState)(null),h="center";if(u&&u.start&&u.end){let e=$B(v9(u.start),a,i,s,l).add(a).subtract({days:1});u.end.compare(e)>0&&(h="start")}let m=(0,f4.useRef)(null),[g,b]=(0,f4.useState)(null),y=(0,f4.useMemo)(()=>A_(s,null==g?void 0:g.start),[s,g]),v=(0,f4.useMemo)(()=>Ay(l,null==g?void 0:g.end),[l,g]),A=$W({...c,value:u&&u.start,createCalendar:o,locale:i,visibleDuration:a,minValue:y,maxValue:v,selectionAlignment:h}),$=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:$q(t,A,-1),end:$q(t,A,1)},b(m.current)):(m.current=null,b(null))},[w,k]=(0,f4.useState)(A.visibleRange);Ao(A.visibleRange.start,w.start)&&Ao(A.visibleRange.end,w.end)||($(d),k(A.visibleRange));let x=e=>{e?(f(e),$(e)):(f(null),$(null))},C=d?$V(d,A.focusedDate):u&&$V(u.start,u.end),E=t=>{if(e.isReadOnly)return;let n=$F($R(t,y,v),A.visibleRange.start,e.isDateUnavailable);if(n)if(d){let e=$V(d,n);e&&p({start:$U(e.start,null==u?void 0:u.start),end:$U(e.end,null==u?void 0:u.end)}),x(null)}else x(n)},[S,D]=(0,f4.useState)(!1),{isDateUnavailable:M}=e,z=(0,f4.useMemo)(()=>!!u&&!d&&(!!(M&&(M(u.start)||M(u.end)))||$T(u.start,s,l)||$T(u.end,s,l)),[M,u,d,s,l]),O=e.isInvalid||"invalid"===e.validationState||z;return{...A,value:u,setValue:p,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:O?"invalid":null,isValueInvalid:O,selectFocusedDate(){E(A.focusedDate)},selectDate:E,highlightDate(e){d&&A.setFocusedDate(e)},isSelected:e=>!!(C&&e.compare(C.start)>=0&&0>=e.compare(C.end)&&!A.isCellDisabled(e)&&!A.isCellUnavailable(e)),isInvalid(e){var t,n;return A.isInvalid(e)||$T(e,null==(t=m.current)?void 0:t.start,null==(n=m.current)?void 0:n.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||$P}),{calendarProps:c,prevButtonProps:u,nextButtonProps:p,errorMessageProps:d,title:f}=(n=e,r=t,o=AU(n,l),i=(0,f4.useRef)(!1),AK(a=(0,f4.useRef)("u">typeof window?window:null),"pointerdown",e=>{i.current=0===e.width&&0===e.height}),AK(a,"pointerup",e=>{if(i.current){i.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;r.current&&r.current.contains(document.activeElement)&&(!r.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&r.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},AK(r,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=yz({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return f5().createElement("div",{...h,...c,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},f5().createElement(yM,{values:[[vn,{slots:{previous:u,next:p}}],[vo,{"aria-hidden":!0,level:2,children:f}],[$J,l],[$K,e],[vi,{slots:{errorMessage:d}}]]},f5().createElement(AH,null,f5().createElement("h2",null,c["aria-label"])),h.children,f5().createElement(AH,null,f5().createElement("button",{"aria-label":p["aria-label"],disabled:p.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),$Q=(0,f4.createContext)(null),$0=(0,f4.forwardRef)(function(e,t){var n,r;let o=(0,f4.useContext)($Y),i=(0,f4.useContext)($J),a=yO($H),s=yO($K),l=null!=o?o:i,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let u=null!=(n=null==a?void 0:a.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:p,headerProps:d,weekDays:f,weeksInMonth:h}=function(e,t){let n,{startDate:r=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=vy(),s=AL(r,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=AR.get(t),u=AV({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),p=Aj({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=vy(),f=(0,f4.useMemo)(()=>{let e=Ag(Ac(t.timeZone),d,i);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return p.format(r)})},[d,t.timeZone,p,i]),h=(n=r.calendar.getDaysInMonth(r),Math.ceil((As(Ah(r),d,i)+n)/7));return{gridProps:yS(u,{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:f,weeksInMonth:h}}({startDate:c,endDate:Am(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:u},l);return f5().createElement($Q.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:h}},f5().createElement("table",{...yV(e),...p,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:f5().createElement(f5().Fragment,null,f5().createElement($1,null,e=>f5().createElement($2,null,e)),f5().createElement($3,null,e.children))))}),$1=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,{headerProps:i,weekDays:a}=(0,f4.useContext)($Q);return f5().createElement("thead",{...yV(e),...i,ref:t,style:r,className:o||"react-aria-CalendarGridHeader"},f5().createElement("tr",null,a.map((e,t)=>f5().cloneElement(n(e),{key:t}))))}),$2=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e;return f5().createElement("th",{...yV(e),ref:t,style:r,className:o||"react-aria-CalendarHeaderCell"},n)}),$3=(0,f4.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,i=(0,f4.useContext)($Y),a=(0,f4.useContext)($J),s=null!=i?i:a,{startDate:l,weeksInMonth:c}=(0,f4.useContext)($Q);return f5().createElement("tbody",{...yV(e),ref:t,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>f5().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?f5().cloneElement(n(e),{key:t}):f5().createElement("td",{key:t})))))}),$4=(0,f4.forwardRef)(function({date:e,...t},n){var r,o,i;let a=(0,f4.useContext)($Y),s=(0,f4.useContext)($J),l=null!=a?a:s,{startDate:c}=null!=(r=(0,f4.useContext)($Q))?r:{startDate:l.visibleRange.start},u=(0,f4.useRef)(null),{cellProps:p,buttonProps:d,...f}=function(e,t,n){var r;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=AR.get(t),c=AS((r=v_)&&r.__esModule?r.default:r,"@react-aria/calendar"),u=Aj({weekday:"long",day:"numeric",month:"long",year:"numeric",era:AF(i),timeZone:t.timeZone}),p=t.isSelected(i),d=t.isCellFocused(i);a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&Ar(t.value,i));m&&(p=!0),i=AB(i,Ao);let g=(0,f4.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),b=Ar(i,Ac(t.timeZone)),y=(0,f4.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Ar(i,t.value.start)||Ar(i,t.value.end))&&(e=l+", "),e+=u.format(g),b?e=c.format(p?"todayDateSelected":"todayDate",{date:e}):p&&(e=c.format("dateSelected",{date:e})),t.minValue&&Ar(i,t.minValue)?e+=", "+c.format("minimumDate"):t.maxValue&&Ar(i,t.maxValue)&&(e+=", "+c.format("maximumDate")),e},[u,g,c,p,b,i,t,l]),v="";"anchorDate"in t&&d&&!t.isReadOnly&&h&&(v=t.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let A=AZ(v),$=(0,f4.useRef)(!1),w=(0,f4.useRef)(!1),k=(0,f4.useRef)(void 0),{pressProps:x,isPressed:C}=_S({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(Ar(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setDragging(!0),w.current=!0;return}else if(Ar(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setDragging(!0),w.current=!0;return}}let n=()=>{t.setDragging(!0),k.current=void 0,t.selectDate(i),t.setFocusedDate(i),$.current=!0};"touch"===e.pointerType?k.current=setTimeout(n,200):n()}},onPressEnd(){w.current=!1,$.current=!1,clearTimeout(k.current),k.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&k.current&&(t.selectDate(i),t.setFocusedDate(i)),"anchorDate"in t))if(w.current)t.setAnchorDate(i);else if(t.anchorDate&&!$.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=Ar(i,t.focusedDate)?0:-1),(0,f4.useEffect)(()=>{d&&n.current&&(yX(n.current),"pointer"!==_B&&document.activeElement===n.current&&A0(n.current,{containingElement:A1(n.current)}))},[d,n]);let E=Aj({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),S=(0,f4.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":p||void 0,"aria-invalid":m||void 0},buttonProps:yS(x,{onFocus(){a||t.setFocusedDate(i)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":y,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,A["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:C,isFocused:d,isSelected:p,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:S}}({date:e},l,u),{hoverProps:h,isHovered:m}=_7({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:b}=_3();b&&(b=f.isFocused);let y=(o=c,i=At(i=e,o.calendar),o=Ah(o),i=Ah(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,A=!1;"highlightedRange"in l&&l.highlightedRange&&(v=Ar(e,l.highlightedRange.start),A=Ar(e,l.highlightedRange.end));let $=yz({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:y,isFocusVisible:b,isSelectionStart:v,isSelectionEnd:A,...f}}),w={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":b||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":y||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":A||void 0,"data-invalid":f.isInvalid||void 0};return f5().createElement("td",{...p,ref:n},f5().createElement("div",{...yS(yV(t),d,g,h,w,$),ref:u}))}),$5=(0,f4.createContext)({}),$6=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,$5);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:u,isHovered:p}=_7({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:d,isFocusVisible:f,focusProps:h}=_3({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=yz({...e,values:{isHovered:p,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return f5().createElement("div",{...yS(c,h,u),...m,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":d||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),$8=(0,f4.createContext)({}),$7=ve(function(e,t){[e,t]=yP(e,t,$8);let{hoverProps:n,isHovered:r}=_7(e),{isFocused:o,isFocusVisible:i,focusProps:a}=_3({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=yz({...e,values:{isHovered:r,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return f5().createElement("input",{...yS((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...o}=e;return o})(e),a,n),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});var $9={};$9={"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 we=f5().createContext(null),wt="react-aria-focus-scope-restore",wn=null;function wr(e){var t,n,r,o,i,a,s,l,c,u;let p,d,f,h,{children:m,contain:g,restoreFocus:b,autoFocus:y}=e,v=(0,f4.useRef)(null),A=(0,f4.useRef)(null),$=(0,f4.useRef)([]),{parentNode:w}=(0,f4.useContext)(we)||{},k=(0,f4.useMemo)(()=>new wy({scopeRef:$}),[$]);yd(()=>{let e=w||w_.root;if(w_.getTreeNode(e.scopeRef)&&wn&&!wl(wn,e.scopeRef)){let t=w_.getTreeNode(wn);t&&(e=t)}e.addChild(k),w_.addNode(k)},[k,w]),yd(()=>{let e=w_.getTreeNode($);e&&(e.contain=!!g)},[g]),yd(()=>{var e;let t=null==(e=v.current)?void 0:e.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==A.current;)n.push(t),t.addEventListener(wt,r),t=t.nextSibling;return $.current=n,()=>{for(let e of n)e.removeEventListener(wt,r)}},[m]),yd(()=>{if(n||r)return;let e=t.current,o=yJ(e?e[0]:void 0),i=e=>{let n=_v(e);wa(n,t.current)?wn=t:ws(n)||(wn=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=$,n=b,r=g]),o=$,i=g,p=(0,f4.useRef)(void 0),d=(0,f4.useRef)(void 0),yd(()=>{let e=o.current;if(!i){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let t=yJ(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!wi(o)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=o.current;if(!r||!wa(n,r))return;let i=wh(wo(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&wc(a,!0)},r=e=>{(!wn||wl(wn,o))&&wa(_v(e),o.current)?(wn=o,p.current=_v(e)):wi(o)&&!ws(_v(e),o)?p.current?p.current.focus():wn&&wn.current&&wp(wn.current):wi(o)&&(p.current=_v(e))},a=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let n=_B,r=("virtual"===n||null===n)&&_r()&&_n(),i=((e=document)=>e.activeElement)(t);if(!r&&i&&wi(o)&&!ws(i,o)){wn=o;let t=_v(e);if(t&&t.isConnected){var a;p.current=t,null==(a=p.current)||a.focus()}else wn.current&&wp(wn.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),yd(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),a=$,s=b,l=g,f=(0,f4.useRef)("u">typeof document?((e=document)=>e.activeElement)(yJ(a.current?a.current[0]:void 0)):null),yd(()=>{let e=a.current,t=yJ(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!wn||wl(wn,a))&&wa(((e=document)=>e.activeElement)(t),a.current)&&(wn=a)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[a,l]),yd(()=>{let e=yJ(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!wi(a)||t.isComposing)return;let n=e.activeElement;if(!ws(n,a)||!wd(a))return;let r=w_.getTreeNode(a);if(!r)return;let o=r.nodeToRestore,i=wh(e.body,{tabbable:!0});i.currentNode=n;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!ws(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(ws(s,a));(t.preventDefault(),t.stopPropagation(),s)?wc(s,!0):ws(o)?wc(o,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),yd(()=>{var e;let t=yJ(a.current?a.current[0]:void 0);if(!s)return;let n=w_.getTreeNode(a);if(n)return n.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=w_.getTreeNode(a);if(!e)return;let n=e.nodeToRestore,r=((e=document)=>e.activeElement)(t);if(s&&n&&(r&&ws(r,a)||r===t.body&&wd(a))){let e=w_.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(a);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void wf(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(a);t;){if(t.scopeRef&&t.scopeRef.current&&w_.getTreeNode(t.scopeRef))return void wf(wu(t.scopeRef.current,!0));t=t.parent}}})}}},[a,s]),c=$,u=y,h=f5().useRef(u),(0,f4.useEffect)(()=>{h.current&&(wn=c,!wa(((e=document)=>e.activeElement)(yJ(c.current?c.current[0]:void 0)),wn.current)&&c.current&&wp(c.current)),h.current=!1},[c]),(0,f4.useEffect)(()=>{let e=((e=document)=>e.activeElement)(yJ($.current?$.current[0]:void 0)),t=null;if(wa(e,$.current)){for(let n of w_.traverse())n.scopeRef&&wa(e,n.scopeRef.current)&&(t=n);t===w_.getTreeNode($)&&(wn=t.scopeRef)}},[$]),yd(()=>()=>{var e,t,n;let r=null!=(n=null==(t=w_.getTreeNode($))||null==(e=t.parent)?void 0:e.scopeRef)?n:null;($===wn||wl($,wn))&&(!r||w_.getTreeNode(r))&&(wn=r),w_.removeTreeNode($)},[$]);let x=(0,f4.useMemo)(()=>{var e;return e=$,{focusNext(t={}){var n;let r=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(yJ(null!=(n=r[0])?n:void 0)),c=r[0].previousElementSibling,u=wh(wo(r),{tabbable:i,accept:s},r);u.currentNode=wa(l,r)?l:c;let p=u.nextNode();return!p&&a&&(u.currentNode=c,p=u.nextNode()),p&&wc(p,!0),p},focusPrevious(t={}){var n;let r=e.current,{from:o,tabbable:i,wrap:a,accept:s}=t,l=o||((e=document)=>e.activeElement)(yJ(null!=(n=r[0])?n:void 0)),c=r[r.length-1].nextElementSibling,u=wh(wo(r),{tabbable:i,accept:s},r);u.currentNode=wa(l,r)?l:c;let p=u.previousNode();return!p&&a&&(u.currentNode=c,p=u.previousNode()),p&&wc(p,!0),p},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=wh(wo(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&wc(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=wh(wo(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&wc(a,!0),a}}},[]),C=(0,f4.useMemo)(()=>({focusManager:x,parentNode:k}),[k,x]);return f5().createElement(we.Provider,{value:C},f5().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,f5().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:A}))}function wo(e){return e[0].parentElement}function wi(e){let t=w_.getTreeNode(wn);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wa(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function ws(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of w_.traverse(w_.getTreeNode(t)))if(n&&wa(e,n.current))return!0;return!1}function wl(e,t){var n;let r=null==(n=w_.getTreeNode(t))?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function wc(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{_Z(e)}catch{}}function wu(e,t=!0){let n=e[0].previousElementSibling,r=wo(e),o=wh(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&((o=wh(r=wo(e),{tabbable:!1},e)).currentNode=n,i=o.nextNode()),i}function wp(e,t=!0){wc(wu(e,t))}function wd(e){let t=w_.getTreeNode(wn);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function wf(e){e.dispatchEvent(new CustomEvent(wt,{bubbles:!0,cancelable:!0}))&&wc(e)}function wh(e,t,n){var r,o,i;let a=(null==t?void 0:t.tabbable)?yY:yK,s=yJ((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(r=e||s,o=NodeFilter.SHOW_ELEMENT,i={acceptNode(e){var r;return(null==t||null==(r=t.from)?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:a(e)&&function e(t,n){return"#comment"!==t.nodeName&&function(e){let t=yZ(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o="none"!==n&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);o="none"!==n&&"hidden"!==r&&"collapse"!==r}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!n||"SUMMARY"===n.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!n||wa(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(r,o,i));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function wm(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(yJ(r)),c=wh(r,{tabbable:i,accept:s});r.contains(l)&&(c.currentNode=l);let u=c.nextNode();return!u&&a&&(c.currentNode=r,u=c.nextNode()),u&&wc(u,!0),u},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(yJ(r)),c=wh(r,{tabbable:i,accept:s});if(r.contains(l))c.currentNode=l;else{let e=wg(c);return e&&wc(e,!0),null!=e?e:null}let u=c.previousNode();if(!u&&a){c.currentNode=r;let e=wg(c);if(!e)return null;u=e}return u&&wc(u,!0),null!=u?u:null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=wh(r,{tabbable:o,accept:i}).nextNode();return a&&wc(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=wg(wh(r,{tabbable:o,accept:i}));return a&&wc(a,!0),null!=a?a:null}}}function wg(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class wb{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let o=new wy({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&wa(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.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 n=new wb;for(let r of this.traverse())n.addTreeNode(r.scopeRef,null!=(t=null==(e=r.parent)?void 0:e.scopeRef)?t:null,r.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new wy({scopeRef:null}),this.fastMap.set(null,this.root)}}class wy{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 w_=new wb;function wv(e,t,n){let{direction:r}=vy(),o=(0,f4.useMemo)(()=>wm(t),[t]),i=()=>{var e;if(!t.current)return;let n=null==(e=window.event)?void 0:e.target,r=wh(t.current,{tabbable:!0});if(n&&(r.currentNode=n,n=r.previousNode()),!n){let e;do(e=r.lastChild())&&(n=e);while(e)}for(;null==n?void 0:n.hasAttribute("data-placeholder");){let e=r.previousNode();if(e&&e.hasAttribute("data-placeholder"))n=e;else break}n&&n.focus()},{pressProps:a}=_S({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){"mouse"!==e.pointerType&&i()}});return yS(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)),!n))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=i.target,n=wA(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=i.target,n=wA(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else o.focusNext()}}})}function wA(e,t,n){let r=wh(e,{tabbable:!0}),o=r.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<a&&(i=o,a=s),o=r.nextNode()}return i}function w$(e,t,n){let r=(0,f4.useRef)(t),o=yf(()=>{n&&n(r.current)});(0,f4.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",o),()=>{null==n||n.removeEventListener("reset",o)}},[e,o])}function ww(e){let{description:t,errorMessage:n,isInvalid:r,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=yx(t);let a=yx(),s={};return n&&(r=r?`${a} ${r}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:AV({id:t,"aria-label":o,"aria-labelledby":r})}}(e),s=yC([!!t,!!n,r,o]),l=yC([!!t,!!n,r,o]);return{labelProps:i,fieldProps:a=yS(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function wk(e,t,n){let{validationBehavior:r,focus:o}=e;yd(()=>{if("native"===r&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let r,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(o),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=yf(()=>{t.resetValidation()}),a=yf(e=>{var r,i;t.displayValidation.isInvalid||t.commitValidation();let a=null==n||null==(r=n.current)?void 0:r.form;!e.defaultPrevented&&n&&a&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(a)===n.current&&(o?o():null==(i=n.current)||i.focus(),_B="keyboard",_L("keyboard",null)),e.preventDefault()}),s=yf(()=>{t.commitValidation()});(0,f4.useEffect)(()=>{let e=null==n?void 0:n.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)}},[n,a,s,i,r])}let wx=new WeakMap,wC="__role_"+Date.now(),wE="__focusManager_"+Date.now();function wS(e,t,n){var r,o;let i,{isInvalid:a,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:c,fieldProps:u,descriptionProps:p,errorMessageProps:d}=ww({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||s}),f=(0,f4.useRef)(null),{focusWithinProps:h}=_2({...e,onFocusWithin(n){var r;f.current=t.value,null==(r=e.onFocus)||r.call(e,n)},onBlurWithin:n=>{var r;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(r=e.onBlur)||r.call(e,n)},onFocusWithinChange:e.onFocusChange}),m=AS((o=$9)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",b="hour"===t.maxGranularity?"time":"date",y=AZ(t.value?m.format(g,{[b]:t.formatValue({month:"long"})}):""),v="presentation"===e[wC]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=e[wE],$=(0,f4.useMemo)(()=>A||wm(n),[A,n]),w=wv(t,n,"presentation"===e[wC]);wx.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:$});let k=(0,f4.useRef)(e.autoFocus);i="presentation"===e[wC]?{role:"presentation"}:yS(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,f4.useEffect)(()=>{k.current&&$.focusFirst(),k.current=!1},[$]),w$(e.inputRef,t.value,t.setValue),wk({...e,focus(){$.focusFirst()}},t,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(r=t.value)?void 0:r.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=yV(e);return{labelProps:{...c,onClick:()=>{$.focusFirst()}},fieldProps:yS(C,i,w,h,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:x,descriptionProps:p,errorMessageProps:d,isInvalid:a,validationErrors:s,validationDetails:l}}var wD={};wD={"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 wM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},wz={...wM,customError:!0,valid:!1},wO={isInvalid:!1,validationDetails:wM,validationErrors:[]},wP=(0,f4.createContext)({}),wT="__formValidationState"+Date.now();function wB(e){if(e[wT]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=e[wT];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:n,name:r,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:wz}:null,c=(0,f4.useMemo)(()=>a&&null!=o?wI(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return wj(n)}return[]}(a,o)):null,[a,o]);(null==i?void 0:i.validationDetails.valid)&&(i=void 0);let u=(0,f4.useContext)(wP),p=(0,f4.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>wj(u[e])):wj(u[r]):[],[u,r]),[d,f]=(0,f4.useState)(u),[h,m]=(0,f4.useState)(!1);u!==d&&(f(u),m(!1));let g=(0,f4.useMemo)(()=>wI(h?[]:p),[h,p]),b=(0,f4.useRef)(wO),[y,v]=(0,f4.useState)(wO),A=(0,f4.useRef)(wO),[$,w]=(0,f4.useState)(!1);return(0,f4.useEffect)(()=>{if(!$)return;w(!1);let e=c||i||b.current;wN(e,A.current)||(A.current=e,v(e))}),{realtimeValidation:l||g||c||i||wO,displayValidation:"native"===s?l||g||y:l||g||c||i||y,updateValidation(e){"aria"!==s||wN(y,e)?b.current=e:v(e)},resetValidation(){wN(wO,A.current)||(A.current=wO,v(wO)),"native"===s&&w(!1),m(!0)},commitValidation(){"native"===s&&w(!0),m(!0)}}}(e)}function wj(e){return e?Array.isArray(e)?e:[e]:[]}function wI(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:wz}:null}function wN(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function wR(...e){let t=new Set,n=!1,r={...wM};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in n||(n=o.isInvalid),r)r[e]||(r[e]=o.validationDetails[e])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let wF=new A$((es=wD)&&es.__esModule?es.default:es);function wL(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function wW(e,t,n,r,o){let i=null!=e&&null!=n&&e.compare(n)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==r?void 0:r(e))||!1,l=i||a||s,c=[];if(l){let e=wL(),r=new Ax(e,A$.getGlobalDictionaryForPackage("@react-stately/datepicker")||wF),l=new AM(e,wU({},o)),u=l.resolvedOptions().timeZone;a&&null!=t&&c.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(u))})),i&&null!=n&&c.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(u))})),s&&c.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let wG={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},wV={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function wU(e,t){var n;e={...t.shouldForceLeadingZeros?wV:wG,...e};let r=t.granularity||"minute",o=Object.keys(e),i=o.indexOf(null!=(n=t.maxGranularity)?n:"year");i<0&&(i=0);let a=o.indexOf(r);if(a<0&&(a=2),i>a)throw Error("maxGranularity must be greater than granularity");let s=o.slice(i,a+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===i&&(s.era="short"),s}function wq(e){return e&&"hour"in e?e:new vJ}function wH(e,t){return null===e?null:e?At(e,t):void 0}function wK(e,t,n,r){if(e)return wH(e,n);let o=At(Al(null!=r?r:Af()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?v9(o):r?o:Ae(o)}function wY(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=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,f4.useState)([r,n]);return e&&(o[0]!==r||o[1]!==n)&&i([r,n]),t||(t=e?r:o[0]),[t,e?n:o[1]]}let wJ=new A$({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"),wZ={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},wX={year:5,month:2,day:7,hour:2,minute:15,second:15},wQ={dayperiod:"dayPeriod"};function w0(e){var t,n;let{locale:r,createCalendar:o,hideTimeZone:i,isDisabled:a=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:c,maxValue:u,isDateUnavailable:p}=e,d=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=wY(d,e.granularity),m=h||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,f4.useMemo)(()=>new AM(r),[r]),b=(0,f4.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[y,v]=$L(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),A=(0,f4.useMemo)(()=>{var e;return null!=(e=wH(y,b))?e:null},[y,b]),[$,w]=(0,f4.useState)(()=>wK(e.placeholderValue,f,b,h)),k="gregory"===b.identifier&&"BC"===(A||$).era,x=(0,f4.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:h,hideTimeZone:i,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,i,k]),C=(0,f4.useMemo)(()=>wU({},x),[x]),E=(0,f4.useMemo)(()=>new AM(r,C),[r,C]),S=(0,f4.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,f4.useMemo)(()=>E.formatToParts(new Date).filter(e=>wZ[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[E]),[M,z]=(0,f4.useState)(()=>e.value||e.defaultValue?{...D}:{}),O=(0,f4.useRef)(null),P=(0,f4.useRef)(b);(0,f4.useEffect)(()=>{Ai(b,P.current)||(P.current=b,w(t=>Object.keys(M).length>0?At(t,b):wK(e.placeholderValue,f,b,h)))},[b,f,M,h,e.placeholderValue]),y&&Object.keys(M).length<Object.keys(D).length&&z(M={...D}),null==y&&Object.keys(M).length===Object.keys(D).length&&(z(M={}),w(wK(e.placeholderValue,f,b,h)));let T=A&&Object.keys(M).length>=Object.keys(D).length?A:$,B=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(M),r=Object.keys(D);null==t?(v(null),w(wK(e.placeholderValue,f,b,h)),z({})):n.length>=r.length||n.length===r.length-1&&D.dayPeriod&&!M.dayPeriod&&"dayPeriod"!==O.current?v(t=At(t,(null==d?void 0:d.calendar)||new vC)):w(t),O.current=null},j=(0,f4.useMemo)(()=>T.toDate(m),[T,m]),I=(0,f4.useMemo)(()=>(function(e,t,n,r,o,i,a,s){let l=["hour","minute","second"],c=n.formatToParts(e),u=[];for(let e of c){var p,d;let n=wZ[e.type];"era"===e.type&&1===i.getEras().length&&(n=!1);let c=wZ[e.type]&&!t[e.type],f=wZ[e.type]?(p=e.type,d=e.value,"era"===p||"dayPeriod"===p?d:"year"===p||"month"===p||"day"===p?wJ.getStringForLocale(p,a):"––"):null,h={type:wQ[e.type]||e.type,text:c?f:e.value,...w1(o,e.type,r),isPlaceholder:c,placeholder:f,isEditable:n};"hour"===e.type?(u.push({type:"literal",text:"⁦",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1}),u.push(h),e.type===s&&u.push({type:"literal",text:"⁩",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(u.push(h),u.push({type:"literal",text:"⁩",...w1(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):u.push(h)}return u})(j,M,E,S,T,b,r,f),[j,M,E,S,T,b,r,f]);D.era&&M.year&&!M.era?(M.era=!0,z({...M})):!D.era&&M.era&&(delete M.era,z({...M}));let N=e=>{M[e]=!0,"year"===e&&D.era&&(M.era=!0),z({...M})},R=(e,t)=>{if(M[e])B(function(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{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,n,{round:"hour"!==t,hourCycle:r.hour12?12:24})}throw Error("Unknown segment: "+t)}(T,e,t,S));else{N(e);let t=Object.keys(M),n=Object.keys(D);(t.length>=n.length||t.length===n.length-1&&D.dayPeriod&&!M.dayPeriod)&&B(T)}},F=(0,f4.useMemo)(()=>wW(y,c,u,p,x),[y,c,u,p,x]),L=wB({...e,value:y,builtinValidation:F}),W=L.displayValidation.isInvalid,G=e.validationState||(W?"invalid":null);return{...L,value:A,dateValue:j,calendar:b,setValue:B,segments:I,dateFormatter:E,validationState:G,isInvalid:W,granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",isDisabled:a,isReadOnly:s,isRequired:l,increment(e){R(e,1)},decrement(e){R(e,-1)},incrementPage(e){R(e,wX[e]||1)},decrementPage(e){R(e,-(wX[e]||1))},setSegment(e,t){N(e),B(function(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e&&"number"==typeof n)switch(t){case"dayPeriod":{let t=e.hour,r=t>=12;if(n>=12===r)return e;return e.set({hour:r?t-12:t+12})}case"hour":if(r.hour12){let t=e.hour>=12;t||12!==n||(n=0),t&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}throw Error("Unknown segment: "+t)}(T,e,t,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(M),n=Object.keys(D);t.length===n.length-1&&D.dayPeriod&&!M.dayPeriod&&(z(M={...D}),B(T.copy()))},clearSegment(t){delete M[t],O.current=t,z({...M});let n=wK(e.placeholderValue,f,b,h),r=T;if("dayPeriod"===t&&"hour"in T&&"hour"in n){let e=T.hour>=12,t=n.hour>=12;e&&!t?r=T.set({hour:T.hour-12}):!e&&t&&(r=T.set({hour:T.hour+12}))}else"hour"===t&&"hour"in T&&T.hour>=12&&M.dayPeriod?r=T.set({hour:n.hour+12}):t in T&&(r=T.set({[t]:n[t]}));v(null),B(r)},formatValue:e=>A?new AM(r,wU(e,x)).format(j):"",getDateFormatter:(e,t)=>new AM(e,wU({},{...x,...t}))}}function w1(e,t,n){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(n.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 w2=(0,f4.createContext)(null),w3=(0,f4.createContext)(null),w4=(0,f4.createContext)(null),w5=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(w3),r=(0,f4.useContext)(w4);return n||r?f5().createElement(w8,{...e,ref:t}):f5().createElement(w6,{...e,ref:t})}),w6=(0,f4.forwardRef)((e,t)=>{let[n,r]=yP({slot:e.slot},t,w2),{locale:o}=vy(),i=w0({...n,locale:o,createCalendar:$P}),a=(0,f4.useRef)(null),{fieldProps:s,inputProps:l}=wS({...n,inputRef:a},i,r);return f5().createElement(yM,{values:[[w3,i],[$8,{...l,ref:a}],[$5,{...s,ref:r,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},f5().createElement(w8,e))}),w8=(0,f4.forwardRef)((e,t)=>{let{className:n,children:r}=e,o=(0,f4.useContext)(w3),i=(0,f4.useContext)(w4),a=null!=o?o:i;return f5().createElement(f5().Fragment,null,f5().createElement($6,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,f4.cloneElement)(r(e),{key:t}))),f5().createElement($7,null))}),w7=(0,f4.createContext)({});function w9({children:e}){let t=(0,f4.useMemo)(()=>({register:()=>{}}),[]);return f5().createElement(_f.Provider,{value:t},e)}f5().forwardRef(({children:e,...t},n)=>{let r=(0,f4.useRef)(!1),o=(0,f4.useContext)(_f);n=yu(n||(null==o?void 0:o.ref));let i=yS(o||{},{...t,ref:n,register(){r.current=!0,o&&o.register()}});return _b(o,n),(0,f4.useEffect)(()=>{r.current||(r.current=!0)},[]),f5().createElement(_f.Provider,{value:i},e)});let ke=f5().createContext(null);function kt(e){var t;let n=y$(),{portalContainer:r=n?null:document.body,isExiting:o}=e,[i,a]=(0,f4.useState)(!1),s=(0,f4.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:l}=null!=(t=(0,f4.useContext)(w7))?t:{};if(!e.portalContainer&&l&&(r=l()),!r)return null;let c=e.children;return e.disableFocusManagement||(c=f5().createElement(wr,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},c)),c=f5().createElement(ke.Provider,{value:s},f5().createElement(w9,null,c)),_k().createPortal(c,r)}let kn=(0,f4.createContext)(null),kr=(0,f4.createContext)(null),ko=(0,f4.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=yP(e,t,kn);let{dialogProps:r,titleProps:o}=function(e,t){let n,r,{role:o="dialog"}=e,i=yC();i=e["aria-label"]?void 0:i;let a=(0,f4.useRef)(!1);return(0,f4.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){_Z(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(a.current=!0,t.current&&(t.current.blur(),_Z(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),yd(()=>{null==r||r(!0)},[r=null==(n=(0,f4.useContext)(ke))?void 0:n.setContain]),{dialogProps:{...yV(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":n},t),i=(0,f4.useContext)(kr);r["aria-label"]||r["aria-labelledby"]||e["aria-labelledby"]&&(r["aria-labelledby"]=e["aria-labelledby"]);let a=yz({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return f5().createElement("section",{...yV(e),...r,...a,ref:t,slot:e.slot||void 0},f5().createElement(yM,{values:[[vo,{slots:{[yD]:{},title:{...o,level:2}}}],[vn,{slots:{[yD]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),ki=(0,f4.createContext)(null),ka=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(ki);return(null==n?void 0:n.isInvalid)?f5().createElement(ks,{...e,ref:t}):null}),ks=(0,f4.forwardRef)((e,t)=>{let n=(0,f4.useContext)(ki),r=yV(e),o=yz({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==o.children?null:f5().createElement(va,{slot:"errorMessage",...r,...o,ref:t})}),kl=(0,f4.createContext)(null),kc=(0,f4.createContext)({}),ku=ve(function(e,t){[e,t]=yP(e,t,kc);let{elementType:n="label",...r}=e;return f5().createElement(n,{className:"react-aria-Label",...r,ref:t})}),kp=(0,f4.createContext)({placement:"bottom"}),kd=new WeakMap,kf=[];function kh(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function km(e,t){let n=e,r=t.toString(),o=r.indexOf("."),i=o>=0?r.length-o:0;if(i>0){let e=Math.pow(10,i);n=Math.round(n*e)/e}return n}function kg(e,t,n,r){t=Number(t),n=Number(n);let o=(e-(isNaN(t)?0:t))%r,i=km(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(km(n/r,r))*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor(km((n-t)/r,r))*r),i=km(i,r)}let kb={top:"top",bottom:"top",left:"left",right:"left"},ky={top:"bottom",bottom:"top",left:"right",right:"left"},k_={top:"left",left:"top"},kv={top:"height",left:"width"},kA={width:"totalWidth",height:"totalHeight"},k$={},kw="u">typeof document?window.visualViewport:null;function kk(e){var t,n,r,o,i;let a=0,s=0,l=0,c=0,u=0,p=0,d={},f=(null!=(t=null==kw?void 0:kw.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,c=t.clientHeight,a=null!=(n=null==kw?void 0:kw.width)?n:l,s=null!=(r=null==kw?void 0:kw.height)?r:c,d.top=t.scrollTop||e.scrollTop,d.left=t.scrollLeft||e.scrollLeft,kw&&(u=kw.offsetTop,p=kw.offsetLeft)}else({width:a,height:s,top:u,left:p}=kD(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=a,c=s;return _t()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,u=null!=(o=null==kw?void 0:kw.pageTop)?o:0,p=null!=(i=null==kw?void 0:kw.pageLeft)?i:0),{width:a,height:s,totalWidth:l,totalHeight:c,scroll:d,top:u,left:p}}function kx(e,t,n,r,o,i,a){var s;let l=null!=(s=o.scroll[e])?s:0,c=r[kv[e]],u=r.scroll[kb[e]]+i,p=c+r.scroll[kb[e]]-i,d=t-l+a[e]-r[kb[e]],f=t-l+n+a[e]-r[kb[e]];return d<u?u-d:f>p?Math.max(p-f,u-d):0}function kC(e){if(k$[e])return k$[e];let[t,n]=e.split(" "),r=kb[t]||"right",o=k_[r];kb[n]||(n="center");let i=kv[r],a=kv[o];return k$[e]={placement:t,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:a},k$[e]}function kE(e,t,n,r,o,i,a,s,l,c){var u,p,d,f,h;let{placement:m,crossPlacement:g,axis:b,crossAxis:y,size:v,crossSize:A}=r,$={};$[y]=null!=(u=e[y])?u:0,"center"===g?$[y]+=((null!=(p=e[A])?p:0)-(null!=(d=n[A])?d:0))/2:g!==y&&($[y]+=(null!=(f=e[A])?f:0)-(null!=(h=n[A])?h:0)),$[y]+=i;let w=e[y]-n[A]+l+c,k=e[y]+e[A]-l-c;if($[y]=kh($[y],w,k),m===b){let n=s?a[v]:t[kA[v]];$[ky[b]]=Math.floor(n-e[b]+o)}else $[b]=Math.floor(e[b]+e[v]+o);return $}function kS(e,t,n,r,o,i){var a,s,l;let{placement:c,axis:u,size:p}=i;return c===u?Math.max(0,n[u]-e[u]-(null!=(a=e.scroll[u])?a:0)+t[u]-(null!=(s=r[u])?s:0)-r[ky[u]]-o):Math.max(0,e[p]+e[u]+e.scroll[u]-t[u]-n[u]-n[p]-(null!=(l=r[u])?l:0)-r[ky[u]]-o)}function kD(e){let{top:t,left:n,width:r,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+i-s,left:n+a-l,width:r,height:o}}function kM(e,t){let n,r=window.getComputedStyle(e);if("fixed"===r.position){let{top:t,left:r,width:o,height:i}=e.getBoundingClientRect();n={top:t,left:r,width:o,height:i}}else{n=kD(e);let r=kD(t),o=window.getComputedStyle(t);r.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=r.top,n.left-=r.left}return n.top-=parseInt(r.marginTop,10)||0,n.left-=parseInt(r.marginLeft,10)||0,n}function kz(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 kO=new WeakMap;function kP(e){let{ref:t,box:n,onResize:r}=e;(0,f4.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[r,t,n])}let kT="u">typeof document?window.visualViewport:null;function kB(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 kj=[],kI="u">typeof document&&window.visualViewport,kN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),kR=0;function kF(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function kL(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function kW(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=A1(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,r=n.getBoundingClientRect().top;r>t+n.clientHeight&&(e.scrollTop+=r-t)}n=e.parentElement}}var kG={};function kV(e){var t;let{onDismiss:n,...r}=e,o=AV(r,AS((t=kG)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return f5().createElement(AH,null,f5().createElement("button",{...o,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function kU(e,t,n){yd(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,_w.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}function kq(e){let[t,n]=$L(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,f4.useCallback)(()=>{n(!0)},[n]),o=(0,f4.useCallback)(()=>{n(!1)},[n]),i=(0,f4.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:o,toggle:i}}kG={"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 kH=(0,f4.createContext)(null),kK=(0,f4.createContext)(null),kY=(0,f4.forwardRef)(function(e,t){[e,t]=yP(e,t,kH);let n=(0,f4.useContext)(kr),r=kq(e),o=null==e.isOpen&&null==e.defaultOpen&&n?n:r,i=function(e,t){let[n,r]=(0,f4.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let o="exiting"===n;return kU(e,o,(0,f4.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,f4.useContext)(_9),{direction:s}=vy();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),f5().createElement(f5().Fragment,null,t)}return!o||o.isOpen||i?f5().createElement(kJ,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function kJ({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var o,i;let a=(0,f4.useRef)(null),[s,l]=(0,f4.useState)(0),c=(0,f4.useRef)(null),p=(0,f4.useContext)(kK),d=p&&"SubmenuTrigger"===r.trigger;yd(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:g}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:p,underlayProps:d}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;(0,f4.useEffect)(()=>{if(o&&!kj.includes(t))return kj.push(t),()=>{let e=kj.indexOf(t);e>=0&&kj.splice(e,1)}},[o,t]);let l=()=>{kj[kj.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e,i=(0,f4.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=yf(e=>{n&&kB(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=yf(e=>{n&&n(e)});(0,f4.useEffect)(()=>{let e=i.current;if(r)return;let n=yJ(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&kB(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",a,!0),n.addEventListener("pointerup",r,!0),()=>{n.removeEventListener("pointerdown",a,!0),n.removeEventListener("pointerup",r,!0)}}},[t,r,a,s])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(e.target))&&(kj[kj.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&kj[kj.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=_2({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||ws(e.relatedTarget,wn))&&(!s||s(e.relatedTarget))&&(null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||c,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},null!=o?o:r),{overlayProps:f,arrowProps:h,placement:m}=function(e){var t,n,r;let{direction:o}=vy(),{arrowSize:i=0,targetRef:a,overlayRef:s,scrollRef:l=s,placement:c="bottom",containerPadding:u=12,shouldFlip:p=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:g=!0,onClose:b,maxHeight:y,arrowBoundaryOffset:v=0}=e,[A,$]=(0,f4.useState)(null),w=[m,c,s.current,a.current,l.current,u,p,d,f,h,g,o,y,v,i],k=(0,f4.useRef)(null==kT?void 0:kT.scale);(0,f4.useEffect)(()=>{g&&(k.current=null==kT?void 0:kT.scale)},[g]);let x=(0,f4.useCallback)(()=>{var e,t,n,r,b,A;if(!1===m||!g||!s.current||!a.current||!d||(null==kT?void 0:kT.scale)!==k.current)return;let w=null;if(l.current&&l.current.contains(document.activeElement)){let r=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(w={type:"top",offset:(null!=(t=null==r?void 0:r.top)?t:0)-o.top}).offset>o.height/2&&(w.type="bottom",w.offset=(null!=(n=null==r?void 0:r.bottom)?n:0)-o.bottom)}let x=s.current;!y&&s.current&&(x.style.top="0px",x.style.bottom="",x.style.maxHeight=(null!=(b=null==(r=window.visualViewport)?void 0:r.height)?b:window.innerHeight)+"px");let C=function(e){var t,n,r,o;let i,{placement:a,targetNode:s,overlayNode:l,scrollNode:c,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:h,maxHeight:m,arrowSize:g=0,arrowBoundaryOffset:b=0}=e,y=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!kz(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!kz(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,v=y===document.documentElement,A=window.getComputedStyle(y).position,$=v?kD(s):kM(s,y);if(!v){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);$.top+=parseInt(e,10)||0,$.left+=parseInt(t,10)||0}let w=kD(l),k={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};w.width+=(null!=(t=k.left)?t:0)+(null!=(n=k.right)?n:0),w.height+=(null!=(r=k.top)?r:0)+(null!=(o=k.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=kk(d),E=kk(y),S="BODY"===d.tagName?kD(y):kM(y,d);return"HTML"===y.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,t,n,r,o,i,a,s,l,c,u,p,d,f,h,m){var g,b,y,v,A,$,w,k,x,C,E,S,D,M;let z,O,P,T=kC(e),{size:B,crossAxis:j,crossSize:I,placement:N,crossPlacement:R}=T,F=kE(t,s,n,T,u,p,c,d,h,m),L=u,W=kS(s,c,t,o,i+u,T);if(a&&r[B]>W){let e=kC(`${ky[N]} ${R}`),r=kE(t,s,n,e,u,p,c,d,h,m);kS(s,c,t,o,i+u,e)>W&&(T=e,F=r,L=u)}let G="bottom";"top"===T.axis?"top"===T.placement?G="top":"bottom"===T.placement&&(G="bottom"):"top"===T.crossAxis&&("top"===T.crossPlacement?G="bottom":"bottom"===T.crossPlacement&&(G="top"));let V=kx(j,F[j],n[I],s,l,i,c);F[j]+=V;let U=(A=F,$=n.height,w=G,z=d?c.height:s[kA.height],O=null!=A.top?c.top+A.top:c.top+(z-(null!=(k=A.bottom)?k:0)-$),P="top"!==w?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-O-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+i)):Math.max(0,O+$-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(M=o.bottom)?M:0)+i)),Math.min(s.height-2*i,P));f&&f<U&&(U=f),n.height=Math.min(n.height,U),V=kx(j,(F=kE(t,s,n,T,L,p,c,d,h,m))[j],n[I],s,l,i,c),F[j]+=V;let q={},H=t[j]+.5*t[I]-F[j]-o[kb[j]],K=h/2+m,Y="left"===kb[j]?(null!=(g=o.left)?g:0)+(null!=(b=o.right)?b:0):(null!=(y=o.top)?y:0)+(null!=(v=o.bottom)?v:0),J=n[I]-Y-h/2-m,Z=kh(H,t[j]+h/2-(F[j]+o[kb[j]]),t[j]+t[I]-h/2-(F[j]+o[kb[j]]));return q[j]=kh(Z,K,J),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:T.placement}}(a,$,w,x,k,u,p,C,E,S,f,h,!!A&&"static"!==A,m,g,b)}({placement:(A=c,"rtl"===o?A.replace("start","right").replace("end","left"):A.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:a.current,scrollNode:l.current||s.current,padding:u,shouldFlip:p,boundaryElement:d,offset:f,crossOffset:h,maxHeight:y,arrowSize:i,arrowBoundaryOffset:v});if(C.position){if(x.style.top="",x.style.bottom="",x.style.left="",x.style.right="",Object.keys(C.position).forEach(e=>x.style[e]=C.position[e]+"px"),x.style.maxHeight=null!=C.maxHeight?C.maxHeight+"px":"",w&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),n=e[w.type]-t[w.type];l.current.scrollTop+=n-w.offset}$(C)}},w);yd(x,w),yd(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=x]),kP({ref:s,onResize:x}),kP({ref:a,onResize:x});let C=(0,f4.useRef)(!1);yd(()=>{let e,t=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},n=()=>{C.current&&t()};return null==kT||kT.addEventListener("resize",t),null==kT||kT.addEventListener("scroll",n),()=>{null==kT||kT.removeEventListener("resize",t),null==kT||kT.removeEventListener("scroll",n)}},[x]);let E=(0,f4.useCallback)(()=>{C.current||null==b||b()},[b,C]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,f4.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=r||kO.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:a,isOpen:g,onClose:b&&E}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==A?void 0:A.position,maxHeight:null!=(t=null==A?void 0:A.maxHeight)?t:"100vh"}},placement:null!=(n=null==A?void 0:A.placement)?n:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==A?void 0:A.arrowOffsetLeft,top:null==A?void 0:A.arrowOffsetTop}},updatePosition:x}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;yd(()=>{if(!t){let e,t,n,r;return 1==++kR&&(u=_e()?(n=null,r=yp(kL(document,"touchstart",n=>{((e=A1(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=kF(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),kL(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}),kL(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),kL(document,"focus",e=>{var t;let r=e.target;((t=r)instanceof HTMLInputElement&&!kN.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=yp(kL(window,"scroll",()=>{window.scrollTo(0,0)}),kF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),kF(document.documentElement,"overflow","hidden"),kF(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),r.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{r.style.transform="",kI&&(kI.height<window.innerHeight?requestAnimationFrame(()=>{kW(r)}):kI.addEventListener("resize",()=>kW(r),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),r()}):yp(kF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),kF(document.documentElement,"overflow","hidden"))),()=>{0==--kR&&u()}}},[t])}({isDisabled:i||!t.isOpen}),yd(()=>{if(t.isOpen&&r.current){if(!i)return function(e,t=document.body){let n=new Set(e),r=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(t);let t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of n)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 n=null!=(t=kd.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==n)&&(0===n&&e.setAttribute("aria-hidden","true"),r.add(e),kd.set(e,n+1))};kf.length&&kf[kf.length-1].disconnect(),o(t);let a=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...r].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?n.add(e):e instanceof Element&&o(e)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return kf.push(s),()=>{for(let e of(a.disconnect(),r)){let t=kd.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),kd.delete(e)):kd.set(e,t-1))}s===kf[kf.length-1]?(kf.pop(),kf.length&&kf[kf.length-1].observe()):kf.splice(kf.indexOf(s),1)}}([null!=(n=null==o?void 0:o.current)?n:r.current]);var e,n,a=null!=(e=null==o?void 0:o.current)?e:r.current;let t=kf[kf.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}},[i,t.isOpen,r,o]),{popoverProps:yS(p,f),arrowProps:h,underlayProps:d,placement:m}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:d?p:c},e),b=r.popoverRef,y=function(e,t=!0){let[n,r]=(0,f4.useState)(!0),o=n&&t;return yd(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),kU(e,o,(0,f4.useCallback)(()=>r(!1),[])),o}(b,!!g)||r.isEntering||!1,v=yz({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:y,isExiting:t}}),A=!r.isNonModal||"SubmenuTrigger"===r.trigger,[$,w]=(0,f4.useState)(!1);yd(()=>{b.current&&w(A&&!b.current.querySelector("[role=dialog]"))},[b,A]),(0,f4.useEffect)(()=>{$&&b.current&&!b.current.contains(document.activeElement)&&_Z(b.current)},[$,b]);let k={...f.style,...v.style},x=f5().createElement("div",{...yS(yV(r),f),...v,role:$?"dialog":void 0,tabIndex:$?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:b,slot:r.slot||void 0,style:k,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":y||void 0,"data-exiting":t||void 0},!r.isNonModal&&f5().createElement(kV,{onDismiss:e.close}),f5().createElement(kp.Provider,{value:{...m,placement:g,ref:a}},v.children),f5().createElement(kV,{onDismiss:e.close}));return d?f5().createElement(kt,{...r,shouldContainFocus:$,isExiting:t,portalContainer:null!=(i=null!=n?n:null==p?void 0:p.current)?i:void 0},x):f5().createElement(kt,{...r,shouldContainFocus:$,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&f5().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),f5().createElement("div",{ref:c,style:{display:"contents"}},f5().createElement(kK.Provider,{value:c},x)))}function kZ(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let kX=(0,f4.createContext)(null),kQ=(0,f4.createContext)(null),k0=(0,f4.createContext)(null),k1=(0,f4.createContext)(null),k2=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,kX);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){var t;let n=kq(e),[r,o]=$L(e.value,e.defaultValue||null,e.onChange),i=r||e.placeholderValue||null,[a,s]=wY(i,e.granularity),l=null!=r?r.toDate(null!=s?s:"UTC"):null,c="hour"===a||"minute"===a||"second"===a,u=null==(t=e.shouldCloseOnSelect)||t,[p,d]=(0,f4.useState)(null),[f,h]=(0,f4.useState)(null);if(r&&(p=r,"hour"in r&&(f=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,g=(0,f4.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:b,maxValue:y,isDateUnavailable:v}=e,A=(0,f4.useMemo)(()=>wW(r,b,y,v,g),[r,b,y,v,g]),$=wB({...e,value:r,builtinValidation:A}),w=$.displayValidation.isInvalid,k=e.validationState||(w?"invalid":null),x=(e,t)=>{o("timeZone"in t?t.set(v9(e)):Ae(e,t)),d(null),h(null),$.commitValidation()};return{...$,value:r,setValue:o,dateValue:p,timeValue:f,setDateValue:t=>{let r="function"==typeof u?u():u;c?f||r?x(t,f||wq(e.defaultValue||e.placeholderValue)):d(t):(o(t),$.commitValidation()),r&&n.setOpen(!1)},setTimeValue:e=>{p&&e?x(p,e):h(e)},granularity:a,hasTime:c,...n,setOpen(t){!t&&!r&&p&&c&&x(p,f||wq(e.defaultValue||e.placeholderValue)),n.setOpen(t)},validationState:k,isInvalid:w,formatValue:(e,t)=>l?new AM(e,wU(t,g)).format(l):"",getDateFormatter:(e,t)=>new AM(e,wU({},{...g,...t}))}}({...e,validationBehavior:i}),s=(0,f4.useRef)(null),[l,c]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,fieldProps:d,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:g,errorMessageProps:b,...y}=function(e,t,n){var r;let o=yx(),i=yx(),a=yx(),s=AS((r=$9)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:u}=t.displayValidation,{labelProps:p,fieldProps:d,descriptionProps:f,errorMessageProps:h}=ww({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),m=wv(t,n),g=d["aria-labelledby"]||d.id,{locale:b}=vy(),y=t.formatValue(b,{month:"long"}),v=AZ(y?s.format("selectedDateDescription",{date:y}):""),A=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=yV(e),w=(0,f4.useMemo)(()=>wm(n),[n]),k=(0,f4.useRef)(!1),{focusWithinProps:x}=_2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(i);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,o;k.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!k.current){var n,r;k.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}});return{groupProps:yS($,m,d,v,x,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":A,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...p,onClick:()=>{w.focusFirst()}},fieldProps:{...d,id:a,[wC]:"presentation","aria-describedby":A,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,[wT]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":A,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${g}`},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:c,validationDetails:u}}({...yB(e),label:c,validationBehavior:i},a,s),[v,A]=(0,f4.useState)(null),$=(0,f4.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);kP({ref:s,onResize:$});let{focusProps:w,isFocused:k,isFocusVisible:x}=_3({within:!0}),C=yz({...e,values:{state:a,isFocusWithin:k,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),E=yV(e);return delete E.id,f5().createElement(yM,{values:[[k0,a],[$5,{...u,ref:s,isInvalid:a.isInvalid}],[w2,d],[vn,{...f,isPressed:a.isOpen}],[kc,{...p,ref:l,elementType:"span"}],[$H,m],[kr,a],[kH,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[kn,h],[vi,{slots:{description:g,errorMessage:b}}],[ki,y]]},f5().createElement("div",{...w,...E,...C,ref:t,slot:e.slot||void 0,"data-focus-within":k||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),k3=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,kQ);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){var t,n,r;let o=kq(e),[i,a]=$L(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,f4.useState)(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&l(s={start:null,end:null});let c=i||s,u=e=>{l(e||{start:null,end:null}),kZ(e)?a(e):a(null)},[p,d]=wY((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===p||"minute"===p||"second"===p,h=null==(r=e.shouldCloseOnSelect)||r,[m,g]=(0,f4.useState)(null),[b,y]=(0,f4.useState)(null);c&&kZ(c)&&(m=c,"hour"in c.start&&(b=c));let v=(e,t)=>{u({start:"timeZone"in t.start?t.start.set(v9(e.start)):Ae(e.start,t.start),end:"timeZone"in t.end?t.end.set(v9(e.end)):Ae(e.end,t.end)}),g(null),y(null),D.commitValidation()},A=t=>{let n="function"==typeof h?h():h;f?kZ(t)&&(null==b?void 0:b.start)&&(null==b?void 0:b.end)?v(t,{start:(null==b?void 0:b.start)||wq(e.placeholderValue),end:(null==b?void 0:b.end)||wq(e.placeholderValue)}):g(t):kZ(t)?(u(t),D.commitValidation()):g(t),n&&o.setOpen(!1)},$=e=>{kZ(m)&&kZ(e)?v(m,e):y(e)},w=(null==c||null==(t=c.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===c.start.era||(null==c||null==(n=c.end)?void 0:n.calendar.identifier)==="gregory"&&"BC"===c.end.era,k=(0,f4.useMemo)(()=>({granularity:p,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[p,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,w]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,f4.useMemo)(()=>{var e,t;let n;return n=wR(wW(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,k),wW(null!=(t=null==c?void 0:c.end)?t:null,x,C,E,k)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(n=wR(n,{isInvalid:!0,validationErrors:[(A$.getGlobalDictionaryForPackage("@react-stately/datepicker")||wF).getStringForLocale("rangeReversed",wL())],validationDetails:{...wM,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),n},[c,x,C,E,k]),D=wB({...e,value:i,name:(0,f4.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),M=D.displayValidation.isInvalid,z=e.validationState||(M?"invalid":null);return{...D,value:c,setValue:u,dateRange:m,timeRange:b,granularity:p,hasTime:f,setDate(e,t){var n,r;"start"===e?A({start:t,end:null!=(n=null==m?void 0:m.end)?n:null}):A({start:null!=(r=null==m?void 0:m.start)?r:null,end:t})},setTime(e,t){var n,r;"start"===e?$({start:t,end:null!=(n=null==b?void 0:b.end)?n:null}):$({start:null!=(r=null==b?void 0:b.start)?r:null,end:t})},setDateTime(e,t){var n,r;"start"===e?u({start:t,end:null!=(n=null==c?void 0:c.end)?n:null}):u({start:null!=(r=null==c?void 0:c.start)?r:null,end:t})},setDateRange:A,setTimeRange:$,...o,setOpen(t){!t&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&kZ(m)&&f&&v(m,{start:(null==b?void 0:b.start)||wq(e.placeholderValue),end:(null==b?void 0:b.end)||wq(e.placeholderValue)}),o.setOpen(t)},validationState:z,isInvalid:M,formatValue(t,n){let r;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,i=e.granularity||(c.start&&"minute"in c.start?"minute":"day"),a="timeZone"in c.end?c.end.timeZone:void 0,s=e.granularity||(c.end&&"minute"in c.end?"minute":"day"),l=wU(n,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===c.start.calendar.identifier&&"BC"===c.start.era||"gregory"===c.end.calendar.identifier&&"BC"===c.end.era}),u=c.start.toDate(o||"UTC"),p=c.end.toDate(a||"UTC"),d=new AM(t,l);if(o===a&&i===s&&0!==c.start.compare(c.end)){try{let e=d.formatRangeToParts(u,p),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let o=0;o<e.length;o++)o<t?n+=e[o].value:o>t&&(r+=e[o].value);return{start:n,end:r}}catch{}r=d}else r=new AM(t,wU(n,{granularity:s,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(u),end:r.format(p)}},getDateFormatter:(e,t)=>new AM(e,wU({},{...k,...t}))}}({...e,validationBehavior:i}),s=(0,f4.useRef)(null),[l,c]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:u,labelProps:p,startFieldProps:d,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:g,descriptionProps:b,errorMessageProps:y,...v}=function(e,t,n){var r,o,i,a,s,l;let c=AS((l=$9)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:u,validationErrors:p,validationDetails:d}=t.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:g}=ww({...e,labelElementType:"span",isInvalid:u,errorMessage:e.errorMessage||p}),b=h["aria-labelledby"]||h.id,{locale:y}=vy(),v=t.formatValue(y,{month:"long"}),A=AZ(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),$={"aria-label":c.format("startDate"),"aria-labelledby":b},w={"aria-label":c.format("endDate"),"aria-labelledby":b},k=yx(),x=yx(),C=wv(t,n),E=[A["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,f4.useMemo)(()=>wm(n,{accept:e=>e.id!==k}),[n,k]),D={[wE]:S,[wC]:"presentation","aria-describedby":E,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},M=yV(e),z=(0,f4.useRef)(!1),{focusWithinProps:O}=_2({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(x);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,o;z.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!z.current){var n,r;z.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}}),P=(0,f4.useRef)(wO),T=(0,f4.useRef)(wO);return{groupProps:yS(M,C,h,A,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...f,onClick:()=>{S.focusFirst()}},buttonProps:{...A,id:k,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${k} ${b}`,"aria-describedby":E,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${k} ${b}`},startFieldProps:{...$,...D,value:null!=(a=null==(r=t.value)?void 0:r.start)?a:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[wT]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(wR(e,T.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...w,...D,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[wT]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){T.current=e,t.updateValidation(wR(P.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:g,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:u,validationErrors:p,validationDetails:d}}({...yB(e),label:c,validationBehavior:i},a,s),[A,$]=(0,f4.useState)(null),w=(0,f4.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);kP({ref:s,onResize:w});let{focusProps:k,isFocused:x,isFocusVisible:C}=_3({within:!0}),E=yz({...e,values:{state:a,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=yV(e);return delete S.id,f5().createElement(yM,{values:[[k1,a],[$5,{...u,ref:s,isInvalid:a.isInvalid}],[vn,{...h,isPressed:a.isOpen}],[kc,{...p,ref:l,elementType:"span"}],[$K,g],[kr,a],[kH,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":A}}],[kn,m],[w2,{slots:{start:d,end:f}}],[vi,{slots:{description:b,errorMessage:y}}],[ki,v]]},f5().createElement("div",{...k,...S,...E,ref:t,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function k4(e){return f5().createElement(vb,e)}function k5(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof vK||e instanceof vX||e instanceof v0)return t?At(e,t):e;{let n=mT()(e).toDate(),r=new vK(n.getFullYear(),n.getMonth()+1,n.getDate());return t?At(r,t):r}}function k6(e){if(e)return e.toDate(Af())}function k8(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ec=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ec=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var k7=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ec||"en-US"),k9=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},xe={};for(let e=1;e<100;e++)xe[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var xt={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},xn="[1234567890一二三四五六七八九〇\\d]",xr={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},xo={},xi={"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},xa={zone:xi,year:xe,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:{}},xs={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(xi).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,}"},xl={...xs,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}"},xc={},xu=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=k7){return xc[t.toLowerCase()]||(xc[t.toLowerCase()]=new e(t)),xc[t.toLowerCase()]}constructor(e=k7){this.locale=e,this.lookups={...xa},this.vars={...xs};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 n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);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 n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=xr: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(xo[e])return xo[e];if("fullwide"===e||"hanidec"===e)return{group:xn,lookup:{...xr}};let t=xt[e];if(!t)return{group:"\\d",lookup:{...xr}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return xo[e]={group:`[${n}-${r}]`,lookup:o},xo[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,xl)xl.hasOwnProperty(n)&&(this.vars[n]=xl[n].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((n,r)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.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(n[a]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(n[i]).find(r).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 n=[],r={};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(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=a}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},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);n.push(s),r[s]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}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")}},xp=["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"],xd={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},xf=()=>new Date;function xh(e){return function(t){let n={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(n[o]=t[r])}return n}}var xm=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;r=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},xg=["year","month","day","hour","minute","second","millisecond","offset"],xb={};function xy(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 x_=[[/([^\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"]],xv={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," "],...x_],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:x_,id:x_,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function xA(e,t=k7){let n=function(e){if(!xb[e]){var t,n;let r,o,i=xu.factory(e);xb[e]=new xm({doneChecker:xy,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:xh(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:xh(["","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:xh(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${xn}{2,4})\\s*\u5E74\\s*(${xn}{1,2})\\s*\u6708\\s*(${xn}{1,2})\\s*\u65E5$`),handler:xh(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:xh(["","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:xh(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=xf(),n=e[0].toLowerCase(),r={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==r&&t.setTime(t.getTime()+r);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...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,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?xd[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let o=xf();return"millisecond"===n?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===n?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===n?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===n?o.setUTCHours(o.getUTCHours()+t):"day"===n?o.setUTCDate(o.getUTCDate()+t):"month"===n?o.setUTCMonth(o.getUTCMonth()+t):"year"===n&&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:xh(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:xh(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:xh(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:xh(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:xh(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:xh(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:xh(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:xh(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:xh(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:xh(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:xh(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:xh(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:xh(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:xh(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:xh(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:xh(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:xh(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:xh(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:xh(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:xh(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:xh(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:xh(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:xh(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:xh(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:xh(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:xh(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:xh(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:xh(["offset"])}],o=i.baseName.slice(0,5),xp.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=i,function(e){let t={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=n.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(o,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(o){let e=n.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(xg.includes(r)){let e=n.toInt(o);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=xe[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return xb[e]}(t),r=function(e,t){let n=xv[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function x$(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new k9(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 k9(t.valueOf()-60*e.offset*1e3):t}function xw(e,t=k7){let n=xA(e,t),r=n.invalid?new k9(NaN):x$(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function xk(e,t=k7){return e instanceof Date?new k9(e.valueOf()):"number"==typeof e?new k9(e):xw(e,t)}Date.fromString=k9.fromString=xw,Date.fromAny=k9.fromAny=xk,"u">typeof window&&(window.anyDateParser={fromString:xw,fromAny:xk,fromObject:x$,attempt:xA});var xx=n(5238),xC=n(3826);let xE=function(e){return null==e};function xS(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}mP.extend(mB),mP.extend(xC),mP.extend(xx);let xD="YYYY-MM-DDTHH:mm:ss.SSSZZ";function xM(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&mP(e,xD).isValid()}function xz(e){return mP(e).isToday()}function xO(e){return xM(e)?mP(e,xD).toDate():null}function xP(e,t=!1){let n=mP(e);return t&&(n=n.utc()),n.format(xD)}function xT(e){return mP(e).toDate()}var xB=new WeakMap;let xj=new class{register(e,t){xS(this,xB).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(xS(this,xB).has(t))return xS(this,xB).get(t)}if(e.language&&xS(this,xB).has(e.language))return xS(this,xB).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return xS(this,xB).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,xB,{writable:!0,value:new Map})}};function xI(e,t){xj.register(e,t)}function xN(e){let t=e??k8();return xj.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let xR={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function xF(e,t={}){let n=xA(e,k8());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!xE(n.day)&&xE(n.month)&&(n=Object.assign({},rk(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},rk(n,"day"),{date:n.day}));let r=mP().set(n).toDate();return xE(n.year)&&(t.year=!1),xE(n.month)&&(t.month=!1),xE(n.date)&&(t.day=!1),xL(r,t)}function xL(e,t){let n,r=t?.locale??k8(),o=new Intl.Locale(r),{calendar:i,mode:a,time:s,day:l,month:c,year:u,noToday:p,numberingSystem:d}={...xR,...{noToday:"am"===o.language},...t},f={calendar:i??xN(o),year:u?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},h=mP(e).isToday();if(h&&!p)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===o.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&u&&l&&(t=t.map(xW("-"))),"wide"==a&&(t=t.map(xW(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(n+=`, ${xG(e)}`),n}let xW=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function xG(e){return e.toLocaleTimeString(k8(),{hour:"2-digit",minute:"2-digit"})}function xV(e,t){return xL(e,{...t,time:!0})}function xU(e,t){let n=xN("string"==typeof t?new Intl.Locale(t):t);return n?At(e,$P(n)):e}function xq(e,t){return new Intl.DurationFormat(k8(),t).format(e)}function xH(e,t){if(null==e)return null;if("string"==typeof e){let n=xA(e,k8());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...rk(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...rk(n,"day"),...{date:n.day}}),mP(t).set(n))}return mP(e)}let xK=["years","months","days","hours","minutes","seconds"],xY={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},xJ={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xZ(e,t=mP(),n){let r,o=mP(t),i=xH(e,o);if(null==i)return null;if("string"==typeof n){let e=xY[n]??n;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?xY[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=xK.indexOf(n);for(let o=0;o<xK.length;o++){let i=xK[o];if(t.diff(e,i)>0)return o<=r?i:n}return n}(i,o,t??"seconds"):xY[s]??s,function(e,t,n,r){let o=xK.indexOf(n),i=xK.indexOf(r),a=xK.slice(o,i+1),s={},l=e;for(let e of a){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(i,o,e,t??e)}let c=(r=function(e){let t={...xJ};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[xY[n]??n]=r);return t}(a),o.diff(i,"seconds")<r.seconds?"seconds":o.diff(i,"minutes")<r.minutes?"minutes":o.diff(i,"hours")<r.hours?"hours":o.diff(i,"days")<r.days?"days":o.diff(i,"months")<r.months?"months":"years");return{[c]:o.diff(i,c)}}let xX={style:"short",localeMatcher:"lookup"};function xQ(e,t=mP(),n){let r=xZ(e,t,n);return null==r?null:xq(r,"object"==typeof n&&n.formatOptions?{...xX,...n.formatOptions}:xX)}let x0=(0,f4.createContext)(null);function x1(){let e=hZ({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,f4.useMemo)(()=>{let t=k8();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,f4.useMemo)(()=>{let e=xN(t);return void 0!==e?$P(e):void 0},[t]),r=(0,f4.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),o=(0,f4.useMemo)(()=>n?At(Ac(Af()),n):Ac(Af()),[n]);return{calendar:n,intlLocale:r,today_:o}}let x2=new vK(1793,1,1);var x3={};function x4(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}x3={"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 x5=n(137);function x6(e={}){let{locale:t}=vy();return(0,f4.useMemo)(()=>new(0,x5.K)(t,e),[t,e])}var x8={};function x7(e){var t;let n=(0,f4.useRef)(void 0),{value:r,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:u,onIncrementPage:p,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,g=AS((t=x8)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,f4.useEffect)(()=>()=>clearTimeout(n.current),[]);let b=(0,f4.useRef)(!1),y=()=>{b.current=!0},v=()=>{b.current=!1},A=""===o?g.format("Empty"):(o||`${r}`).replace("-","−");(0,f4.useEffect)(()=>{b.current&&(yI&&yI.clear("assertive"),yN(A,"assertive"))},[A]);let $=yf(e=>{clearTimeout(n.current),null==u||u(),n.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r<a)&&$(60)},e)}),w=yf(e=>{clearTimeout(n.current),null==d||d(),n.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r>i)&&w(60)},e)}),k=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=_y();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":A,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(p){e.preventDefault(),null==p||p();break}case"ArrowUp":case"Up":u&&(e.preventDefault(),null==u||u());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:y,onBlur:v},incrementButtonProps:{onPressStart:()=>{$(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(n.current),C()},onFocus:y,onBlur:v},decrementButtonProps:{onPressStart:()=>{w(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(n.current),C()},onFocus:y,onBlur:v}}}x8={"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 x9=n(7120);function Ce(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let o=t.toString().split("."),i=n.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),n=Math.round(n*a),r=("+"===e?t+n:t-n)/a}return r}let Ct=(0,f4.createContext)(null),Cn=(0,f4.createContext)(null),Cr=(0,f4.forwardRef)(function(e,t){var n,r;[e,t]=yP(e,t,Ct);let{validationBehavior:o}=yO(kl)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",{locale:a}=vy(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:u}=e;null===i&&(i=NaN),void 0===i||isNaN(i)||(i=void 0===r||isNaN(r)?kh(i,t,n):kg(i,t,n,r)),isNaN(a)||(a=void 0===r||isNaN(r)?kh(a,t,n):kg(a,t,n,r));let[p,d]=$L(i,isNaN(a)?NaN:a,s),[f,h]=(0,f4.useState)(()=>isNaN(p)?"":new(0,x5.K)(l,o).format(p)),m=(0,f4.useMemo)(()=>new(0,x9.d)(l,o),[l,o]),g=(0,f4.useMemo)(()=>m.getNumberingSystem(f),[m,f]),b=(0,f4.useMemo)(()=>new(0,x5.K)(l,{...o,numberingSystem:g}),[l,o,g]),y=(0,f4.useMemo)(()=>b.resolvedOptions(),[b]),v=(0,f4.useCallback)(e=>isNaN(e)||null===e?"":b.format(e),[b]),A=wB({...e,value:p}),$=void 0===r||isNaN(r)?1:r;"percent"===y.style&&(void 0===r||isNaN(r))&&($=.01);let[w,k]=(0,f4.useState)(p),[x,C]=(0,f4.useState)(l),[E,S]=(0,f4.useState)(o);Object.is(p,w)&&l===x&&o===E||(h(v(p)),k(p),C(l),S(o));let D=(0,f4.useMemo)(()=>m.parse(f),[m,f]),M=(e,r=0)=>{if(isNaN(D))return kg(isNaN(r)?0:r,t,n,$);{let r=kg(D,t,n,$);return"+"===e&&r>D||"-"===e&&r<D?r:kg(Ce(e,D,$),t,n,$)}},z=(0,f4.useMemo)(()=>!c&&!u&&(isNaN(D)||void 0===n||isNaN(n)||kg(D,t,n,$)>D||Ce("+",D,$)<=n),[c,u,t,n,$,D]),O=(0,f4.useMemo)(()=>!c&&!u&&(isNaN(D)||void 0===t||isNaN(t)||kg(D,t,n,$)<D||Ce("-",D,$)>=t),[c,u,t,n,$,D]);return{...A,validate:e=>m.isValidPartialNumber(e,t,n),increment:()=>{let e=M("+",t);e===p&&h(v(e)),d(e),A.commitValidation()},incrementToMax:()=>{null!=n&&(d(kg(n,t,n,$)),A.commitValidation())},decrement:()=>{let e=M("-",n);e===p&&h(v(e)),d(e),A.commitValidation()},decrementToMin:()=>{null!=t&&(d(t),A.commitValidation())},canIncrement:z,canDecrement:O,minValue:t,maxValue:n,numberValue:D,setNumberValue:d,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),h(void 0===i?"":v(p));return}isNaN(D)?h(v(p)):(e=void 0===r||isNaN(r)?kh(D,t,n):kg(D,t,n,r),d(e=m.parse(v(e))),h(v(void 0===i?e:p)))}}}({...e,locale:a,validationBehavior:i}),l=(0,f4.useRef)(null),[c,u]=yT(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:p,groupProps:d,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:g,errorMessageProps:b,...y}=function(e,t,n){var r,o;let i,{id:a,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:u,isRequired:p,minValue:d,maxValue:f,autoFocus:h,label:m,formatOptions:g,onBlur:b=()=>{},onFocus:y,onFocusChange:v,onKeyDown:A,onKeyUp:$,description:w,errorMessage:k,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:M,numberValue:z,inputValue:O,commit:P,commitValidation:T}=t,B=AS((o=x3)&&o.__esModule?o.default:o,"@react-aria/numberfield"),j=yx(a),{focusProps:I}=_X({onBlur(){P()}}),N=x6(g),R=(0,f4.useMemo)(()=>N.resolvedOptions(),[N]),F=x6({...g,currencySign:void 0}),L=(0,f4.useMemo)(()=>isNaN(z)?"":F.format(z),[F,z]),{spinButtonProps:W,incrementButtonProps:G,decrementButtonProps:V}=x7({isDisabled:c,isReadOnly:u,isRequired:p,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:M,value:z,textValue:L}),[U,q]=(0,f4.useState)(!1),{focusWithinProps:H}=_2({isDisabled:c,onFocusWithinChange:q});!function(e,t){let{onScroll:n,isDisabled:r}=e,o=(0,f4.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);AK(t,"wheel",r?void 0:o)}({onScroll:(0,f4.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?E():e.deltaY<0&&D())},[D,E]),isDisabled:x||c||u||!U},n);let K=(null!=(r=R.maximumFractionDigits)?r:0)>0,Y=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,J="numeric";y7()?Y?J="text":K&&(J="decimal"):_r()&&(Y?J="numeric":K&&(J="decimal"));let Z=yV(e),X=(0,f4.useCallback)(e=>{"Enter"===e.key?(P(),T()):e.continuePropagation()},[P,T]),{isInvalid:Q,validationErrors:ee,validationDetails:et}=t.displayValidation,{labelProps:en,inputProps:er,descriptionProps:eo,errorMessageProps:ei}=function(e,t,n){let r=yf(e=>{let r=n.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,f4.useEffect)(()=>{if(!x4()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n,r]);let o=x4()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...c}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,c]=$L(e.value,e.defaultValue||"",e.onChange),{focusableProps:u}=_1(e,t),p=wB({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:h}=p.displayValidation,{labelProps:m,fieldProps:g,descriptionProps:b,errorMessageProps:y}=ww({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=yV(e,{labelable:!0}),A={type:a,pattern:e.pattern};return w$(t,l,c),wk(e,p,t),(0,f4.useEffect)(()=>{if(t.current instanceof yZ(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:m,inputProps:yS(v,"input"===n?A:void 0,{disabled:r,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":d||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>c(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(f5().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,...u,...g}),descriptionProps:b,errorMessageProps:y,isInvalid:d,validationErrors:f,validationDetails:h}}(e,n),u=(0,f4.useRef)(null);return{inputProps:yS(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=u.current;n.current.value=e,n.current.setSelectionRange(r,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...c}}({...C,...Z,name:void 0,label:m,autoFocus:h,isDisabled:c,isReadOnly:u,isRequired:p,validate:void 0,[wT]:t,value:O,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:j,type:"text",inputMode:J,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:b,onFocus:y,onFocusChange:v,onKeyDown:(0,f4.useMemo)(()=>yp(X,A),[X,A]),onKeyUp:$,description:w,errorMessage:k},t,n);w$(n,t.numberValue,t.setNumberValue);let ea=yS(W,I,er,{role:null,"aria-roledescription":_e()?null:B.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!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(i=null!=e.label?en.id:e["aria-labelledby"]);let ec=yx(),eu=yx(),ep=yS(G,{"aria-label":l||B.format("increase",{fieldLabel:el}).trim(),id:i&&!l?ec:null,"aria-labelledby":i&&!l?`${ec} ${i}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:es}),ed=yS(V,{"aria-label":s||B.format("decrease",{fieldLabel:el}).trim(),id:i&&!s?eu:null,"aria-labelledby":i&&!s?`${eu} ${i}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:es});return{groupProps:{...H,role:"group","aria-disabled":c,"aria-invalid":Q?"true":void 0},labelProps:en,inputProps:ea,incrementButtonProps:ep,decrementButtonProps:ed,errorMessageProps:ei,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:et}}({...yB(e),label:u,validationBehavior:i},s,l),v=yz({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),A=yV(e);return delete A.id,f5().createElement(yM,{values:[[Cn,s],[$5,d],[$8,{...f,ref:l}],[kc,{...p,ref:c}],[vn,{slots:{increment:h,decrement:m}}],[vi,{slots:{description:g,errorMessage:b}}],[ki,y]]},f5().createElement("div",{...A,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":y.isInvalid||void 0}),e.name&&f5().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function Co(e,t){return Number.parseInt(xL(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let Ci=(0,f4.forwardRef)(function(e,t){let{className:n}=e,r=(0,f4.useContext)($Y),o=(0,f4.useContext)($J),i=r??o,a=(0,f4.useContext)(x0),s=Af(),l=xL(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),c=Co(i.visibleRange.start.toDate(s),a),u=i.maxValue?Co(i.maxValue.toDate(s),a):void 0,p=i.minValue?Co(i.minValue.toDate(s),a):void 0,d=(0,f4.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,mX.jsxs)("span",{ref:t,className:n,children:[(0,mX.jsx)("span",{children:l}),(0,mX.jsxs)(Cr,{formatOptions:{useGrouping:!1},maxValue:u,minValue:p,onChange:d,value:c,children:[(0,mX.jsx)($7,{}),(0,mX.jsxs)($6,{children:[(0,mX.jsx)(vr,{slot:"increment",children:(0,mX.jsx)(gK,{size:8})}),(0,mX.jsx)(vr,{slot:"decrement",children:(0,mX.jsx)(gU,{size:8})})]})]})]})});var Ca=n(4782),Cs={};Cs.styleTagTransform=gn(),Cs.setAttributes=m7(),Cs.insert=m6().bind(null,"head"),Cs.domAPI=m4(),Cs.insertStyleElement=ge(),m2()(Ca.A,Cs);let Cl=Ca.A&&Ca.A.locals?Ca.A.locals:void 0;function Cc({children:e}){let t=(0,f4.useContext)(k0),n=(0,f4.useContext)(k1),r=t??n,o=m$(()=>r?.close());return(0,mX.jsx)(ko,{className:Cl.dialog,ref:o,children:e})}let Cu=(0,f4.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},o){let i="range"===e;return(0,mX.jsx)(kY,{ref:o,className:Cl.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,mX.jsx)(Cc,{children:(0,mX.jsxs)(i?$X:$Z,{...i?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,mX.jsxs)("header",{className:Cl.header,children:[(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,Cl.flatButtonMd),slot:"previous",children:(0,mX.jsx)(g1,{size:16})}),(0,mX.jsx)(Ci,{className:Cl.monthYear}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,Cl.flatButtonMd),slot:"next",children:(0,mX.jsx)(g2,{size:16})})]}),(0,mX.jsx)($0,{className:Cl.calendarGrid,children:e=>(0,mX.jsx)($4,{className:m0()("cds--date-picker__day",{[Cl.today]:0===t.compare(e)}),date:e},e.toString())})]})})})}),Cp=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(k0),[r,o]=yP({slot:e.slot},t,w2),{locale:i}=vy(),a=w0({...r,locale:i,createCalendar:$P}),s=(0,f4.useRef)(null),{fieldProps:l,inputProps:c}=wS({...r,inputRef:s},a,o),u=(0,f4.useCallback)(()=>{a.isDisabled||n.toggle()},[]);return(0,mX.jsxs)(yM,{values:[[w3,a],[$8,{...c,ref:s}],[$5,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,mX.jsx)($6,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:u,children:a.segments.map((t,n)=>(0,f4.cloneElement)(e.children(t),{key:n}))}),(0,mX.jsx)($7,{})]})}),Cd=(0,f4.forwardRef)(function(e,t){let n=(0,f4.useContext)(k0),r=(0,f4.useContext)(k1);return(n??r).isInvalid?(0,mX.jsx)(b8,{ref:t,size:16,...e}):(0,mX.jsx)(gV,{ref:t,size:16,...e})});class Cf{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let Ch=new Map,Cm=(0,f4.forwardRef)(function({segment:e,...t},n){let r=(0,f4.useContext)(w3),o=yu(n),{segmentProps:i}=function(e,t,n){let r,o,i,a,s=(0,f4.useRef)(""),{locale:l,direction:c}=vy(),u=function(){var e;let{locale:t}=vy(),n=AE((e=$9)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,f4.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Cf(t,n)}},[t,n])}(),{ariaLabel:p,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:h}=wx.get(t),m=e.isPlaceholder?"":e.text,g=(0,f4.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),b=Aj({month:"long",timeZone:g.timeZone}),y=Aj({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=y.format(t.dateValue));else{let e=b.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=x7({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)}}),A=(0,f4.useMemo)(()=>new(0,x9.d)(l,{maximumFractionDigits:0}),[l]),$=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!A.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=A.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:w}=(r=function(e){let{locale:t}=vy(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Ch.has(n))return Ch.get(n);let r=new Intl.Collator(t,e);return Ch.set(n,r),r}({usage:"search",sensitivity:"base"}),o=(0,f4.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),i=(0,f4.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),a=(0,f4.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,o=(t=t.normalize("NFC")).length;for(;n+o<=e.length;n++){let i=e.slice(n,n+o);if(0===r.compare(t,i))return!0}return!1},[r]),(0,f4.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),k=Aj({hour:"numeric",hour12:!0}),x=(0,f4.useMemo)(()=>{let e=new Date;return e.setHours(0),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),C=(0,f4.useMemo)(()=>{let e=new Date;return e.setHours(12),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),E=Aj({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,f4.useMemo)(()=>{if("era"!==e.type)return[];let n=At(new vK(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:E.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[E,t.calendar,e.type]),D=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(w(x,n))t.setSegment("dayPeriod",0);else if(w(C,n))t.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=S.find(e=>w(e.formatted,n));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!A.isValidPartialNumber(r))return;let o=A.parse(r),i=o,a=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(i=A.parse(n));break;case"h12":a=!1,o>12&&(i=A.parse(n))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(i=A.parse(n));if(isNaN(o))return;let l=0!==i||a;l&&t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=r}}};AK((0,f4.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=n.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(n.current)});let M=(0,f4.useRef)("");AK(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":A.isValidPartialNumber(e.text)&&!t.isReadOnly&&$();break;case"insertCompositionText":M.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&D(r.data)}}),AK(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=M.current),null!=r&&(w(x,r)||w(C,r))&&D(r))}),yd(()=>{let e=n.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[n,h]);let z=_e()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,f4.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let O=yx(),P=!t.isDisabled&&!t.isReadOnly&&e.isEditable,T="literal"===e.type?"":u.of(e.type),B=AV({"aria-label":`${T}${p?`, ${p}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let j={caretColor:"transparent"};if("rtl"===c){j.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(j.direction="ltr")}return{segmentProps:yS(v,B,{id:O,...z,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:P,suppressContentEditableWarning:P,spellCheck:P?"false":void 0,autoCorrect:P?"off":void 0,[parseInt(f5().version,10)>=17?"enterKeyHint":"enterkeyhint"]:P?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!P?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(y8()?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(),$()}},onFocus:()=>{s.current="",n.current&&A0(n.current,{containingElement:A1(n.current)});let e=window.getSelection();null==e||e.collapse(n.current)},style:j,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:a,isFocused:s,isFocusVisible:l}=_3(),{hoverProps:c,isHovered:u}=_7({...t,isDisabled:r.isDisabled||"literal"===e.type}),p=function(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,f4.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:e??o,style:l||a?{...a,...l}:void 0,children:c??i,"data-rac":""}},[t,n,r,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:u,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,f4.useCallback)(e=>{e.stopPropagation()},[]);return(0,mX.jsx)("span",{...yS(yV(t),i,a,c),...p,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":u||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:d})}),Cg={short:!1,size:"md"},Cb=(0,f4.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:c,light:u,maxDate:p,minDate:d,onChange:f,onChangeRaw:h,short:m,size:g,value:b,...y}={...Cg,...e},{calendar:v,intlLocale:A,today_:$}=x1(),w=(0,f4.useId)(),k=!!(c??l),x=(0,f4.useMemo)(()=>k5(r,v),[r,v]),C=(0,f4.useMemo)(()=>k5(b,v,!0),[b,v]),E=(0,f4.useMemo)(()=>k5(p,v),[p,v]),S=(0,f4.useMemo)(()=>k5(d??x2,v),[d,v]),D=(0,f4.useMemo)(()=>i||s,[i,s]),M=(0,f4.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(k6(e)))),[h,f]);return(0,mX.jsx)(k4,{locale:A.toString(),children:(0,mX.jsx)("div",{className:m0()("cds--form-item",n),children:(0,mX.jsx)(yM,{values:[[x0,A]],children:(0,mX.jsxs)(k2,{className:m0()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":u}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===A.language||void 0,...y,onChange:M,children:[(0,mX.jsxs)("div",{className:"cds--date-picker-container",children:[k&&(0,mX.jsx)(ku,{className:m0()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:c??l}),(0,mX.jsxs)($6,{className:Cl.inputGroup,children:[(0,mX.jsx)(Cp,{id:k?w:void 0,ref:t,className:m0()("cds--date-picker-input__wrapper",Cl.inputWrapper,{[Cl.inputWrapperSm]:"sm"===g,[Cl.inputWrapperMd]:"md"===g||!g||0===g.length,[Cl.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e}):(0,mX.jsx)(f5().Fragment,{})}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,{[Cl.flatButtonSm]:"sm"===g,[Cl.flatButtonMd]:"md"===g||!g||0===g.length,[Cl.flatButtonLg]:"lg"===g}),children:(0,mX.jsx)(Cd,{})})]}),(0,mX.jsx)(ka,{className:Cl.invalidText,children:a})]}),(0,mX.jsx)(Cu,{variant:"single",today_:$})]})})})})}),Cy=(0,f4.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:c,minDate:u,onChange:p,onChangeRaw:d,size:f="md",value:h,...m},g){let{calendar:b,intlLocale:y,today_:v}=x1(),A=(0,f4.useId)(),$=!!(s??a),w=(0,f4.useMemo)(()=>{if(h)return{start:k5(h[0],b,!1),end:k5(h[1],b,!1)}},[h,b]),k=(0,f4.useMemo)(()=>{if(t)return{start:k5(t[0],b,!1),end:k5(t[1],b,!1)}},[t,b]),x=(0,f4.useMemo)(()=>k5(u??x2,b,!0),[u,b]),C=(0,f4.useMemo)(()=>k5(c,b,!0),[c,b]),E=(0,f4.useMemo)(()=>n||i,[n,i]),S=(0,f4.useMemo)(()=>(d&&p&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),d??(e=>p?.([k6(e.start),k6(e.end)]))),[d,p]);return(0,mX.jsx)(k4,{locale:y.toString(),children:(0,mX.jsx)("div",{className:m0()("cds--form-item",e),children:(0,mX.jsx)(yM,{values:[[x0,y]],children:(0,mX.jsx)(k3,{id:$?A:void 0,className:m0()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:E,shouldForceLeadingZeros:"en"===y.language||void 0,maxValue:C,minValue:x,value:w,defaultValue:k,ref:g,isDisabled:o,...m,onChange:S,children:(0,mX.jsxs)("div",{className:"cds--date-picker-container",children:[$&&(0,mX.jsx)(ku,{className:m0()("cds--label",{"cds--label--disabled":o}),htmlFor:A,children:s??a}),(0,mX.jsxs)($6,{className:Cl.inputGroup,children:[(0,mX.jsxs)("div",{className:m0()(Cl.inputsWrapper,{[Cl.inputsWrapperSm]:"sm"===f,[Cl.inputsWrapperMd]:"md"===f||!f||0===f.length,[Cl.inputsWrapperLg]:"lg"===f}),children:[(0,mX.jsx)(w5,{className:m0()("cds--date-picker-input__wrapper",Cl.startInput,Cl.dateInputWrapper),slot:"start",children:e=>(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e})}),(0,mX.jsx)("div",{className:Cl.separator,children:(0,mX.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,mX.jsx)(w5,{className:m0()("cds--date-picker-input__wrapper",Cl.endInput,Cl.dateInputWrapper),slot:"end",children:e=>(0,mX.jsx)(Cm,{className:Cl.inputSegment,segment:e})})]}),(0,mX.jsx)(vr,{className:m0()(Cl.flatButton,{[Cl.flatButtonSm]:"sm"===f,[Cl.flatButtonMd]:"md"===f||!f||0===f.length,[Cl.flatButtonLg]:"lg"===f}),children:(0,mX.jsx)(Cd,{})})]}),(0,mX.jsx)(ka,{className:Cl.invalidText,children:r}),(0,mX.jsx)(Cu,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var C_=n(9124),Cv={};Cv.styleTagTransform=gn(),Cv.setAttributes=m7(),Cv.insert=m6().bind(null,"head"),Cv.domAPI=m4(),Cv.insertStyleElement=ge(),m2()(C_.A,Cv);let CA=C_.A&&C_.A.locals?C_.A.locals:void 0,C$=({diagnoses:e})=>{let{diagnosisTags:t}=hZ({externalModuleName:"@openmrs/esm-styleguide"});return(0,mX.jsx)("div",{className:CA.container,children:e.map(e=>{let{rank:n,uuid:r,display:o}=e,i=t[1===n?"primaryColor":"secondaryColor"];return(0,mX.jsx)(gu.vwO,{type:i,children:o},r)})})};var Cw=n(7770),Ck={};Ck.styleTagTransform=gn(),Ck.setAttributes=m7(),Ck.insert=m6().bind(null,"head"),Ck.domAPI=m4(),Ck.insertStyleElement=ge(),m2()(Cw.A,Ck);let Cx=Cw.A&&Cw.A.locals?Cw.A.locals:void 0,CC=({width:e="64",height:t="64"})=>(0,mX.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,mX.jsx)("use",{href:"#omrs-empty-data-illustration"})}),CE=e=>{let t="tablet"===mb(),n=e.launchForm;return(0,mX.jsx)(gu.Wdr,{className:Cx.layer,children:(0,mX.jsxs)(gu.FAs,{className:Cx.tile,children:[(0,mX.jsx)("div",{className:t?Cx.tabletHeading:Cx.desktopHeading,children:(0,mX.jsx)("h4",{children:e.headerTitle})}),(0,mX.jsx)(CC,{}),(0,mX.jsx)("p",{className:Cx.content,children:sv("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,mX.jsx)("p",{className:Cx.action,children:n&&(0,mX.jsx)(gu.$nd,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:sv("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var CS=n(6099),CD={};CD.styleTagTransform=gn(),CD.setAttributes=m7(),CD.insert=m6().bind(null,"head"),CD.domAPI=m4(),CD.insertStyleElement=ge(),m2()(CS.A,CD);let CM=CS.A&&CS.A.locals?CS.A.locals:void 0,Cz=({error:e,headerTitle:t})=>{let n="tablet"===mb();return(0,mX.jsx)(gu.Wdr,{children:(0,mX.jsxs)(gu.FAs,{className:CM.tile,children:[(0,mX.jsx)("div",{className:n?CM.tabletHeading:CM.desktopHeading,children:(0,mX.jsx)("h4",{children:t})}),(0,mX.jsxs)("p",{className:CM.errorMessage,children:[sv("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,mX.jsx)("p",{className:CM.errorCopy,children:sv("errorCopy")})]})})},CO=Cz;var CP=n(5764),CT={};CT.styleTagTransform=gn(),CT.setAttributes=m7(),CT.insert=m6().bind(null,"head"),CT.domAPI=m4(),CT.insertStyleElement=ge(),m2()(CP.A,CT);let CB=CP.A&&CP.A.locals?CP.A.locals:void 0,Cj=f5().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:o,state:i}=mv(),a=window.location??{pathname:""},s=hi(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,mX.jsxs)(gu.f8J,{"aria-label":sv("leftNavigation","Left navigation"),className:CB.leftNav,expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,mX.jsx)(hl,{name:"global-nav-menu-slot"}),n?(0,mX.jsx)(hW,{value:o,fallback:(0,mX.jsx)(hl,{name:n,state:{basePath:r,currentPath:a,...i}}),children:(0,mX.jsx)(f6.Provider,{value:o,children:(0,mX.jsx)(hl,{name:n,state:{basePath:r,currentPath:a,...i}})})}):null]}):null});var CI=n(8500),CN={};CN.styleTagTransform=gn(),CN.setAttributes=m7(),CN.insert=m6().bind(null,"head"),CN.domAPI=m4(),CN.insertStyleElement=ge(),m2()(CI.A,CN);let CR=CI.A&&CI.A.locals?CI.A.locals:void 0,CF=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:o})=>{let[i,a]=(0,f4.useState)(""),s=(0,f4.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:o}=(0,h1.A)(t,ar,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,f4.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&o}),[n,o,r,t])}(t),{locations:c,isLoading:u,hasMore:p,loadingNewData:d,error:f,setPage:h}=function(e,t=0,n=""){let r=h0(n),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=mc(function(n,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=`${ae}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),n&&a.append("_getpagesoffset",""+n*t),e&&a.append("_tag",e),"string"==typeof r&&""!==r&&a.append("name:contains",r),i+a.toString()},ar);return(0,f4.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])}(n,r,i),m=(0,f4.useMemo)(()=>l&&!i&&t?[l,...c.filter(({resource:e})=>e.id!==t)]:c??[],[l,c,t,i]),g=(0,f4.useCallback)(e=>{o(),a(e.trim())},[o]),b=mw((0,f4.useCallback)(()=>{!d&&p&&h(e=>e+1)},[d,p,h])),y=p?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)(gu.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:sv("searchForLocation"),id:s,placeholder:sv("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,mX.jsx)("div",{className:CR.errorNotification,id:`${s}-error`,children:(0,mX.jsx)(gu.jeF,{kind:"error",subtitle:sv("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:sv("error","Error")})}),(0,mX.jsx)("div",{className:CR.searchResults,children:u?(0,mX.jsx)("div",{className:CR.loadingContainer,children:Array.from({length:5}).map((e,t)=>(0,mX.jsx)(gu.Psq,{className:CR.radioButtonSkeleton,role:"progressbar"},t))}):(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("div",{className:CR.locationResultsContainer,children:m.length>0?(0,mX.jsx)(gu.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,mX.jsx)(gu.aaP,{className:CR.locationRadioButton,id:e.resource.id,labelText:(0,mX.jsx)("span",{ref:t===y?b:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,mX.jsx)("div",{className:CR.emptyState,children:(0,mX.jsx)("p",{className:CR.locationNotFound,children:sv("noResultsToDisplay")})})}),d&&(0,mX.jsx)("div",{className:CR.loadingIcon,children:(0,mX.jsx)(gu.OuH,{description:sv("loading")})})]})})]})},CL=V("modalState",{modalContainer:null,modalStack:[]}),CW=0;async function CG(e,t,n={}){let r=fL(t),o=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=r,a=await i(),s=CW++;o=o9({...a,name:`${t}-${s}`},{...n,domElement:e})}else T(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}let CV=window.getComputedStyle(document.body).overflow;function CU({modalStack:e,modalContainer:t}){t&&(e.length?(t.style.visibility||(addEventListener("keydown",CH),document.body.style.overflow="hidden",t.style.visibility="unset"),e.forEach((n,r)=>{switch(n.state){case"NEW":{let e=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:n.props?.size??"md"});n.container=e,CG(e,n.modalName,n.props).then(r=>{n.parcel=r,n.state="MOUNTED",t.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":n.container&&(n.container.style.visibility=r?"hidden":"unset");break;case"TO_BE_DELETED":n.onClose(),n.parcel?.unmount?.(),n.container?.remove(),setTimeout(()=>{CL.setState({modalContainer:t,modalStack:e.filter(e=>e!==n)})},0)}})):(t.style.removeProperty("visibility"),document.body.style.overflow=CV,removeEventListener("keydown",CH)))}function Cq(e){let t=CL.getState(),n=t.modalStack.map(t=>t===e?{...t,state:"TO_BE_DELETED"}:t);CL.setState({...t,modalStack:n})}function CH(e){"Escape"===e.key&&function(){let[e]=CL.getState().modalStack;e&&Cq(e)}()}function CK(e){CL.subscribe(CU),CL.setState({...CL.getState(),modalContainer:e})}function CY(e,t={},n=()=>{}){let r=()=>{let e=CL.getState().modalStack.find(e=>e.onClose===n);e&&Cq(e)};if(fL(e)){var o;let i,a;o={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},a=[o,...(i=CL.getState()).modalStack],CL.setState({...i,modalStack:a})}else T(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let CJ=({notification:e})=>{let{description:t,action:n,kind:r,critical:o,title:i,onAction:a}=e;return(0,mX.jsx)(gu.kZS,{actionButtonLabel:n,kind:r||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},CZ=({subject:e})=>{let[t,n]=(0,f4.useState)([]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(CJ,{notification:e},e.id))})},CX=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...c}=e,[u,p]=(0,f4.useState)(t);return(0,mX.jsx)(gu.kZS,{kind:o||"info",actionButtonLabel:u,ariaLabel:sv("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&p(s)},statusIconDescription:sv("actionableNotification","Actionable notification"),subtitle:r,title:i,lowContrast:a,inline:!0,...c})},CQ=({subject:e})=>{let[t,n]=(0,f4.useState)([]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(CX,{notification:e},e.id))})};var C0=Object.prototype.hasOwnProperty;let C1=function(e){if(null==e)return!0;if(tk(e)&&(t$(e)||"string"==typeof e||"function"==typeof e.splice||tS(e)||tI(e)||tA(e)))return!e.length;var t=nj(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tm(e))return!ng(e).length;for(var n in e)if(C0.call(e,n))return!1;return!0},C2=new dx,C3=0,C4=new dx,C5=0;function C6(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(CZ,{subject:C2}))}function C8(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!C1(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{C2.next({...e,id:C3++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function C7(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(CQ,{subject:C4}))}function C9(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!C1(t))?setTimeout(()=>{C4.next({...e,id:C5++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Ee=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Et=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var En=n(4112),Er={};Er.styleTagTransform=gn(),Er.setAttributes=m7(),Er.insert=m6().bind(null,"head"),Er.domAPI=m4(),Er.insertStyleElement=ge(),m2()(En.A,Er);let Eo=En.A&&En.A.locals?En.A.locals:void 0,Ei=({value:e,unit:t,label:n,interpretation:r,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,f4.useId)(),{referenceRange:c,isLoading:u}=function(e,t){let n=null;e&&(n=t?`${i9}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i9}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:i}=(0,h1.A)(n,ar),a=r?.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||r?void 0:i,s),p=o??c,d=(0,f4.useMemo)(()=>{if(r)return r?"--"===r?"normal":Ee.includes(r)?r.toLowerCase():Et.includes(r)?r:"normal":void 0;if(p&&!u){if(!p||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==p.hiAbsolute&&void 0!==p.hiAbsolute&&t>p.hiAbsolute?"off_scale_high":null!==p.hiCritical&&void 0!==p.hiCritical&&t>=p.hiCritical?"critically_high":null!==p.hiNormal&&void 0!==p.hiNormal&&t>p.hiNormal?"high":null!==p.lowAbsolute&&void 0!==p.lowAbsolute&&t<p.lowAbsolute?"off_scale_low":null!==p.lowCritical&&void 0!==p.lowCritical&&t<=p.lowCritical?"critically_low":null!==p.lowNormal&&void 0!==p.lowNormal&&t<p.lowNormal?"low":"normal"}return"normal"},[r,p,e,u])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,h="normal"!==d,m=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,y=null!=e&&""!==e,v=y?e:sv("notAvailable","Not available"),A=m0()({[Eo["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[Eo["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[Eo.low]:"low"===d,[Eo.high]:"high"===d,[Eo["off-scale-low"]]:"off_scale_low"===d,[Eo["off-scale-high"]]:"off_scale_high"===d}),$=m0()({[Eo.container]:!0,[Eo.card]:!0,[Eo["critical-value"]]:f,[Eo["abnormal-value"]]:h&&!f}),w=m0()({[Eo.cell]:!0,[A]:!0});return"cell"===a?(0,mX.jsxs)("div",{className:w,children:[v,y&&t?` ${t}`:""]}):(0,mX.jsxs)("section",{className:$,"data-testid":"numeric-observation-card",children:[n&&(0,mX.jsxs)("div",{className:Eo["label-container"],children:[(0,mX.jsx)("span",{id:m,className:Eo.label,children:n}),h&&(0,mX.jsx)("span",{className:Eo[d.replace("_","-")],title:sv("abnormalValue","Abnormal value")})]}),(0,mX.jsxs)("div",{className:Eo["value-container"],children:[(0,mX.jsx)("span",{id:g,"aria-labelledby":m&&b?`${m} ${b}`:m||b||void 0,className:Eo.value,children:v}),y&&t&&(0,mX.jsx)("span",{id:b,className:Eo.units,children:t})]})]})};var Ea=n(292),Es={};Es.styleTagTransform=gn(),Es.setAttributes=m7(),Es.insert=m6().bind(null,"head"),Es.domAPI=m4(),Es.insertStyleElement=ge(),m2()(Ea.A,Es);let El=Ea.A&&Ea.A.locals?Ea.A.locals:void 0,Ec=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,mX.jsx)("div",{className:m0()(El.pageHeader,n),...r,children:t})}{let{title:t,illustration:n,className:r,...o}=e;return(0,mX.jsx)("div",{className:m0()(El.pageHeader,r),...o,children:(0,mX.jsx)(Eu,{title:t,illustration:n})})}},Eu=({title:e,illustration:t,className:n})=>{let[r,o]=(0,f4.useState)(null);return(0,f4.useEffect)(()=>{r1("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,mX.jsxs)("div",{className:m0()(El.pageHeaderContent,n),children:[t,(0,mX.jsxs)("div",{className:El.pageLabels,children:[r?.implementationName&&(0,mX.jsx)("p",{children:sv(r.implementationName)}),(0,mX.jsx)("p",{className:El.pageName,children:e})]})]})};var Ep=n(2886),Ed={};Ed.styleTagTransform=gn(),Ed.setAttributes=m7(),Ed.insert=m6().bind(null,"head"),Ed.domAPI=m4(),Ed.insertStyleElement=ge(),m2()(Ep.A,Ed);let Ef=Ep.A&&Ep.A.locals?Ep.A.locals:void 0,Eh=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=mC(t,e,r,i),c="tablet"===mb(),u=sv("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,mX.jsx)(mX.Fragment,{children:e>0&&(0,mX.jsxs)("div",{className:m0()({[Ef.tablet]:c,[Ef.desktop]:!c}),children:[(0,mX.jsxs)("div",{children:[u,o&&(0,mX.jsx)(f8,{to:o,className:Ef.configurableLink,children:a??sv("seeAll","See all")})]}),(0,mX.jsx)(gu.dKS,{className:Ef.pagination,page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>sv("paginationOfPages","of {{count}} pages",{count:t}),size:c?"lg":"sm"})]})})};function Em(e){return Eb(E_(e,"usual","official"))}function Eg(e){return Em(e)}function Eb(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function Ey(e){return Eb(e)}function E_(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function Ev(e,t=mP()){let n=mP(t),r=xH(e,n);if(null==r)return null;let o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),c={};if(o<2)c.minutes=n.diff(r,"minutes");else if(i<2)c.hours=o;else if(a<4)c.days=i;else if(l<1){let e=n.subtract(a,"weeks").diff(r,"days");c.weeks=a,c.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");c.months=s,c.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");c.years=l,c.months=e}else c.years=l;return c}function EA(e,t=mP()){let n=Ev(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),xq(n,r)}var E$=n(6010),Ew={};Ew.styleTagTransform=gn(),Ew.setAttributes=m7(),Ew.insert=m6().bind(null,"head"),Ew.domAPI=m4(),Ew.insertStyleElement=ge(),m2()(E$.A,Ew);let Ek=E$.A&&E$.A.locals?E$.A.locals:void 0;function Ex({showIdentifierLabel:e,type:t,value:n}){return(0,mX.jsx)("span",{className:Ek.primaryIdentifier,children:(0,mX.jsxs)(gu.vwO,{className:Ek.tag,type:"gray",children:[e&&t?.text&&(0,mX.jsxs)("span",{className:Ek.label,children:[t.text,": "]}),(0,mX.jsx)("span",{className:Ek.value,children:n})]})})}function EC({showIdentifierLabel:e,type:t,value:n}){return(0,mX.jsxs)(gu.lRv,{className:Ek.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,mX.jsxs)("span",{className:Ek.label,children:[t?.text,": "]}),(0,mX.jsx)("span",{className:Ek.value,children:n})]})}function EE({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=hZ(),{primaryIdentifierCode:r}=mD(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,mX.jsx)(mX.Fragment,{children:o?.length?o.map(({value:e,type:n},i)=>(0,mX.jsxs)(f5().Fragment,{children:[(0,mX.jsx)("span",{className:Ek.identifier,children:n?.coding?.[0]?.code===r?(0,mX.jsx)(Ex,{showIdentifierLabel:t,type:n,value:e}):(0,mX.jsx)(EC,{showIdentifierLabel:t,type:n,value:e})}),i<o.length-1&&(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"})]},e)):""})}let ES={Female:bo,Male:bi,Other:ba,Unknown:bs},ED=({gender:e})=>{let t=ES[e];return t?(0,mX.jsx)(t,{fill:"#525252"}):null},EM={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Ez({patient:e,renderedFrom:t}){var n;let r,o,i=Em(e),a=e?.gender&&(o=EM[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:sv(r,n),iconKey:o}),s=(0,f4.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,mX.jsxs)("div",{className:Ek.patientInfo,children:[(0,mX.jsx)("div",{className:m0()(Ek.row,Ek.patientNameRow),children:(0,mX.jsxs)("div",{className:Ek.flexRow,children:[(0,mX.jsx)("span",{className:Ek.patientName,children:i}),a&&(0,mX.jsxs)("div",{className:Ek.gender,children:[(0,mX.jsx)(ED,{gender:a.iconKey}),(0,mX.jsx)("span",{children:a.displayText})]}),(0,mX.jsx)(hl,{className:Ek.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,mX.jsxs)("div",{className:Ek.demographics,children:[e.birthDate&&(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("span",{children:EA(e.birthDate)}),(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"}),(0,mX.jsx)("span",{children:xF(e.birthDate,{time:!1})}),(0,mX.jsx)("span",{className:Ek.separator,children:"\xb7"})]}),(0,mX.jsx)(EE,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,mX.jsx)(hl,{className:Ek.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var EO=n(1673),EP=n(9102),ET={};ET.styleTagTransform=gn(),ET.setAttributes=m7(),ET.insert=m6().bind(null,"head"),ET.domAPI=m4(),ET.insertStyleElement=ge(),m2()(EP.A,ET);let EB=EP.A&&EP.A.locals?EP.A.locals:void 0;function Ej({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[o,i]=(0,f4.useState)(!1),{extensions:a}=ha(n),s="tablet"===mb(),l=m$(()=>i(!1),o),c=(0,f4.useRef)(null),u=(0,f4.useRef)(null),p=(0,f4.useId)(),d=`patient-actions-menu-trigger-${p}`,f=`patient-actions-menu-${p}`,h=(0,f4.useCallback)(()=>i(e=>!e),[]),m=(0,f4.useCallback)(()=>{i(!1),c.current?.focus()},[]),g=(0,f4.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=u.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,f4.useEffect)(()=>{if(o&&u.current){let e=u.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let b=(0,f4.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...r}),[t,e,m,r]);return 0===a.length?null:(0,mX.jsx)("div",{className:EB.overflowMenuContainer,children:(0,mX.jsxs)("div",{"data-overflow-menu":!0,className:m0()("cds--overflow-menu",gm.container),ref:l,children:[(0,mX.jsxs)("button",{className:m0()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},gm.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:h,onKeyDown:g,ref:c,children:[(0,mX.jsx)("span",{className:EB.actionsButtonText,children:sv("actions","Actions")})," ",(0,mX.jsx)(EO.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,mX.jsxs)("div",{className:m0()("cds--overflow-menu-options","cds--overflow-menu--flip",gm.menu,{[gm.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:u,role:"menu",tabIndex:-1,children:[(0,mX.jsx)("ul",{className:m0()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,mX.jsx)(hl,{name:n,state:b},n)}),(0,mX.jsx)("span",{})]})]})})}var EI=n(6767),EN=n.n(EI);function ER(e){let{patientPhotoConceptUuid:t}=hZ({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${i9}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:o,isLoading:i}=(0,hk.Ay)(e?n:null,ar),a=r?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let EF=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,hw.useTranslation)();return(0,mX.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,mX.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,mX.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})};var EL=n(7268),EW={};EW.styleTagTransform=gn(),EW.setAttributes=m7(),EW.insert=m6().bind(null,"head"),EW.domAPI=m4(),EW.insertStyleElement=ge(),m2()(EL.A,EW);let EG=EL.A&&EL.A.locals?EL.A.locals:void 0;function EV({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:o}=ER(e),[i,a]=(0,f4.useState)(null),[s,l]=(0,f4.useState)(!1),c=(0,f4.useMemo)(()=>EN().generate(e),[e]);(0,f4.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(a(e),l(!1))},n.onerror=()=>{t||(a(null),l(!1))},n.src=e,()=>{t=!0}}a(null),l(!1)},[r?.imageSrc]);let u=(0,f4.useMemo)(()=>n||(i?sv("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):sv("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,i,t]);return o||s?(0,mX.jsx)(gu.ryE,{className:EG.skeleton,"data-testid":"skeleton-icon"}):r?.imageSrc&&!i?(0,mX.jsx)(EF,{"aria-label":sv("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,mX.jsx)("div",{"aria-label":u,children:(0,mX.jsx)("img",{className:EG.avatar,src:i,alt:u,title:t})}):(0,mX.jsx)("div",{"aria-label":u,children:(0,mX.jsx)("div",{className:EG.avatar,title:t,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,mX.jsx)("span",{className:EG.initials,children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}var EU=n(1636),Eq={};Eq.styleTagTransform=gn(),Eq.setAttributes=m7(),Eq.insert=m6().bind(null,"head"),Eq.domAPI=m4(),Eq.insertStyleElement=ge(),m2()(EU.A,Eq);let EH=EU.A&&EU.A.locals?EU.A.locals:void 0,EK=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],EY=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),EJ=EY,EZ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),EX=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),EQ=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),E0=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),E1=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),E2=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),E3=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),E4=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),E5=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),E6=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),E8=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),E7=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),E9=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Se=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),St=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Sn=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Sr=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),So=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Si=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Sa=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Ss=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Sl=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Sc=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Su=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Sp=(0,f4.memo)((0,f4.forwardRef)(function(e,t){return(0,mX.jsx)(Sm,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Sd=E4,Sf=Sn,Sh=(0,f4.memo)((0,f4.forwardRef)(function({pictogram:e,fallback:t,...n},r){let o=(0,f4.useRef)(document.getElementById(e));return(0,f4.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,mX.jsx)(hW,{value:o.current,fallback:t,children:(0,mX.jsx)(Sm,{ref:r,pictogram:e,pictogramProps:n})})})),Sm=(0,f4.memo)((0,f4.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,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,mX.jsx)("svg",{ref:n,className:m0()(EH.pictogram,r),height:o,width:o,children:(0,mX.jsx)("use",{href:`#${e}`})})})),Sg=({children:e})=>"tablet"===mb()?(0,mX.jsx)(gu.Wdr,{children:e}):(0,mX.jsx)(mX.Fragment,{children:e});var Sb=n(5925),Sy={};Sy.styleTagTransform=gn(),Sy.setAttributes=m7(),Sy.insert=m6().bind(null,"head"),Sy.domAPI=m4(),Sy.insertStyleElement=ge(),m2()(Sb.A,Sy);let S_=Sb.A&&Sb.A.locals?Sb.A.locals:void 0,Sv=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==r,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==r,title:u,id:p,...d}=e,[f,h]=(0,f4.useState)(n),[m,g]=(0,f4.useState)(!0),[b,y]=(0,f4.useState)(!1),v=(0,f4.useCallback)(()=>{setTimeout(t,250)},[t]),A=(0,f4.useCallback)(()=>{y(!0),v()},[v]);return(0,f4.useEffect)(()=>{if(c){let e=setTimeout(A,l);return()=>clearTimeout(e)}},[l,c,A]),(0,f4.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,mX.jsx)(gu.kZS,{actionButtonLabel:f,"aria-label":sv("closeSnackbar","Close snackbar"),className:m0()(S_.slideIn,{[S_.animated]:m,[S_.slideOut]:b}),kind:r,lowContrast:i,onActionButtonClick:()=>{o(),A(),a&&h(a)},onClose:v,statusIconDescription:sv("snackbarNotification","Snackbar notification"),subtitle:s,title:u,...d})},SA=({subject:e})=>{let[t,n]=(0,f4.useState)([]),r=(0,f4.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(Sv,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},S$=new dx,Sw=0;function Sk(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(SA,{subject:S$}))}function Sx(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{S$.next({...e,id:Sw++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let SC=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,f4.useCallback)(()=>{s(),t()},[t,s]);return(0,mX.jsx)("div",{children:(0,mX.jsx)(gu.kZS,{actionButtonLabel:a,kind:r||"info",lowContrast:o,subtitle:n,title:i||"",onActionButtonClick:l,onClose:t})})},SE=({subject:e})=>{let[t,n]=(0,f4.useState)([]),r=(0,f4.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,f4.useEffect)(()=>{let t=e.subscribe(e=>n(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,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsx)(SC,{toast:e,closeToast:()=>r(e)},e.id))})},SS=new dx,SD=0;function SM(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(SE,{subject:SS}))}function Sz(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!C1(t))?setTimeout(()=>{SS.next({...e,id:SD++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function SO(e,t=!1){if(t)return!0;let n=SI[e];return!n||!n()}function SP(e,t){let n=SU.getState()?.workspaceGroup,r=n?.name;r&&e===r&&SY(()=>{let r=S0(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),SU.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function ST(e,t){let{name:n,additionalProps:r}=t;fH(n);let o=()=>{SW(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>SB(n,r),closeWorkspaceGroup:!1})};SO(e.name)?o():SZ("closing-workspace-launching-new-workspace",o,e.title??e.name)}function SB(e,t){let n=fH(e),r=SU.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void SP(r.name,()=>{SB(e,t)});let o=SU.getState().workspaceGroup?.name,i={...n,title:SX(n,t),closeWorkspace:(t={})=>SW(e,t),closeWorkspaceWithSavedChanges:t=>SW(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(SI[n]=r)},setTitle:(t,n)=>{i.title=t,i.titleNode=n,SU.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){SU.setState(n=>{let r=[e,...t??n.openWorkspaces],o=SK(e);return{...n,openWorkspaces:r,workspaceWindowState:o}})}o&&S0(o,t);let s=SU.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),c=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===SX(t,t.additionalProps)&&{title:SX(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else c?(a(c,SU.getState().openWorkspaces.filter(e=>e.type!=i.type)),ST(c,{name:e,additionalProps:t})):a(i);else ST(s[0],{name:e,additionalProps:t})}function Sj({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){SG(t),SB(n,r),iQ({to:e})}let SI={};function SN(e,t){SI[e]=t}function SR(e){return SI[e]}function SF(){let e=SU.getState();SU.setState({...e,prompt:null})}let SL={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function SW(e,t={}){t={...SL,...t};let n=()=>{let n=SU.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),o=SU.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&SP(o),SI[e]=()=>!1,SU.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:SK(r?.[0])})),t?.onWorkspaceClose?.()};return SO(e,t?.ignoreChanges)?(n(),!0):(SZ("closing-workspace",n,fH(e).title??e),!1)}function SG(e){SU.getState().context!=e&&SU.setState({context:e,openWorkspaces:[],prompt:null})}let SV={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},SU=V("workspace",SV);function Sq(){return SU}function SH(e){let t=SU.getState();SU.setState({...t,workspaceWindowState:e})}function SK(e){return e?.preferredWindowSize??"normal"}function SY(e=()=>{},t=()=>!0){let n=SU.getState().openWorkspaces.filter(t).every(({name:e})=>SO(e)),r=()=>{SQ(),e?.()};n?r():SZ("closing-all-workspaces",r)}function SJ(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=ht(SU);return(0,f4.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function SZ(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:sv("unsavedChangesTitleText","Unsaved changes"),body:sv("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:sv("discard","Discard")};break;case"closing-all-workspaces":{let e=SU.getState().openWorkspaces.filter(({name:e})=>!SO(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:sv("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:sv("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:sv("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:sv("unsavedChangesTitleText","Unsaved changes"),body:sv("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{SU.setState(e=>({...e,prompt:null})),t?.()},confirmText:sv("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}SU.setState(e=>({...e,prompt:r}))}function SX(e,t){return t?.workspaceTitle??e.title}function SQ(){SU.setState(SV)}function S0(e,t={}){if(!e||"default"===e)return;let n=q(e,{});return t&&n.setState(e=>({...e,...t})),n}var S1=n(1341),S2={};S2.styleTagTransform=gn(),S2.setAttributes=m7(),S2.insert=m6().bind(null,"head"),S2.domAPI=m4(),S2.insertStyleElement=ge(),m2()(S1.A,S2);let S3=S1.A&&S1.A.locals?S1.A.locals:void 0;function S4({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,mX.jsxs)(mX.Fragment,{children:[e({size:16}),t?(0,mX.jsx)("span",{className:S3.interruptedTag,children:"!"}):(0,mX.jsx)("span",{className:S3.countTag,children:n})]})}let S5=({getIcon:e,label:t,iconDescription:n,handler:r,type:o,tagContent:i})=>{let a=mb(),{workspaces:s,workspaceWindowState:l}=SJ(),c=s?.findIndex(({type:e})=>e===o)??-1,u="hidden"!==l&&0===c,p=c>0||0===c&&"hidden"===l;return"tablet"===a||"phone"===a?(0,mX.jsxs)(gu.$nd,{className:m0()(S3.container,{[S3.active]:u}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,mX.jsx)("span",{className:S3.elementContainer,children:(0,mX.jsx)(S4,{formOpenInTheBackground:p,getIcon:e,tagContent:i})}),(0,mX.jsx)("span",{children:t})]}):(0,mX.jsx)(gu.K0,{align:"left","aria-label":n,className:m0()(S3.container,{[S3.active]:u}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,mX.jsx)("div",{className:S3.elementContainer,children:(0,mX.jsx)(S4,{formOpenInTheBackground:p,getIcon:e,tagContent:i})})})};var S6=n(4535),S8=n(771),S7=/[\\^$.*+?()[\]{}|]/g,S9=RegExp(S7.source);let De=function(e){return(e=rd(e))&&S9.test(e)?e.replace(S7,"\\$&"):e};var Dt=n(7781),Dn={};Dn.styleTagTransform=gn(),Dn.setAttributes=m7(),Dn.insert=m6().bind(null,"head"),Dn.domAPI=m4(),Dn.insertStyleElement=ge(),m2()(Dt.A,Dn);let Dr=Dt.A&&Dt.A.locals?Dt.A.locals:void 0;function Do({contextKey:e}){let{prompt:t}=SJ();return(0,f4.useEffect)(()=>{RegExp(`/${De(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,f4.useEffect)(()=>(SG(e),()=>{SG(null)}),[e]),(0,f4.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,o=RegExp(`/${De(e)}(/|$)`),i=new URL(r),a=o.test(i.pathname),s=SU.getState().openWorkspaces.every(({name:e})=>SO(e));a||(s?SQ():(n?.(),SY(()=>{iQ({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,mX.jsxs)(gu.KXP,{open:!0,onClose:SF,children:[(0,mX.jsx)(gu.rQ0,{title:t.title}),(0,mX.jsx)(gu.cwr,{children:(0,mX.jsx)("p",{className:Dr.messageBody,children:t.body})}),(0,mX.jsxs)(gu.jlY,{children:[(0,mX.jsx)(gu.$nd,{kind:"secondary",onClick:SF,children:t.cancelText??sv("cancel")}),(0,mX.jsx)(gu.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??sv("confirm")})]})]}):null}function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Di(Object(n),!0).forEach(function(t){Dl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ds(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e){return(Dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Du(e,t){return(Du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dp(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dd=function(e){var t=f4.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&&Du(a,t);var n,r,o,i=(n=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=Dc(a);e=n?Reflect.construct(t,arguments,Dc(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 Dp(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),Dl(Dp(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Dl(Dp(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),Dl(Dp(t),"getParcelProps",function(){var e=Da(Da({},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 r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)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(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,Da({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 hm&&hm.Consumer?f4.createElement(hm.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=hm&&hm.Consumer?f4.createElement(hm.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return f4.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ds(a.prototype,r),o&&Ds(a,o),a}();Dl(Dd,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var Df=n(7515),Dh={};Dh.styleTagTransform=gn(),Dh.setAttributes=m7(),Dh.insert=m6().bind(null,"head"),Dh.domAPI=m4(),Dh.insertStyleElement=ge(),m2()(Df.A,Dh);let Dm=Df.A&&Df.A.locals?Df.A.locals:void 0;function Dg({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,f4.useState)(),o=function(e){let[t,n]=(0,f4.useState)({}),[r,o]=(0,f4.useState)(e);return(0,f4.useEffect)(()=>{r!==e&&o(e)},[e]),(0,f4.useEffect)(()=>{let e,t=S0(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,f4.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let i=(0,f4.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return n?(0,mX.jsx)(Dd,{config:n,mountParcel:o9,...i},e.name):(0,mX.jsx)(gu.OuH,{className:Dm.loader,description:`${sv("loading","Loading")} ...`})}var Db=n(4646),Dy={};Dy.styleTagTransform=gn(),Dy.setAttributes=m7(),Dy.insert=m6().bind(null,"head"),Dy.domAPI=m4(),Dy.insertStyleElement=ge(),m2()(Db.A,Dy);let D_=Db.A&&Db.A.locals?Db.A.locals:void 0;function Dv({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,o]=(0,f4.useState)(!1),i=(0,f4.useRef)(window.innerHeight),{featureName:a}=(0,f4.useContext)(f6),s=mb();(0,f4.useEffect)(()=>{let e=()=>{o(!my(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,mX.jsx)("aside",{className:m0()(D_.sideRail,{[D_.withinWorkspace]:e,[D_.sideRailHidden]:r,[D_.sideRailVisible]:!r}),children:(0,mX.jsx)("div",{className:D_.container,children:(0,mX.jsx)(hl,{className:D_.chartExtensions,name:l,state:n})})})}function DA({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:o}){let i=mb(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=SJ(),c=l?.name,u=a[0],p="hidden"===s||null==u,d=u?.width??(t?"wider":"narrow"),f=(0,f4.useMemo)(()=>n||c&&!p,[c,p,n]);return hK(!p&&!my(i)),(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)("div",{className:n?Dm.workspaceContainerWithActionMenu:Dm.workspaceContainerWithoutActionMenu,children:[(0,mX.jsx)("aside",{className:m0()(t?Dm.workspaceOverlayOuterContainer:Dm.workspaceWindowSpacer,{[Dm.hiddenRelative]:p,[Dm.narrowWorkspace]:"narrow"===d,[Dm.widerWorkspace]:"wider"===d,[Dm.extraWideWorkspace]:"extra-wide"===d}),children:(0,mX.jsx)("div",{className:m0()(Dm.workspaceFixedContainer,{[Dm.maximizedWindow]:"maximized"===s,[Dm.hiddenFixed]:p}),children:a.map((e,t)=>(0,mX.jsx)("div",{className:m0()(Dm.workspaceInnerContainer,{[Dm.hiddenExtraWorkspace]:0!==t}),children:(0,mX.jsx)(f4.Suspense,{fallback:null,children:(0,mX.jsx)(hw.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,mX.jsx)(D$,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,mX.jsx)(Do,{contextKey:e})]}),f&&(0,mX.jsx)(Dv,{name:c,isWithinWorkspace:!n,actionMenuProps:o})]})}function D$({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,hw.useTranslation)(),r=mb(),{workspaceWindowState:o,workspaceGroup:i}=SJ(),a=i?.name,s="maximized"===o;(0,f4.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,f4.useContext)(f6),c=(0,f4.useCallback)(()=>{SH(s?"normal":"maximized")},[s]),{canHide:u=!1,canMaximize:p=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,f4.useMemo)(()=>e??{},[e]),h=(0,f4.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)(gu.Y9Y,{"aria-label":sv("workspaceHeader","Workspace Header"),className:Dm.header,children:[!my(r)&&!u&&(0,mX.jsx)(gu.dJ2,{"aria-label":sv("close","Close"),renderMenuIcon:(0,mX.jsx)(gR,{}),onClick:()=>f()}),(0,mX.jsx)(gu.bCw,{prefix:"",children:e.titleNode??n(e.title)}),(0,mX.jsx)("div",{className:Dm.overlayHeaderSpacer}),(0,mX.jsxs)(gu.wdv,{className:Dm.headerButtons,children:[(0,mX.jsx)(hl,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,mX.jsx)(hl,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,mX.jsx)(hl,{name:`workspace-header-${l}-slot`,state:h}),my(r)&&(0,mX.jsxs)(mX.Fragment,{children:[(p||s)&&(0,mX.jsx)(gu.V8d,{"aria-label":s?sv("minimize","Minimize"):sv("maximize","Maximize"),onClick:c,children:s?(0,mX.jsx)(S6.Xj,{}):(0,mX.jsx)(S6.hz,{})}),u&&!a?(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide","Hide"),onClick:()=>SH("hidden"),children:(0,mX.jsx)(gF,{})}):(0,mX.jsx)(gu.V8d,{"aria-label":sv("close","Close"),onClick:()=>f?.(),children:(0,mX.jsx)(g4,{})})]}),"tablet"===r&&u&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("close","Close"),onClick:()=>f?.(),children:(0,mX.jsx)(S8.d3,{})})]})]}),(0,mX.jsx)("div",{className:m0()(Dm.workspaceContent,{[Dm.marginWorkspaceContent]:!!d}),children:(0,mX.jsx)(Dg,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function Dw(e,t){let{openedGroup:n}=fY.getState();if(n){if(n.groupName===e&&DC(n.props,t))return!0;else if(!await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return fY.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Dk(e){let{openedGroup:t,openedWindows:n}=fY.getState();if(t){if(n.length>0&&!(e||await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;fY.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Dx(e,t=null,n=null,r=null){let o=fY.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=fJ(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=fZ(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let c=fX(e);if(a&&(a.groupName!==l.name||!DC(a.props,r)))return!!await DE({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let r=o.openedWindows[c],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:u}=r;if(DC(r.props,n)){let p=u.find(t=>t.workspaceName===e);return p&&DC(p.props,t)?((a||c!==o.openedWindows.length-1)&&fY.setState(DS.restoreWindow(o,s)),!0):!!await DE({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==c),{windowName:s,openedWorkspaces:[DO(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await DE({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==c),{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(fY.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await DE({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(fY.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[DO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function DC(e,t){return null==e||null==t||I(e,t)}function DE(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&n.push(o),t&&o.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=fY.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=CY("workspace2-close-prompt",{onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let DS={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[r],maximized:n};return o[r]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],o=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=fX(t);if(n<0)return e;let r={...e.openedWindows[n]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;i.splice(n,1),t&&i.length>0&&(a=!1)}else i[n]=r;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,n,r){let o=e.registeredWorkspacesByName[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} 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 ${n} 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 ${n} from parent workspace ${t} as the parent is not opened within the workspace window`);let c=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...c,DO(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=fX(t);if(r<0)return e;let o={...e.openedWindows[r]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:n};let a=[...e.openedWindows];return a[r]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function DD(){return hn(fY,DS)}let DM=()=>(0,f4.useContext)(hm),Dz=()=>Object.keys(fY.getState().registeredWorkspacesByName);function DO(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:p1()}}var DP=n(1179),DT={};DT.styleTagTransform=gn(),DT.setAttributes=m7(),DT.insert=m6().bind(null,"head"),DT.domAPI=m4(),DT.insertStyleElement=ge(),m2()(DP.A,DT);let DB=DP.A&&DP.A.locals?DP.A.locals:void 0,Dj=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=mb(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:u,registeredWorkspacesByName:p,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=DD(),{workspaceName:m,isRootWorkspace:g,closeWorkspace:b,showActionMenu:y}=DM(),v=fX(m),A=s[v],$=A?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,f4.useEffect)(()=>{$?.hasUnsavedChanges!=n&&a(m,n??!1)},[$?.hasUnsavedChanges,n,m,a]),(0,f4.useEffect)(()=>{d[m]!==e&&f(m,e)},[d,m,e,f]),v<0||null==l||null==$)return null;let w=c[l.groupName];if(!w)throw Error(`Cannot find registered workspace group ${l.groupName}`);let k=p[m].window,x=u[k];if(!x)throw Error(`Cannot find registered workspace window ${k}`);let{icon:C,canMaximize:E}=x,S="closable"===w.persistence,D=!!C&&!S,{maximized:M}=A,z=x?.width??"narrow",O=Object.values(u).some(e=>e.group===l.groupName&&void 0!==e.icon),P=v<s.length-1||h;return(0,mX.jsxs)("div",{className:m0()(DB.workspaceOuterContainer,{[DB.narrowWorkspace]:"narrow"===z,[DB.widerWorkspace]:"wider"===z,[DB.extraWideWorkspace]:"extra-wide"===z,[DB.isActionMenuOpened]:O}),children:[(0,mX.jsx)("div",{className:m0()(DB.workspaceSpacer,{[DB.hidden]:P})}),(0,mX.jsx)("div",{className:m0()(DB.workspaceMiddleContainer,{[DB.maximized]:M,[DB.hidden]:P,[DB.isRootWorkspace]:g,[DB.showActionMenu]:y}),children:(0,mX.jsxs)("div",{className:m0()(DB.workspaceInnerContainer,{[DB.maximized]:M,[DB.hidden]:P,[DB.isRootWorkspace]:g}),children:[(0,mX.jsxs)(gu.Y9Y,{"aria-label":sv("workspaceHeader"),className:DB.header,children:[(0,mX.jsx)(gu.bCw,{prefix:"",children:e}),(0,mX.jsx)("div",{className:DB.overlayHeaderSpacer}),(0,mX.jsx)(gu.wdv,{className:DB.headerButtons,children:my(r)?(0,mX.jsxs)(mX.Fragment,{children:[(E||M)&&(0,mX.jsx)(gu.V8d,{"aria-label":M?sv("minimize"):sv("maximize"),onClick:()=>o(k,!M),children:M?(0,mX.jsx)(S6.Xj,{}):(0,mX.jsx)(S6.hz,{})}),D&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide"),onClick:()=>i(),children:(0,mX.jsx)(gF,{})}),!S&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("close"),onClick:()=>b({closeWindow:!0}),children:(0,mX.jsx)(g4,{})})]}):(0,mX.jsxs)(mX.Fragment,{children:[D&&(0,mX.jsx)(gu.V8d,{"aria-label":sv("hide"),onClick:()=>i(),children:(0,mX.jsx)(S8.d3,{})}),(0,mX.jsx)(gu.V8d,{"aria-label":sv("close"),onClick:()=>{S?Dk():b({closeWindow:!0})},children:(0,mX.jsx)(g4,{})})]})})]}),(0,mX.jsx)("div",{className:m0()(DB.workspaceContent),children:t})]})})]})};var DI=n(7810),DN={};DN.styleTagTransform=gn(),DN.setAttributes=m7(),DN.insert=m6().bind(null,"head"),DN.domAPI=m4(),DN.insertStyleElement=ge(),m2()(DI.A,DN);let DR=DI.A&&DI.A.locals?DI.A.locals:void 0;function DF({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,mX.jsxs)(mX.Fragment,{children:[e({size:16}),t?(0,mX.jsx)("span",{className:DR.interruptedTag,children:"!"}):(0,mX.jsx)("span",{className:DR.countTag,children:n})]})}let DL=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let i=mb(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=DD(),{extension:u}=(0,f4.useContext)(f6),p=a.findIndex(e=>e.windowName===u?.extensionId),d=a[p],f=null!=d,h=f&&(p<a.length-1||c),m=f&&!h,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(f)h?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;Dx(e,t,n)}};return"tablet"===i||"phone"===i?(0,mX.jsxs)(gu.$nd,{className:m0()(DR.container,{[DR.active]:f&&!m,[DR.focused]:m}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",children:[(0,mX.jsx)("span",{className:DR.elementContainer,children:(0,mX.jsx)(DF,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,mX.jsx)("span",{children:t})]}):(0,mX.jsx)(gu.K0,{align:"left","aria-label":t,className:m0()(DR.container,{[DR.active]:f&&!m,[DR.focused]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",children:(0,mX.jsx)("div",{className:DR.elementContainer,children:(0,mX.jsx)(DF,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function DW({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,mX.jsx)(gu.$nd,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?g3:g0,children:e?sv("showLess","Show less"):sv("showMore","Show more")})}var DG=n(5804),DV={};DV.styleTagTransform=gn(),DV.setAttributes=m7(),DV.insert=m6().bind(null,"head"),DV.domAPI=m4(),DV.insertStyleElement=ge(),m2()(DG.A,DV);let DU=DG.A&&DG.A.locals?DG.A.locals:void 0,Dq=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${i9}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=(0,hk.Ay)(t,ar),o=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,f4.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsxs)("p",{className:DU.heading,children:[sv("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>xT(e?.startDate).getTime()-xT(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,mX.jsx)("li",{children:(0,mX.jsx)(f8,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,mX.jsx)("li",{children:"--"})})(),t.length>3&&(0,mX.jsx)("li",{className:DU.link,children:(0,mX.jsx)(f8,{to:`${window.spaBase}/home/patient-lists`,children:sv("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},DH=({patientId:e})=>{let{patient:t,isLoading:n}=mS(e),r=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("address","Address")}),(0,mX.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,mX.jsxs)("li",{children:[sv(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,mX.jsxs)("li",{children:[sv(e,e),": ",t]},`address-${e}`)):(0,mX.jsx)("li",{children:"--"})})]})},DK=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=hZ({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:o}=(e=>{let{data:t,error:n,isLoading:r}=(0,h1.A)(`${i9}/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)))`,ar);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,f4.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:o,error:r}})(e),r=(0,f4.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?sv(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("contactDetails","Contact Details")}),t?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,mX.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,mX.jsx)("li",{children:"--"})})]})},DY=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${i9}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:o,isValidating:i}=(0,hk.Ay)(e?t:null,ar),a=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?a:null,error:r,isLoading:o,isValidating:i}}(e);return(0,mX.jsxs)(mX.Fragment,{children:[(0,mX.jsx)("p",{className:DU.heading,children:sv("relationships","Relationships")}),n?(0,mX.jsx)(gu.OuH,{description:`${sv("loading","Loading")} ...`,role:"progressbar"}):(0,mX.jsx)("ul",{children:t&&t.length>0?(0,mX.jsx)(mX.Fragment,{children:t.map(e=>(0,mX.jsxs)("li",{className:DU.relationship,children:[(0,mX.jsx)("div",{children:(0,mX.jsx)(f8,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,mX.jsx)("div",{children:e.relationshipType}),(0,mX.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?sv("yearAbbreviation","yr"):sv("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,mX.jsx)("li",{children:"--"})})]})};function DJ({patientId:e,deceased:t}){return(0,mX.jsxs)("div",{className:m0()(DU.contactDetails,{[DU.deceased]:t}),children:[(0,mX.jsxs)("div",{className:DU.row,children:[(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DH,{patientId:e})}),(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DK,{patientUuid:e})})]}),(0,mX.jsxs)("div",{className:DU.row,children:[(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(DY,{patientId:e})}),(0,mX.jsx)("div",{className:DU.col,children:(0,mX.jsx)(Dq,{patientUuid:e})})]})]})}function DZ(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}var DX=n(4039),DQ={};DQ.styleTagTransform=gn(),DQ.setAttributes=m7(),DQ.insert=m6().bind(null,"head"),DQ.domAPI=m4(),DQ.insertStyleElement=ge(),m2()(DX.A,DQ);let D0=DX.A&&DX.A.locals?DX.A.locals:void 0;function D1({workspaceGroup:e,groupProps:t}){let n=mb(),{persistence:r}=e;return(0,mX.jsx)("aside",{className:D0.sideRail,children:(0,mX.jsxs)("div",{className:D0.container,children:["closable"==r&&my(n)&&(0,mX.jsx)(gu.K0,{align:"left",onClick:()=>Dk(),label:sv("close"),kind:"ghost",children:(0,mX.jsx)(g4,{})}),(0,mX.jsx)(f6.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,mX.jsx)(hl,{className:D0.container,name:e.name,state:{groupProps:t}})})]})})}let D2=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=DD(),c=(0,f4.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await DE({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(o||await DE({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await DE({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:r,isLeafWorkspace:o,windowName:n.windowName,showActionMenu:i},[t,s,a,n]);if(!e){let{registeredWorkspacesByName:e}=fY.getState(),n=e[t.workspaceName],o=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=fY.getState(),l=o?s[o]:void 0,c=l&&l.width?l.width:"narrow",u=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,mX.jsxs)("div",{className:m0()(DB.workspaceOuterContainer,{[DB.narrowWorkspace]:"narrow"===c,[DB.widerWorkspace]:"wider"===c,[DB.extraWideWorkspace]:"extra-wide"===c,[DB.isActionMenuOpened]:u}),children:[(0,mX.jsx)("div",{className:DB.workspaceSpacer}),(0,mX.jsx)("div",{className:m0()(DB.workspaceMiddleContainer,{[DB.isRootWorkspace]:r,[DB.showActionMenu]:i}),children:(0,mX.jsx)("div",{className:m0()(DB.workspaceInnerContainer,{[DB.isRootWorkspace]:r}),children:(0,mX.jsx)(gu.OuH,{className:DB.loader,description:`${sv("loading")} ...`})})})]})}return(0,mX.jsx)(Dd,{config:e,mountParcel:o9,...c},t.workspaceName)},D3=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,o]=(0,f4.useState)({}),{registeredWorkspacesByName:i}=fY.getState();return(0,f4.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=i[e.workspaceName];return[e.uuid,await mL(t,n)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,mX.jsx)(mX.Fragment,{children:n.map((o,i)=>(0,mX.jsx)(D2,{openedWorkspace:o,openedWindow:e,lifeCycle:r[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===n.length-1,showActionMenu:t},o.uuid))})};var D4=n(297),D5={};D5.styleTagTransform=gn(),D5.setAttributes=m7(),D5.insert=m6().bind(null,"head"),D5.domAPI=m4(),D5.insertStyleElement=ge(),m2()(D4.A,D5);let D6=D4.A&&D4.A.locals?D4.A.locals:void 0;function D8(e){e&&(0,hc.createRoot)(e).render((0,mX.jsx)(D7,{}))}function D7(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=DD();if((0,f4.useEffect)(()=>dg("before-page-changed",t=>{let{newPage:r,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(r)return void o(Dk().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new URL(t,window.location.origin).pathname,o=new URL(n,window.location.origin).pathname,i=new RegExp(e),a=r.match(i),s=o.match(i);if(!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(Dk().then(e=>!e))}),[e,n]),!e)return null;let o=n[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(r).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,mX.jsxs)("div",{className:m0()(D6.workspaceWindowsAndMenuContainer,{[D6.overlay]:o.overlay,[D6.hasMaximizedWindow]:i}),children:[(0,mX.jsx)("div",{className:D6.workspaceWindowsContainer,children:t.map(e=>(0,mX.jsx)(D3,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,mX.jsx)(D1,{workspaceGroup:o,groupProps:e.props})]})}function D9(e){if("string"!=typeof e||0===e.trim().length)return;let t=e.replaceAll("_","-");try{return new Intl.Locale(t).toString()}catch{return}}function Me(e,t,n){if(null==e)return n;let r=D9(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let o=[];for(let e of t){let t=D9(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=r;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",n=o.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===i){i="fr-HT";continue}let r=i.lastIndexOf("-");if(-1===r)break;let a=(i=i.slice(0,r)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return n}function Mt(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Mn(e){return!!e&&e.constructor===Object}var Mr=n(9589);function Mo(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function Mi(e,t){let n=function(e){let t=e.indexOf("-");if(t>=0){let n=Mo(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return Mo(e)}(t);return Mr.satisfies(n,e,{includePrerelease:!0})}async function Ma(e,t={}){let n,{shouldRetry:r,getDelay:o,onError:i}=t;r=r??(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 Ms(o(a)),await e()}catch(e){i?.(e,a),n=e}while(r(a++));throw n}async function Ms(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);