@openmrs/esm-bed-management-app 9.2.1-pre.7508 → 9.2.1-pre.7511

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.
@@ -4,4 +4,4 @@ WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended s
4
4
  │ 4944.js (2.136 MiB)
5
5
  │ 7090.js (295.739 KiB)
6
6
 
7
- Rspack compiled with 1 warning in 46.12 s
7
+ Rspack compiled with 1 warning in 34.64 s
package/dist/4944.js CHANGED
@@ -29,7 +29,7 @@ To fix this, ensure that you define the "description" field inside the feature f
29
29
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,n):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
30
  To fix this, ensure that you define the "name" field inside the feature flag definition.`,n);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,n)})}}function m6(){m4.sort((e,n)=>e.appName.localeCompare(n.appName,"en"));let e=new Map;for(let n of m4){e.has(n.appName)?e.set(n.appName,e.get(n.appName)+1):e.set(n.appName,0);let t=e.get(n.appName),r=`${n.appName}-page-${t}`,a=n.containerDomId??"omrs-apps-container",o=document.getElementById(a),i=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=i,o?.appendChild(e)}else throw Error(`${n.appName} ${n.component} cannot be mounted to "${a}"; DOM element does not exist.`);!function(e,n){let t=void 0!==n.route?n.route:void 0!==n.routeRegex&&new RegExp(n.routeRegex);!1===t?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
31
  To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):n.component?rO(e,()=>m0(n.appName,n.component),function(e,{online:n,offline:t,featureFlag:r}){return window.offlineEnabled?a=>!!(navigator.onLine&&(n??!0)||!navigator.onLine&&t)&&(!r||!!uA(r))&&e(a):e}(function e(n){if(Array.isArray(n)){let t=n.map(e);return e=>t.some(n=>n(e))}return"string"==typeof n?rF(window.getOpenmrsSpaBase()+n):n instanceof RegExp?e=>n.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>n}(t),n)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,n)}}function m8(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let m7=m8();function m9(e,n){if(m7){if("string"==typeof n)if(n.startsWith("http"))return gt(e,n);else try{let t=JSON.parse(n);if(gr(t))return gt(e,t);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n)}catch(n){console.error(`Could not add routes override for ${e}: `,n)}else if(n instanceof URL)return gt(e,n.toString());else if(gr(n))return gt(e,n);console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,n)}}function ge(e){m7&&localStorage.removeItem(mX+e)}function gn(){if(!m7)return;let e=window.localStorage;for(let n=0;n<e.length;n++){let t=e.key(n);t?.startsWith(mX)&&e.removeItem(t)}}function gt(e,n){localStorage.setItem(mX+e,JSON.stringify(n))}function gr(e){if(e&&"object"==typeof e){let n=Object.prototype.hasOwnProperty;return!(n.call(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||n.call(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||n.call(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||n.call(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}return!1}function ga(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&gr(n))}var go={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 gi(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<go.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>go.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>go.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<go.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<go.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<go.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>go.SMALL_DESKTOP_MAX)}var gs=!1;function gl(){gs||(window.addEventListener("resize",gi),gi(),gs=!0)}var gc=t(16709),gu=t.n(gc),gd=t(46062),gp=t.n(gd),gf=t(44036),gm=t.n(gf),gg=t(96793),gh=t.n(gg),gb=t(17892),g_=t.n(gb),gy=t(11173),gv=t.n(gy),gA=t(42464),g$=t.n(gA),gw=t(6370),gk={};gk.styleTagTransform=g$(),gk.setAttributes=g_(),gk.insert=gh().bind(null,"head"),gk.domAPI=gm(),gk.insertStyleElement=gv(),gp()(gw.Z,gk);let gx=gw.Z&&gw.Z.locals?gw.Z.locals:void 0;function gC(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gE(e){var n,t=e.title,r=e.children,a="tablet"===mz();return fg().createElement("div",{className:gu()((gC(n={},gx.tabletHeader,a),gC(n,gx.desktopHeader,!a),n))},fg().createElement("h4",null,t),r)}var gS=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],gD={primaryColor:{_type:n$.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[td.oneOf(gS)]},secondaryColor:{_type:n$.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[td.oneOf(gS)]}},gz={"Brand color #1":{_default:"#005d5d",_type:n$.String},"Brand color #2":{_default:"#004144",_type:n$.String},"Brand color #3":{_default:"#007d79",_type:n$.String},excludePatientIdentifierCodeTypes:{uuids:{_type:n$.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:n$.UUID}}},implementationName:{_type:n$.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:n$.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:n$.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:[td.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:n$.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:n$.String}},diagnosisTags:gD},gB=t(72530),gO={};gO.styleTagTransform=g$(),gO.setAttributes=g_(),gO.insert=gh().bind(null,"head"),gO.domAPI=gm(),gO.insertStyleElement=gv(),gp()(gB.Z,gO);let gM=gB.Z&&gB.Z.locals?gB.Z.locals:void 0;function gT(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function gP(e){var n,t,r,a=e.menuTitle,o=e.children,i=(n=fg().useState(!1),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(t=a.next()).done)&&(o.push(t.value),o.length!==n);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return gT(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gT(e,n)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=i[0],l=i[1],c=mP(function(){return l(!1)},s),u="tablet"===mz(),d=(0,fm.useCallback)(function(){return l(function(e){return!e})},[]);return fg().createElement("div",{"data-overflow-menu":!0,className:gu()("cds--overflow-menu",gM.container),ref:c},fg().createElement("button",{className:gu()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},gM.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:d},a),fg().createElement("div",{className:gu()("cds--overflow-menu-options","cds--overflow-menu--flip",gM.menu,(t={},r=gM.show,r in t?Object.defineProperty(t,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[r]=s,t)),tabIndex:0,"data-floating-menu-direction":"bottom",role:"menu","aria-labelledby":"custom-actions-overflow-menu-trigger",id:"custom-actions-overflow-menu"},fg().createElement("ul",{className:gu()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),fg().createElement("span",null)))}var gI=t(62836),gN=t(20708),gF=t(23148),gj={};gj.styleTagTransform=g$(),gj.setAttributes=g_(),gj.insert=gh().bind(null,"head"),gj.domAPI=gm(),gj.insertStyleElement=gv(),gp()(gF.Z,gj);let gR=gF.Z&&gF.Z.locals?gF.Z.locals:void 0;var gL=function(e){var n=e.path,t=e.title,r=e.basePath,a=e.icon,o=(0,fY.useTranslation)().t,i=(0,gI.useLocation)(),s=(0,fm.useMemo)(function(){if(!n)return!1;var e,t=n.startsWith("/")?n.slice(1):n;if(t.startsWith("http"))return t===window.location.href;var r=t.split("/").map(function(e){return decodeURIComponent(e)}),a=(null!=(e=i.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,a)},[i.pathname,n]);return fg().createElement("div",{key:n},fg().createElement(gN.ConfigurableLink,{className:gu()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(n))},fg().createElement("span",{className:gR.menu},fg().createElement(gN.MaybeIcon,{icon:a,className:gR.icon,size:16}),fg().createElement("span",null,o(t)))))};function gV(e){return function(n){var t=n.basePath;return fg().createElement(gI.BrowserRouter,null,fg().createElement(gL,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){var r;r=t[n],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return e}({basePath:t},e)))}}function gW(e,n){return e-n*Math.floor(e/n)}function gG(e,n,t,r){let a=(n=gU(e,n))-1,o=-2;return t<=2?o=0:gH(n)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*t-362)/12+o+r)}function gH(e){return e%4==0&&(e%100!=0||e%400==0)}function gU(e,n){return"BC"===e?1-n:n}function gq(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}let gK={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 gZ{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),r=gW(n,146097),a=Math.floor(r/36524),o=gW(r,36524),i=Math.floor(o/1461),s=Math.floor(gW(o,1461)/365),[l,c]=gq(400*t+100*a+4*i+s+ +(4!==a&&4!==s)),u=e-gG(l,c,1,1),d=2;e<gG(l,c,3,1)?d=0:gH(c)&&(d=1);let p=Math.floor(((u+d)*12+373)/367),f=e-gG(l,c,p,1)+1;return new hN(l,c,p,f)}toJulianDay(e){return gG(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gK[gH(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gH(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"}}let gY={"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 gJ(e,n){return n=hm(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function gX(e,n){return gQ(e.calendar,n.calendar)&&gJ(e,n)}function gQ(e,n){var t,r,a,o;return null!=(o=null!=(a=null==(t=e.isEqual)?void 0:t.call(e,n))?a:null==(r=n.isEqual)?void 0:r.call(n,e))?o:e.identifier===n.identifier}let g0={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function g1(e,n,t){let r,a=Math.ceil(e.calendar.toJulianDay(e)+1-(t?g0[t]:(r=function(e){if(Intl.Locale){let n=hn.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&hn.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&gY[r]||0))%7;return a<0&&(a+=7),a}function g2(e){return hd(Date.now(),e)}function g3(e){return hp(g2(e))}function g4(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function g5(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let g6=null;function g8(){return null==g6&&(g6=new Intl.DateTimeFormat().resolvedOptions().timeZone),g6}function g7(e){return e.subtract({days:e.day-1})}function g9(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function he(e,n,t){let r=g1(e,n,t);return e.subtract({days:r})}let hn=new Map;function ht(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function hr(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}function ha(e){return ho(gU((e=hm(e,new gZ)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ho(e,n,t,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function hi(e,n){if("UTC"===n)return 0;if(e>0&&n===g8())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:r,day:a,hour:o,minute:i,second:s}=hl(e,n);return ho(t,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hs=new Map;function hl(e,n){let t=hs.get(n);t||(t=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hs.set(n,t));let r=t.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function hc(e,n,t="compatible"){var r,a,o;let i=hf(e);if("UTC"===n)return ha(i);if(n===g8()&&"compatible"===t){i=hm(i,new gZ);let e=new Date,n=gU(i.era,i.year);return e.setFullYear(n,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=ha(i),l=hi(s-864e5,n),c=hi(s+864e5,n),u=(r=i,((a=s-l)==(o=s-c)?[a]:[a,o]).filter(e=>{var t;let a;return t=r,a=hl(e,n),t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}));if(1===u.length)return u[0];if(u.length>1)switch(t){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(t){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function hu(e,n,t="compatible"){return new Date(hc(e,n,t))}function hd(e,n){let t=hi(e,n),r=new Date(e+t),a=r.getUTCFullYear();return new hW(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),n,t,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function hp(e){return new hN(e.calendar,e.era,e.year,e.month,e.day)}function hf(e,n){let t=0,r=0,a=0,o=0;if("timeZone"in e)({hour:t,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:r,second:a,millisecond:o}=n),new hL(e.calendar,e.era,e.year,e.month,e.day,t,r,a,o)}function hm(e,n){if(gQ(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=n,r.era=t.era,r.year=t.year,r.month=t.month,r.day=t.day,hy(r),r}function hg(e,n){let t=e.copy(),r="hour"in t?hx(t,n):0;hh(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,hb(t),h_(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=r,function(e){for(;e.day<1;)e.month--,hb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,hb(e)}(t),t.calendar.balanceDate&&t.calendar.balanceDate(t),t.year<1&&(t.year=1,t.month=1,t.day=1);let a=t.calendar.getYearsInEra(t);if(t.year>a){var o,i;let e=null==(o=(i=t.calendar).isInverseEra)?void 0:o.call(i,t);t.year=a,t.month=e?1:t.calendar.getMonthsInYear(t),t.day=e?1:t.calendar.getDaysInMonth(t)}t.month<1&&(t.month=1,t.day=1);let s=t.calendar.getMonthsInYear(t);return t.month>s&&(t.month=s,t.day=t.calendar.getDaysInMonth(t)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day)),t}function hh(e,n){var t,r;(null==(t=(r=e.calendar).isInverseEra)?void 0:t.call(r,e))&&(n=-n),e.year+=n}function hb(e){for(;e.month<1;)hh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,hh(e,1)}function h_(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 hy(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),h_(e)}function hv(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function hA(e,n){let t=e.copy();return null!=n.era&&(t.era=n.era),null!=n.year&&(t.year=n.year),null!=n.month&&(t.month=n.month),null!=n.day&&(t.day=n.day),hy(t),t}function h$(e,n){let t=e.copy();return null!=n.hour&&(t.hour=n.hour),null!=n.minute&&(t.minute=n.minute),null!=n.second&&(t.second=n.second),null!=n.millisecond&&(t.millisecond=n.millisecond),hw(t),t}function hw(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 hk(e,n){let t=e%n;return t<0&&(t+=n),t}function hx(e,n){let t;return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=hk(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=hk(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=hk(e.minute,60),t=Math.floor(e.hour/24),e.hour=hk(e.hour,24),t}function hC(e,n){let t=e.copy();return hx(t,n),t}function hE(e,n,t,r){let a=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),o=n.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=hD(o,t,0,n.length-1,null==r?void 0:r.round),a.era=n[o],hy(a);break}case"year":var o,i;(null==(o=(i=a.calendar).isInverseEra)?void 0:o.call(i,a))&&(t=-t),a.year=hD(e.year,t,-1/0,9999,null==r?void 0:r.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=hD(e.month,t,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":a.day=hD(e.day,t,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),hy(a),a}function hS(e,n,t,r){let a=e.copy();switch(n){case"hour":{let n=e.hour,o=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=n>=12;o=12*!!e,i=e?23:11}a.hour=hD(n,t,o,i,null==r?void 0:r.round);break}case"minute":a.minute=hD(e.minute,t,0,59,null==r?void 0:r.round);break;case"second":a.second=hD(e.second,t,0,59,null==r?void 0:r.round);break;case"millisecond":a.millisecond=hD(e.millisecond,t,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return a}function hD(e,n,t,r,a=!1){if(a){(e+=Math.sign(n))<t&&(e=r);let a=Math.abs(n);(e=n>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=t)}else(e+=n)<t?e=r-(t-e-1):e>r&&(e=t+(e-r-1));return e}function hz(e,n){let t;return t=(null!=n.years&&0!==n.years||null!=n.months&&0!==n.months||null!=n.weeks&&0!==n.weeks||null!=n.days&&0!==n.days?hc(hg(hf(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):ha(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),hm(hd(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function hB(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 hO(e){let n,t=hm(e,new gZ);return n="BC"===t.era?1===t.year?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function hM(e){return`${hO(e)}T${hB(e)}`}function hT(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function hP(e){let n,t="object"==typeof e[0]?e.shift():new gZ;if("string"==typeof e[0])n=e.shift();else{let e=t.getEras();n=e[e.length-1]}return[t,n,e.shift(),e.shift(),e.shift()]}var hI=new WeakMap;class hN{copy(){return this.era?new hN(this.calendar,this.era,this.year,this.month,this.day):new hN(this.calendar,this.year,this.month,this.day)}add(e){return hg(this,e)}subtract(e){return hg(this,hv(e))}set(e){return hA(this,e)}cycle(e,n,t){return hE(this,e,n,t)}toDate(e){return hu(this,e)}toString(){return hO(this)}compare(e){return g4(this,e)}constructor(...e){hT(this,hI,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e);this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,hy(this)}}var hF=new WeakMap;class hj{copy(){return new hj(this.hour,this.minute,this.second,this.millisecond)}add(e){return hC(this,e)}subtract(e){return hC(this,hv(e))}set(e){return h$(this,e)}cycle(e,n,t){return hS(this,e,n,t)}toString(){return hB(this)}compare(e){return g5(this)-g5(e)}constructor(e=0,n=0,t=0,r=0){hT(this,hF,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=r,hw(this)}}var hR=new WeakMap;class hL{copy(){return this.era?new hL(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hL(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return hg(this,e)}subtract(e){return hg(this,hv(e))}set(e){return hA(h$(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return hE(this,e,n,t);default:return hS(this,e,n,t)}}toDate(e,n){return hu(this,e,n)}toString(){return hM(this)}compare(e){let n=g4(this,e);if(0===n){var t;return t=hf(e),g5(this)-g5(t)}return n}constructor(...e){hT(this,hR,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e);this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,hy(this)}}var hV=new WeakMap;class hW{copy(){return this.era?new hW(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hW(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return hz(this,e)}subtract(e){return hz(this,hv(e))}set(e,n){let t,r;return 0===(r=h$(hA(t=hf(this),e),e)).compare(t)?this:hm(hd(hc(r,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,r){switch(n){case"hour":{let n=0,a=23;if((null==r?void 0:r.hourCycle)===12){let t=e.hour>=12;n=12*!!t,a=t?23:11}let o=hf(e),i=hm(h$(o,{hour:n}),new gZ),s=[hc(i,e.timeZone,"earlier"),hc(i,e.timeZone,"later")].filter(n=>hd(n,e.timeZone).day===i.day)[0],l=hm(h$(o,{hour:a}),new gZ),c=[hc(l,e.timeZone,"earlier"),hc(l,e.timeZone,"later")].filter(n=>hd(n,e.timeZone).day===l.day).pop(),u=ha(e)-e.offset,d=Math.floor(u/36e5),p=u%36e5;return hm(hd(u=36e5*hD(d,t,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return hS(e,n,t,r);case"era":case"year":case"month":case"day":return hm(hd(hc(hE(hf(e),n,t,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){return new Date(ha(this)-this.offset)}toString(){var e;let n,t,r;return`${hM(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n,t){if(e instanceof hW){var r,a;return e.timeZone===n?e:(r=e,a=n,hm(hd(ha(r)-r.offset,a),r.calendar))}return hd(hc(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){hT(this,hV,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,hy(this)}}class hG extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e);return new hN(this,gU(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(hH(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(hH(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function hH(e){let[n,t]=gq(e.year+-543);return new hN(n,t,e.month,e.day)}function hU(e,n,t,r){return e+365*n+Math.floor(n/4)+30*(t-1)+r-1}function hq(e,n){let t=Math.floor(4*(n-e)/1461),r=1+Math.floor((n-hU(e,t,1,1))/30),a=n+1-hU(e,t,r,1);return[t,r,a]}function hK(e){return Math.floor(e%4/3)}function hZ(e,n){return n%13!=0?30:hK(e)+5}class hY{fromJulianDay(e){let[n,t,r]=hq(1723856,e),a="AM";return n<=0&&(a="AA",n+=5500),new hN(this,a,n,t,r)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),hU(1723856,n,e.month,e.day)}getDaysInMonth(e){return hZ(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+hK(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class hJ extends hY{fromJulianDay(e){let[n,t,r]=hq(1723856,e);return new hN(this,"AA",n+=5500,t,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class hX extends hY{fromJulianDay(e){let[n,t,r]=hq(1824665,e),a="CE";return n<=0&&(a="BCE",n=1-n),new hN(this,a,n,t,r)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),hU(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),hZ(n,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let hQ=765433;function h0(e){return 7>gW(7*e+1,19)}function h1(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>gW(3*(t+1),7)&&(t+=1),t}function h2(e){let n,t;return h1(e)+(n=h1(e-1),t=h1(e),h1(e+1)-t==356?2:+(t-n==382))}function h3(e){return h2(e+1)-h2(e)}function h4(e,n){if(n>=6&&!h0(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=h3(e);switch(n>380&&(n-=30),n){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===n?2===t?30:29:3===n?0===t?29:30:6===n?30*!!h0(e):30}class h5{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/hQ*19+234)/235)+1,r=h2(t),a=Math.floor(n-r);for(;a<1;)a=Math.floor(n-(r=h2(--t)));let o=1,i=0;for(;i<a;)i+=h4(t,o),o++;let s=a-(i-=h4(t,--o));return new hN(this,t,o,s)}toJulianDay(e){let n=h2(e.year);for(let t=1;t<e.month;t++)n+=h4(e.year,t);return n+e.day+347997}getDaysInMonth(e){return h4(e.year,e.month)}getMonthsInYear(e){return h0(e.year)?13:12}getDaysInYear(e){return h3(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(h0(n.year)&&!h0(e.year)&&n.month>6?e.month--:!h0(n.year)&&h0(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class h6 extends gZ{fromJulianDay(e){let n,t,r,a=super.fromJulianDay(e),o=a.year-78,i=e-gG(a.era,a.year,1,1);if(i<80?(o--,i+=(n=gH(a.year-1)?31:30)+155+90+10):(n=gH(a.year)?31:30,i-=80),i<n)t=1,r=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,r=e%31+1):(e-=155,t=Math.floor(e/30)+7,r=e%30+1)}return new hN(this,o,t,r)}toJulianDay(e){let n,t,[r,a]=gq(e.year+78);return(gH(a)?(n=31,t=gG(r,a,3,21)):(n=30,t=gG(r,a,3,22)),1===e.month)?t+e.day-1:(t+=n+31*Math.min(e.month-2,5),e.month>=8&&(t+=(e.month-7)*30),t+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gH(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 h8(e,n,t,r){return r+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function h7(e,n,t){let r=Math.floor((30*(t-n)+10646)/10631),a=Math.min(12,Math.ceil((t-(29+h8(n,r,1,1)))/29.5)+1),o=t-h8(n,r,a,1)+1;return new hN(e,r,a,o)}function h9(e){return(14+11*e)%30<11}class be{fromJulianDay(e){return h7(this,1948440,e)}toJulianDay(e){return h8(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&h9(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return h9(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bn extends be{fromJulianDay(e){return h7(this,1948439,e)}toJulianDay(e){return h8(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function bt(e){return 460322+l[e-1300]}function br(e,n){return(s[e-1300]&1<<11-(n-1))==0?29:30}function ba(e,n){let t=bt(e);for(let r=1;r<n;r++)t+=br(e,r);return t}function bo(e){return l[e+1-1300]-l[e-1300]}class bi extends be{fromJulianDay(e){let n=e-1948440,t=bt(1300),r=bt(1600);if(n<t||n>r)return super.fromJulianDay(e);{let e=1299,t=1,r=1;for(;r>0;){r=n-bt(++e)+1;let a=bo(e);if(r===a){t=12;break}if(r<a){let n=br(e,t);for(t=1;r>n;)r-=n,n=br(e,++t);break}}return new hN(this,e,t,n-ba(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+ba(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):br(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):bo(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let n=1300;n<=1600;n++){l[n-1300]=e;for(let t=1;t<=12;t++)e+=br(n,t)}}}}let bs=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],bl=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],bc=[1867,1911,1925,1988,2018],bu=["meiji","taisho","showa","heisei","reiwa"];function bd(e){let n=bs.findIndex(([n,t,r])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<r));return -1===n?bs.length-1:0===n?0:n-1}function bp(e){let n=bc[bu.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new hN(e.year+n,e.month,e.day)}class bf extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e),t=bd(n);return new hN(this,bu[t],n.year-bc[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(bp(e))}balanceDate(e){let n=bp(e),t=bd(n);bu[t]!==e.era&&(e.era=bu[t],e.year=n.year-bc[t]),this.constrainDate(e)}constrainDate(e){let n=bu.indexOf(e.era),t=bl[n];if(null!=t){let[r,a,o]=t,i=r-bc[n];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&n>=0){let[,t,r]=bs[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(r,e.day))}}getEras(){return bu}getYearsInEra(e){let n=bu.indexOf(e.era),t=bs[n],r=bs[n+1];if(null==r)return 9999-t[0]+1;let a=r[0]-t[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(bp(e))}getMinimumMonthInYear(e){let n=bm(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=bm(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function bm(e){if(1===e.year)return bs[bu.indexOf(e.era)]}let bg=[0,31,62,93,124,155,186,216,246,276,306,336];class bh{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),r=n-(365*(t-1)+Math.floor((8*t+21)/33)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-bg[a]+1;return new hN(this,t,a+1,o)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=bg[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gW(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function bb(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function b_(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class by extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e),[t,r]=b_(gU(n.era,n.year));return new hN(this,t,r,n.month,n.day)}toJulianDay(e){return super.toJulianDay(bv(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=b_(bb(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(bv(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function bv(e){let[n,t]=gq(bb(e));return new hN(n,t,e.month,e.day)}function bA(e){switch(e){case"buddhist":return new hG;case"ethiopic":return new hY;case"ethioaa":return new hJ;case"coptic":return new hX;case"hebrew":return new h5;case"indian":return new h6;case"islamic-civil":return new be;case"islamic-tbla":return new bn;case"islamic-umalqura":return new bi;case"japanese":return new bf;case"persian":return new bh;case"roc":return new by;default:return new gZ}}let b$=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bw=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function bk(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),t="function"==typeof n.getTextInfo?n.getTextInfo():n.textInfo;if(t)return"rtl"===t.direction;if(n.script)return b$.has(n.script)}let n=e.split("-")[0];return bw.has(n)}let bx={prefix:String(Math.round(1e10*Math.random())),current:0},bC=fm.createContext(bx),bE=fm.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let bS=new WeakMap,bD="function"==typeof fm.useId?function(e){let n=fm.useId(),[t]=(0,fm.useState)(bM()),r=t?"react-aria":`react-aria${bx.prefix}`;return e||`${r}-${n}`}:function(e){let n=(0,fm.useContext)(bC),t=function(e=!1){let n=(0,fm.useContext)(bC),t=(0,fm.useRef)(null);if(null===t.current&&!e){var r,a;let e=null==(a=fm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=a.ReactCurrentOwner)?void 0:r.current;if(e){let t=bS.get(e);null==t?bS.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,bS.delete(e))}t.current=++n.current}return t.current}(!!e),r=`react-aria${n.prefix}`;return e||`${r}-${t}`};function bz(){return!1}function bB(){return!0}function bO(e){return()=>{}}function bM(){return"function"==typeof fm.useSyncExternalStore?fm.useSyncExternalStore(bO,bz,bB):(0,fm.useContext)(bE)}let bT=Symbol.for("react-aria.i18n.locale");function bP(){let e="undefined"!=typeof window&&window[bT]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:bk(e)?"rtl":"ltr"}}let bI=bP(),bN=new Set;function bF(){for(let e of(bI=bP(),bN))e(bI)}function bj(){let e=bM(),[n,t]=(0,fm.useState)(bI);return((0,fm.useEffect)(()=>(0===bN.size&&window.addEventListener("languagechange",bF),bN.add(t),()=>{bN.delete(t),0===bN.size&&window.removeEventListener("languagechange",bF)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let bR=fm.createContext(null);function bL(e){let{locale:n,children:t}=e,r=bj(),a=fm.useMemo(()=>n?{locale:n,direction:bk(n)?"rtl":"ltr"}:r,[r,n]);return fm.createElement(bR.Provider,{value:a},t)}function bV(){let e=bj();return(0,fm.useContext)(bR)||e}function bW(e){let n=(0,fm.useRef)(null),t=(0,fm.useRef)(void 0),r=(0,fm.useCallback)(n=>{if("function"==typeof e){let t=e(n);return()=>{"function"==typeof t?t():e(null)}}if(e)return e.current=n,()=>{e.current=null}},[e]);return(0,fm.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,t.current&&(t.current(),t.current=void 0),null!=value&&(t.current=r(value))}}),[r])}function bG(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function bH(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let bU="undefined"!=typeof document?fm.useLayoutEffect:()=>{};function bq(e){let n=(0,fm.useRef)(null);return bU(()=>{n.current=e},[e]),(0,fm.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let bK=!!("undefined"!=typeof window&&window.document&&window.document.createElement),bZ=new Map;function bY(e){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(null),a=bD(n),o=(0,fm.useRef)(null);if(c&&c.register(o,a),bK){let e=bZ.get(a);e&&!e.includes(r)?e.push(r):bZ.set(a,[r])}return bU(()=>()=>{c&&c.unregister(o),bZ.delete(a)},[a]),(0,fm.useEffect)(()=>{let e=r.current;return e&&t(e),()=>{e&&(r.current=null)}}),a}function bJ(e=[]){let n=bY(),[t,r]=function(e){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(null),a=bq(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}n===e.value?a():t(e.value)});bU(()=>{r.current&&a()});let o=bq(e=>{r.current=e(n),a()});return[n,o]}(n),a=(0,fm.useCallback)(()=>{r(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,r]);return bU(a,[n,a,...e]),t}"undefined"!=typeof FinalizationRegistry&&(c=new FinalizationRegistry(e=>{bZ.delete(e)}));let bX=function(){for(var e,n,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(n=function e(n){var t,r,a="";if("string"==typeof n||"number"==typeof n)a+=n;else if("object"==typeof n)if(Array.isArray(n)){var o=n.length;for(t=0;t<o;t++)n[t]&&(r=e(n[t]))&&(a&&(a+=" "),a+=r)}else for(r in n)n[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=n);return r};function bQ(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let e in r){let t=n[e],a=r[e];"function"==typeof t&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=bH(t,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof a?n[e]=bX(t,a):"id"===e&&t&&a?n.id=function(e,n){if(e===n)return e;let t=bZ.get(e);if(t)return t.forEach(e=>e.current=n),n;let r=bZ.get(n);return r?(r.forEach(n=>n.current=e),e):n}(t,a):n[e]=void 0!==a?a:t}}return n}let b0=Symbol("default");function b1({values:e,children:n}){for(let[t,r]of e)n=fm.createElement(t.Provider,{value:r},n);return n}function b2(e){let{className:n,style:t,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,fm.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:a}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:l||i?{...i,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[n,t,r,a,o,i,s])}function b3(e,n){let t=(0,fm.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||b0;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),r=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return t.slots[e]}return t}function b4(e,n,t){let{ref:r,...a}=b3(t,e.slot)||{},o=bW((0,fm.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:n=>{let t=!1,r=e.map(e=>{let r=bG(e,n);return t||(t="function"==typeof r),r});if(t)return()=>{r.forEach((n,t)=>{"function"==typeof n?n():bG(e[t],null)})}}})(n,r),[n,r])),i=bQ(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=n=>{let t="function"==typeof a.style?a.style(n):a.style,r={...n.defaultStyle,...t},o="function"==typeof e.style?e.style({...n,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function b5(e=!0){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(!1),a=(0,fm.useCallback)(e=>{r.current=!0,t(!!e)},[]);return bU(()=>{r.current||t(!1)},[]),[a,n]}function b6(e){let n=/^(data-.*)$/,t={};for(let r in e)n.test(r)||(t[r]=e[r]);return t}let b8=(0,fm.createContext)(null),b7=null;function b9(e,n="assertive",t=7e3){b7?b7.announce(e,n,t):(b7=new _e,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?b7.announce(e,n,t):setTimeout(()=>{(null==b7?void 0:b7.isAttached())&&(null==b7||b7.announce(e,n,t))},100))}class _e{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",t=7e3){var r,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===n?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},t)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"undefined"!=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 _n=new Set(["id"]),_t=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),_r=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_a=/^(data-.*)$/;function _o(e,n={}){let{labelable:t,isLink:r,propNames:a}=n,o={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(_n.has(n)||t&&_t.has(n)||r&&_r.has(n)||(null==a?void 0:a.has(n))||_a.test(n))&&(o[n]=e[n]);return o}let _i=["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"])'],_s=_i.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";_i.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let _l=_i.join(':not([hidden]):not([tabindex="-1"]),');function _c(e){return e.matches(_s)}function _u(e){return e.matches(_l)}let _d=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},_p=e=>e&&"window"in e&&e.window===e?e:_d(e).defaultView||window;function _f(e){if(function(){if(null==_m){_m=!1;try{document.createElement("div").focus({get preventScroll(){return _m=!0,!0}})}catch{}}return _m}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],r=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==r;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return r instanceof HTMLElement&&t.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:r}of e)n.scrollTop=t,n.scrollLeft=r}(n)}}let _m=null;function _g(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function _h(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function _b(e){let n=(0,fm.useRef)({isFocused:!1,observer:null});bU(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=bq(n=>{null==e||e(n)});return(0,fm.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{n.current.isFocused=!1,r.disabled&&t(_g(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&r.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let __=!1;function _y(e){var n;return"undefined"!=typeof window&&null!=window.navigator&&((null==(n=window.navigator.userAgentData)?void 0:n.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent))}function _v(e){var n;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(n=window.navigator.userAgentData)?void 0:n.platform)||window.navigator.platform)}function _A(e){let n=null;return()=>(null==n&&(n=e()),n)}let _$=_A(function(){return _v(/^Mac/i)}),_w=_A(function(){return _v(/^iPhone/i)}),_k=_A(function(){return _v(/^iPad/i)||_$()&&navigator.maxTouchPoints>1}),_x=_A(function(){return _w()||_k()});_A(function(){return _$()||_x()});let _C=_A(function(){return _y(/AppleWebKit/i)&&!_E()}),_E=_A(function(){return _y(/Chrome/i)}),_S=_A(function(){return _y(/Android/i)}),_D=_A(function(){return _y(/Firefox/i)}),_z=new Map,_B=new Set;function _O(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let r=_z.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",n),_z.delete(t.target)),0===_z.size)){for(let e of _B)e();_B.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let r=_z.get(t.target);r||(r=new Set,_z.set(t.target,r),t.target.addEventListener("transitioncancel",n,{once:!0})),r.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function _M(e){requestAnimationFrame(()=>{for(let[e]of _z)"isConnected"in e&&!e.isConnected&&_z.delete(e);0===_z.size?e():_B.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?_O():document.addEventListener("DOMContentLoaded",_O));let _T="default",_P="",_I=new WeakMap;function _N(e){if(_x())"disabled"===_T&&(_T="restoring",setTimeout(()=>{_M(()=>{if("restoring"===_T){let n=_d(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=_P||""),_P="",_T="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&_I.has(e)){let n=_I.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),_I.delete(e)}}let _F=fm.createContext({register:()=>{}});function _j(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function _R(e,n,t){var r=_j(e,n,"set");if(r.set)r.set.call(e,t);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=t}return t}function _L(e,n){bU(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function _V(){let e=(0,fm.useRef)(new Map),n=(0,fm.useCallback)((n,t,r,a)=>{let o=(null==a?void 0:a.once)?(...n)=>{e.current.delete(r),r(...n)}:r;e.current.set(r,{type:t,eventTarget:n,fn:o,options:a}),n.addEventListener(t,o,a)},[]),t=(0,fm.useCallback)((n,t,r,a)=>{var o;let i=(null==(o=e.current.get(r))?void 0:o.fn)||r;n.removeEventListener(t,i,a),e.current.delete(r)},[]),r=(0,fm.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,fm.useEffect)(()=>r,[r]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:r}}_F.displayName="PressResponderContext";function _W(e,n){return!!n&&!!e&&e.contains(n)}function _G(e){return e.target}function _H(e,n,t=!0){var r,a;let{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}=n;_D()&&(null==(a=window.event)||null==(r=a.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(_$()?o=!0:i=!0);let c=_C()&&_$()&&!_k()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});_H.isOpening=t,_f(e),e.dispatchEvent(c),_H.isOpening=!1}function _U(e){return 0===e.mozInputSource&&!!e.isTrusted||(_S()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}_H.isOpening=!1;var _q=t(28316),_K=new WeakMap;class _Z{continuePropagation(){_R(this,_K,!1)}get shouldStopPropagation(){var e;return e=_j(this,_K,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,r){var a;hT(this,_K,{writable:!0,value:void 0}),_R(this,_K,!0);let o=null!=(a=null==r?void 0:r.target)?a:t.currentTarget,i=null==o?void 0:o.getBoundingClientRect(),s,l=0,c,u=null;null!=t.clientX&&null!=t.clientY&&(c=t.clientX,u=t.clientY),i&&(null!=c&&null!=u?(s=c-i.left,l=u-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=n,this.target=t.currentTarget,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.x=s,this.y=l}}let _Y=Symbol("linkClicked"),_J="react-aria-pressable-style",_X="data-react-aria-pressable";function _Q(e){let{onPress:n,onPressChange:t,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let n=(0,fm.useContext)(_F);if(n){let{register:t,...r}=n;e=bQ(r,e),t()}return _L(n,e.ref),e}(e),[m,g]=(0,fm.useState)(!1),h=(0,fm.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:y}=_V(),v=bq((e,n)=>{let a=h.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let t=new _Z("pressstart",n,e);r(t),o=t.shouldStopPropagation}return t&&t(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,g(!0),o}),A=bq((e,r,o=!0)=>{let i=h.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(a){let n=new _Z("pressend",r,e);a(n),l=n.shouldStopPropagation}if(t&&t(!1),g(!1),n&&o&&!s){let t=new _Z("press",r,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),$=bq((e,n)=>{let t=h.current;if(s)return!1;if(o){t.isTriggeringEvent=!0;let r=new _Z("pressup",n,e);return o(r),t.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=bq(e=>{let n=h.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&A(_2(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,y(),d||_N(n.target),n.disposables))t();n.disposables=[]}}),k=bq(e=>{u&&w(e)}),x=bq(e=>{null==i||i(e)}),C=bq((e,n)=>{if(i){let t=new MouseEvent("click",e);_h(t,n),i(_g(t))}}),E=(0,fm.useMemo)(()=>{let e=h.current,n={onKeyDown(n){if(_1(n.nativeEvent,n.currentTarget)&&_W(n.currentTarget,_G(n.nativeEvent))){var r;_3(_G(n.nativeEvent),n.key)&&n.preventDefault();let a=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",a=v(n,"keyboard");let r=n.currentTarget;b(_d(n.currentTarget),"keyup",bH(n=>{_1(n,r)&&!n.repeat&&_W(r,_G(n))&&e.target&&$(_2(e.target,n),"keyboard")},t),!0)}a&&n.stopPropagation(),n.metaKey&&_$()&&(null==(r=e.metaKeyEvents)||r.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||_W(n.currentTarget,_G(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!_H.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||_U(n.nativeEvent))){let e=v(n,"virtual"),r=$(n,"virtual"),a=A(n,"virtual");x(n),t=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||n.nativeEvent.pointerType||"virtual",a=$(_2(n.currentTarget,n),r),o=A(_2(n.currentTarget,n),r,!0);t=a&&o,e.isOverTarget=!1,x(n),w(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,r,a;if(e.isPressed&&e.target&&_1(n,e.target)){_3(_G(n),n.key)&&n.preventDefault();let t=_G(n),a=_W(e.target,_G(n));A(_2(e.target,n),"keyboard",a),a&&C(n,e.target),y(),"Enter"!==n.key&&_0(e.target)&&_W(e.target,t)&&!n[_Y]&&(n[_Y]=!0,_H(e.target,n,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(n.key)}else if("Meta"===n.key&&(null==(t=e.metaKeyEvents)?void 0:t.size)){let n=e.metaKeyEvents;for(let t of(e.metaKeyEvents=void 0,n.values()))null==(a=e.target)||a.dispatchEvent(new KeyboardEvent("keyup",t))}};if("undefined"!=typeof PointerEvent){n.onPointerDown=n=>{var a;if(0!==n.button||!_W(n.currentTarget,_G(n.nativeEvent)))return;if(a=n.nativeEvent,!_S()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=n.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,d||function(e){if(_x()){if("default"===_T){let n=_d(e);_P=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}_T="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";_I.set(e,e.style[n]),e.style[n]="none"}}(e.target),o=v(n,e.pointerType);let a=_G(n.nativeEvent);"releasePointerCapture"in a&&a.releasePointerCapture(n.pointerId),b(_d(n.currentTarget),"pointerup",t,!1),b(_d(n.currentTarget),"pointercancel",r,!1)}o&&n.stopPropagation()},n.onMouseDown=n=>{if(_W(n.currentTarget,_G(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!_c(e);)e=e.parentElement;let n=_p(e),t=n.document.activeElement;if(!t||t===e)return;__=!0;let r=!1,a=e=>{(e.target===t||r)&&e.stopImmediatePropagation()},o=n=>{(n.target===t||r)&&(n.stopImmediatePropagation(),e||r||(r=!0,_f(t),l()))},i=n=>{(n.target===e||r)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||r)&&(n.stopImmediatePropagation(),r||(r=!0,_f(t),l()))};n.addEventListener("blur",a,!0),n.addEventListener("focusout",o,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",a,!0),n.removeEventListener("focusout",o,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),__=!1,r=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{_W(n.currentTarget,_G(n.nativeEvent))&&"virtual"!==e.pointerType&&(0!==n.button||e.isPressed||$(n,e.pointerType||n.pointerType))},n.onPointerEnter=n=>{n.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_2(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_2(e.target,n),e.pointerType,!1),k(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(_W(e.target,_G(n))&&null!=e.pointerType){let t=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?w(n):(_f(e.target),e.target.click()))},80);b(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(n);e.isOverTarget=!1}},r=e=>{w(e)};n.onDragStart=e=>{_W(e.currentTarget,_G(e.nativeEvent))&&w(e)}}return n},[b,s,c,y,d,w,k,A,v,$,x,C]);return(0,fm.useEffect)(()=>{if(!p)return;let e=_d(p.current);if(!e||!e.head||e.getElementById(_J))return;let n=e.createElement("style");n.id=_J,n.textContent=`
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,n)}}function m8(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let m7=m8();function m9(e,n){if(m7){if("string"==typeof n)if(n.startsWith("http"))return gt(e,n);else try{let t=JSON.parse(n);if(gr(t))return gt(e,t);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n)}catch(n){console.error(`Could not add routes override for ${e}: `,n)}else if(n instanceof URL)return gt(e,n.toString());else if(gr(n))return gt(e,n);console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,n)}}function ge(e){m7&&localStorage.removeItem(mX+e)}function gn(){if(m7)for(let e of Object.keys(localStorage))e.startsWith(mX)&&localStorage.removeItem(e)}function gt(e,n){localStorage.setItem(mX+e,JSON.stringify(n))}function gr(e){if(e&&"object"==typeof e){let n=Object.prototype.hasOwnProperty;return!(n.call(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||n.call(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||n.call(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||n.call(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}return!1}function ga(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&gr(n))}var go={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 gi(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<go.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>go.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>go.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<go.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<go.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<go.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>go.SMALL_DESKTOP_MAX)}var gs=!1;function gl(){gs||(window.addEventListener("resize",gi),gi(),gs=!0)}var gc=t(16709),gu=t.n(gc),gd=t(46062),gp=t.n(gd),gf=t(44036),gm=t.n(gf),gg=t(96793),gh=t.n(gg),gb=t(17892),g_=t.n(gb),gy=t(11173),gv=t.n(gy),gA=t(42464),g$=t.n(gA),gw=t(6370),gk={};gk.styleTagTransform=g$(),gk.setAttributes=g_(),gk.insert=gh().bind(null,"head"),gk.domAPI=gm(),gk.insertStyleElement=gv(),gp()(gw.Z,gk);let gx=gw.Z&&gw.Z.locals?gw.Z.locals:void 0;function gC(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gE(e){var n,t=e.title,r=e.children,a="tablet"===mz();return fg().createElement("div",{className:gu()((gC(n={},gx.tabletHeader,a),gC(n,gx.desktopHeader,!a),n))},fg().createElement("h4",null,t),r)}var gS=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],gD={primaryColor:{_type:n$.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[td.oneOf(gS)]},secondaryColor:{_type:n$.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[td.oneOf(gS)]}},gz={"Brand color #1":{_default:"#005d5d",_type:n$.String},"Brand color #2":{_default:"#004144",_type:n$.String},"Brand color #3":{_default:"#007d79",_type:n$.String},excludePatientIdentifierCodeTypes:{uuids:{_type:n$.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:n$.UUID}}},implementationName:{_type:n$.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:n$.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:n$.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:[td.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:n$.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:n$.String}},diagnosisTags:gD},gB=t(72530),gO={};gO.styleTagTransform=g$(),gO.setAttributes=g_(),gO.insert=gh().bind(null,"head"),gO.domAPI=gm(),gO.insertStyleElement=gv(),gp()(gB.Z,gO);let gM=gB.Z&&gB.Z.locals?gB.Z.locals:void 0;function gT(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function gP(e){var n,t,r,a=e.menuTitle,o=e.children,i=(n=fg().useState(!1),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(t=a.next()).done)&&(o.push(t.value),o.length!==n);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return gT(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gT(e,n)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=i[0],l=i[1],c=mP(function(){return l(!1)},s),u="tablet"===mz(),d=(0,fm.useCallback)(function(){return l(function(e){return!e})},[]);return fg().createElement("div",{"data-overflow-menu":!0,className:gu()("cds--overflow-menu",gM.container),ref:c},fg().createElement("button",{className:gu()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},gM.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:d},a),fg().createElement("div",{className:gu()("cds--overflow-menu-options","cds--overflow-menu--flip",gM.menu,(t={},r=gM.show,r in t?Object.defineProperty(t,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[r]=s,t)),tabIndex:0,"data-floating-menu-direction":"bottom",role:"menu","aria-labelledby":"custom-actions-overflow-menu-trigger",id:"custom-actions-overflow-menu"},fg().createElement("ul",{className:gu()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),fg().createElement("span",null)))}var gI=t(62836),gN=t(20708),gF=t(23148),gj={};gj.styleTagTransform=g$(),gj.setAttributes=g_(),gj.insert=gh().bind(null,"head"),gj.domAPI=gm(),gj.insertStyleElement=gv(),gp()(gF.Z,gj);let gR=gF.Z&&gF.Z.locals?gF.Z.locals:void 0;var gL=function(e){var n=e.path,t=e.title,r=e.basePath,a=e.icon,o=(0,fY.useTranslation)().t,i=(0,gI.useLocation)(),s=(0,fm.useMemo)(function(){if(!n)return!1;var e,t=n.startsWith("/")?n.slice(1):n;if(t.startsWith("http"))return t===window.location.href;var r=t.split("/").map(function(e){return decodeURIComponent(e)}),a=(null!=(e=i.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,a)},[i.pathname,n]);return fg().createElement("div",{key:n},fg().createElement(gN.ConfigurableLink,{className:gu()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(n))},fg().createElement("span",{className:gR.menu},fg().createElement(gN.MaybeIcon,{icon:a,className:gR.icon,size:16}),fg().createElement("span",null,o(t)))))};function gV(e){return function(n){var t=n.basePath;return fg().createElement(gI.BrowserRouter,null,fg().createElement(gL,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){var r;r=t[n],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return e}({basePath:t},e)))}}function gW(e,n){return e-n*Math.floor(e/n)}function gG(e,n,t,r){let a=(n=gU(e,n))-1,o=-2;return t<=2?o=0:gH(n)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*t-362)/12+o+r)}function gH(e){return e%4==0&&(e%100!=0||e%400==0)}function gU(e,n){return"BC"===e?1-n:n}function gq(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}let gK={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 gZ{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),r=gW(n,146097),a=Math.floor(r/36524),o=gW(r,36524),i=Math.floor(o/1461),s=Math.floor(gW(o,1461)/365),[l,c]=gq(400*t+100*a+4*i+s+ +(4!==a&&4!==s)),u=e-gG(l,c,1,1),d=2;e<gG(l,c,3,1)?d=0:gH(c)&&(d=1);let p=Math.floor(((u+d)*12+373)/367),f=e-gG(l,c,p,1)+1;return new hN(l,c,p,f)}toJulianDay(e){return gG(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gK[gH(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gH(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"}}let gY={"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 gJ(e,n){return n=hm(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function gX(e,n){return gQ(e.calendar,n.calendar)&&gJ(e,n)}function gQ(e,n){var t,r,a,o;return null!=(o=null!=(a=null==(t=e.isEqual)?void 0:t.call(e,n))?a:null==(r=n.isEqual)?void 0:r.call(n,e))?o:e.identifier===n.identifier}let g0={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function g1(e,n,t){let r,a=Math.ceil(e.calendar.toJulianDay(e)+1-(t?g0[t]:(r=function(e){if(Intl.Locale){let n=hn.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&hn.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&gY[r]||0))%7;return a<0&&(a+=7),a}function g2(e){return hd(Date.now(),e)}function g3(e){return hp(g2(e))}function g4(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function g5(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let g6=null;function g8(){return null==g6&&(g6=new Intl.DateTimeFormat().resolvedOptions().timeZone),g6}function g7(e){return e.subtract({days:e.day-1})}function g9(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function he(e,n,t){let r=g1(e,n,t);return e.subtract({days:r})}let hn=new Map;function ht(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function hr(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}function ha(e){return ho(gU((e=hm(e,new gZ)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ho(e,n,t,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function hi(e,n){if("UTC"===n)return 0;if(e>0&&n===g8())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:r,day:a,hour:o,minute:i,second:s}=hl(e,n);return ho(t,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hs=new Map;function hl(e,n){let t=hs.get(n);t||(t=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hs.set(n,t));let r=t.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function hc(e,n,t="compatible"){var r,a,o;let i=hf(e);if("UTC"===n)return ha(i);if(n===g8()&&"compatible"===t){i=hm(i,new gZ);let e=new Date,n=gU(i.era,i.year);return e.setFullYear(n,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=ha(i),l=hi(s-864e5,n),c=hi(s+864e5,n),u=(r=i,((a=s-l)==(o=s-c)?[a]:[a,o]).filter(e=>{var t;let a;return t=r,a=hl(e,n),t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}));if(1===u.length)return u[0];if(u.length>1)switch(t){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(t){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function hu(e,n,t="compatible"){return new Date(hc(e,n,t))}function hd(e,n){let t=hi(e,n),r=new Date(e+t),a=r.getUTCFullYear();return new hW(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),n,t,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function hp(e){return new hN(e.calendar,e.era,e.year,e.month,e.day)}function hf(e,n){let t=0,r=0,a=0,o=0;if("timeZone"in e)({hour:t,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:r,second:a,millisecond:o}=n),new hL(e.calendar,e.era,e.year,e.month,e.day,t,r,a,o)}function hm(e,n){if(gQ(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=n,r.era=t.era,r.year=t.year,r.month=t.month,r.day=t.day,hy(r),r}function hg(e,n){let t=e.copy(),r="hour"in t?hx(t,n):0;hh(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,hb(t),h_(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=r,function(e){for(;e.day<1;)e.month--,hb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,hb(e)}(t),t.calendar.balanceDate&&t.calendar.balanceDate(t),t.year<1&&(t.year=1,t.month=1,t.day=1);let a=t.calendar.getYearsInEra(t);if(t.year>a){var o,i;let e=null==(o=(i=t.calendar).isInverseEra)?void 0:o.call(i,t);t.year=a,t.month=e?1:t.calendar.getMonthsInYear(t),t.day=e?1:t.calendar.getDaysInMonth(t)}t.month<1&&(t.month=1,t.day=1);let s=t.calendar.getMonthsInYear(t);return t.month>s&&(t.month=s,t.day=t.calendar.getDaysInMonth(t)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day)),t}function hh(e,n){var t,r;(null==(t=(r=e.calendar).isInverseEra)?void 0:t.call(r,e))&&(n=-n),e.year+=n}function hb(e){for(;e.month<1;)hh(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,hh(e,1)}function h_(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 hy(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),h_(e)}function hv(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function hA(e,n){let t=e.copy();return null!=n.era&&(t.era=n.era),null!=n.year&&(t.year=n.year),null!=n.month&&(t.month=n.month),null!=n.day&&(t.day=n.day),hy(t),t}function h$(e,n){let t=e.copy();return null!=n.hour&&(t.hour=n.hour),null!=n.minute&&(t.minute=n.minute),null!=n.second&&(t.second=n.second),null!=n.millisecond&&(t.millisecond=n.millisecond),hw(t),t}function hw(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 hk(e,n){let t=e%n;return t<0&&(t+=n),t}function hx(e,n){let t;return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=hk(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=hk(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=hk(e.minute,60),t=Math.floor(e.hour/24),e.hour=hk(e.hour,24),t}function hC(e,n){let t=e.copy();return hx(t,n),t}function hE(e,n,t,r){let a=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),o=n.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=hD(o,t,0,n.length-1,null==r?void 0:r.round),a.era=n[o],hy(a);break}case"year":var o,i;(null==(o=(i=a.calendar).isInverseEra)?void 0:o.call(i,a))&&(t=-t),a.year=hD(e.year,t,-1/0,9999,null==r?void 0:r.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=hD(e.month,t,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":a.day=hD(e.day,t,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),hy(a),a}function hS(e,n,t,r){let a=e.copy();switch(n){case"hour":{let n=e.hour,o=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=n>=12;o=12*!!e,i=e?23:11}a.hour=hD(n,t,o,i,null==r?void 0:r.round);break}case"minute":a.minute=hD(e.minute,t,0,59,null==r?void 0:r.round);break;case"second":a.second=hD(e.second,t,0,59,null==r?void 0:r.round);break;case"millisecond":a.millisecond=hD(e.millisecond,t,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return a}function hD(e,n,t,r,a=!1){if(a){(e+=Math.sign(n))<t&&(e=r);let a=Math.abs(n);(e=n>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=t)}else(e+=n)<t?e=r-(t-e-1):e>r&&(e=t+(e-r-1));return e}function hz(e,n){let t;return t=(null!=n.years&&0!==n.years||null!=n.months&&0!==n.months||null!=n.weeks&&0!==n.weeks||null!=n.days&&0!==n.days?hc(hg(hf(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):ha(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),hm(hd(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function hB(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 hO(e){let n,t=hm(e,new gZ);return n="BC"===t.era?1===t.year?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function hM(e){return`${hO(e)}T${hB(e)}`}function hT(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function hP(e){let n,t="object"==typeof e[0]?e.shift():new gZ;if("string"==typeof e[0])n=e.shift();else{let e=t.getEras();n=e[e.length-1]}return[t,n,e.shift(),e.shift(),e.shift()]}var hI=new WeakMap;class hN{copy(){return this.era?new hN(this.calendar,this.era,this.year,this.month,this.day):new hN(this.calendar,this.year,this.month,this.day)}add(e){return hg(this,e)}subtract(e){return hg(this,hv(e))}set(e){return hA(this,e)}cycle(e,n,t){return hE(this,e,n,t)}toDate(e){return hu(this,e)}toString(){return hO(this)}compare(e){return g4(this,e)}constructor(...e){hT(this,hI,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e);this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,hy(this)}}var hF=new WeakMap;class hj{copy(){return new hj(this.hour,this.minute,this.second,this.millisecond)}add(e){return hC(this,e)}subtract(e){return hC(this,hv(e))}set(e){return h$(this,e)}cycle(e,n,t){return hS(this,e,n,t)}toString(){return hB(this)}compare(e){return g5(this)-g5(e)}constructor(e=0,n=0,t=0,r=0){hT(this,hF,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=r,hw(this)}}var hR=new WeakMap;class hL{copy(){return this.era?new hL(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hL(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return hg(this,e)}subtract(e){return hg(this,hv(e))}set(e){return hA(h$(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return hE(this,e,n,t);default:return hS(this,e,n,t)}}toDate(e,n){return hu(this,e,n)}toString(){return hM(this)}compare(e){let n=g4(this,e);if(0===n){var t;return t=hf(e),g5(this)-g5(t)}return n}constructor(...e){hT(this,hR,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e);this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,hy(this)}}var hV=new WeakMap;class hW{copy(){return this.era?new hW(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hW(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return hz(this,e)}subtract(e){return hz(this,hv(e))}set(e,n){let t,r;return 0===(r=h$(hA(t=hf(this),e),e)).compare(t)?this:hm(hd(hc(r,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,r){switch(n){case"hour":{let n=0,a=23;if((null==r?void 0:r.hourCycle)===12){let t=e.hour>=12;n=12*!!t,a=t?23:11}let o=hf(e),i=hm(h$(o,{hour:n}),new gZ),s=[hc(i,e.timeZone,"earlier"),hc(i,e.timeZone,"later")].filter(n=>hd(n,e.timeZone).day===i.day)[0],l=hm(h$(o,{hour:a}),new gZ),c=[hc(l,e.timeZone,"earlier"),hc(l,e.timeZone,"later")].filter(n=>hd(n,e.timeZone).day===l.day).pop(),u=ha(e)-e.offset,d=Math.floor(u/36e5),p=u%36e5;return hm(hd(u=36e5*hD(d,t,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return hS(e,n,t,r);case"era":case"year":case"month":case"day":return hm(hd(hc(hE(hf(e),n,t,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){return new Date(ha(this)-this.offset)}toString(){var e;let n,t,r;return`${hM(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n,t){if(e instanceof hW){var r,a;return e.timeZone===n?e:(r=e,a=n,hm(hd(ha(r)-r.offset,a),r.calendar))}return hd(hc(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){hT(this,hV,{writable:!0,value:void 0});let[n,t,r,a,o]=hP(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,hy(this)}}class hG extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e);return new hN(this,gU(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(hH(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(hH(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function hH(e){let[n,t]=gq(e.year+-543);return new hN(n,t,e.month,e.day)}function hU(e,n,t,r){return e+365*n+Math.floor(n/4)+30*(t-1)+r-1}function hq(e,n){let t=Math.floor(4*(n-e)/1461),r=1+Math.floor((n-hU(e,t,1,1))/30),a=n+1-hU(e,t,r,1);return[t,r,a]}function hK(e){return Math.floor(e%4/3)}function hZ(e,n){return n%13!=0?30:hK(e)+5}class hY{fromJulianDay(e){let[n,t,r]=hq(1723856,e),a="AM";return n<=0&&(a="AA",n+=5500),new hN(this,a,n,t,r)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),hU(1723856,n,e.month,e.day)}getDaysInMonth(e){return hZ(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+hK(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class hJ extends hY{fromJulianDay(e){let[n,t,r]=hq(1723856,e);return new hN(this,"AA",n+=5500,t,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class hX extends hY{fromJulianDay(e){let[n,t,r]=hq(1824665,e),a="CE";return n<=0&&(a="BCE",n=1-n),new hN(this,a,n,t,r)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),hU(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),hZ(n,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let hQ=765433;function h0(e){return 7>gW(7*e+1,19)}function h1(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>gW(3*(t+1),7)&&(t+=1),t}function h2(e){let n,t;return h1(e)+(n=h1(e-1),t=h1(e),h1(e+1)-t==356?2:+(t-n==382))}function h3(e){return h2(e+1)-h2(e)}function h4(e,n){if(n>=6&&!h0(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=h3(e);switch(n>380&&(n-=30),n){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===n?2===t?30:29:3===n?0===t?29:30:6===n?30*!!h0(e):30}class h5{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/hQ*19+234)/235)+1,r=h2(t),a=Math.floor(n-r);for(;a<1;)a=Math.floor(n-(r=h2(--t)));let o=1,i=0;for(;i<a;)i+=h4(t,o),o++;let s=a-(i-=h4(t,--o));return new hN(this,t,o,s)}toJulianDay(e){let n=h2(e.year);for(let t=1;t<e.month;t++)n+=h4(e.year,t);return n+e.day+347997}getDaysInMonth(e){return h4(e.year,e.month)}getMonthsInYear(e){return h0(e.year)?13:12}getDaysInYear(e){return h3(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(h0(n.year)&&!h0(e.year)&&n.month>6?e.month--:!h0(n.year)&&h0(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class h6 extends gZ{fromJulianDay(e){let n,t,r,a=super.fromJulianDay(e),o=a.year-78,i=e-gG(a.era,a.year,1,1);if(i<80?(o--,i+=(n=gH(a.year-1)?31:30)+155+90+10):(n=gH(a.year)?31:30,i-=80),i<n)t=1,r=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,r=e%31+1):(e-=155,t=Math.floor(e/30)+7,r=e%30+1)}return new hN(this,o,t,r)}toJulianDay(e){let n,t,[r,a]=gq(e.year+78);return(gH(a)?(n=31,t=gG(r,a,3,21)):(n=30,t=gG(r,a,3,22)),1===e.month)?t+e.day-1:(t+=n+31*Math.min(e.month-2,5),e.month>=8&&(t+=(e.month-7)*30),t+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gH(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 h8(e,n,t,r){return r+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function h7(e,n,t){let r=Math.floor((30*(t-n)+10646)/10631),a=Math.min(12,Math.ceil((t-(29+h8(n,r,1,1)))/29.5)+1),o=t-h8(n,r,a,1)+1;return new hN(e,r,a,o)}function h9(e){return(14+11*e)%30<11}class be{fromJulianDay(e){return h7(this,1948440,e)}toJulianDay(e){return h8(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&h9(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return h9(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bn extends be{fromJulianDay(e){return h7(this,1948439,e)}toJulianDay(e){return h8(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function bt(e){return 460322+l[e-1300]}function br(e,n){return(s[e-1300]&1<<11-(n-1))==0?29:30}function ba(e,n){let t=bt(e);for(let r=1;r<n;r++)t+=br(e,r);return t}function bo(e){return l[e+1-1300]-l[e-1300]}class bi extends be{fromJulianDay(e){let n=e-1948440,t=bt(1300),r=bt(1600);if(n<t||n>r)return super.fromJulianDay(e);{let e=1299,t=1,r=1;for(;r>0;){r=n-bt(++e)+1;let a=bo(e);if(r===a){t=12;break}if(r<a){let n=br(e,t);for(t=1;r>n;)r-=n,n=br(e,++t);break}}return new hN(this,e,t,n-ba(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+ba(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):br(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):bo(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let n=1300;n<=1600;n++){l[n-1300]=e;for(let t=1;t<=12;t++)e+=br(n,t)}}}}let bs=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],bl=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],bc=[1867,1911,1925,1988,2018],bu=["meiji","taisho","showa","heisei","reiwa"];function bd(e){let n=bs.findIndex(([n,t,r])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<r));return -1===n?bs.length-1:0===n?0:n-1}function bp(e){let n=bc[bu.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new hN(e.year+n,e.month,e.day)}class bf extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e),t=bd(n);return new hN(this,bu[t],n.year-bc[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(bp(e))}balanceDate(e){let n=bp(e),t=bd(n);bu[t]!==e.era&&(e.era=bu[t],e.year=n.year-bc[t]),this.constrainDate(e)}constrainDate(e){let n=bu.indexOf(e.era),t=bl[n];if(null!=t){let[r,a,o]=t,i=r-bc[n];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&n>=0){let[,t,r]=bs[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(r,e.day))}}getEras(){return bu}getYearsInEra(e){let n=bu.indexOf(e.era),t=bs[n],r=bs[n+1];if(null==r)return 9999-t[0]+1;let a=r[0]-t[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(bp(e))}getMinimumMonthInYear(e){let n=bm(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=bm(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function bm(e){if(1===e.year)return bs[bu.indexOf(e.era)]}let bg=[0,31,62,93,124,155,186,216,246,276,306,336];class bh{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),r=n-(365*(t-1)+Math.floor((8*t+21)/33)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-bg[a]+1;return new hN(this,t,a+1,o)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=bg[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gW(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function bb(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function b_(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class by extends gZ{fromJulianDay(e){let n=super.fromJulianDay(e),[t,r]=b_(gU(n.era,n.year));return new hN(this,t,r,n.month,n.day)}toJulianDay(e){return super.toJulianDay(bv(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=b_(bb(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(bv(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function bv(e){let[n,t]=gq(bb(e));return new hN(n,t,e.month,e.day)}function bA(e){switch(e){case"buddhist":return new hG;case"ethiopic":return new hY;case"ethioaa":return new hJ;case"coptic":return new hX;case"hebrew":return new h5;case"indian":return new h6;case"islamic-civil":return new be;case"islamic-tbla":return new bn;case"islamic-umalqura":return new bi;case"japanese":return new bf;case"persian":return new bh;case"roc":return new by;default:return new gZ}}let b$=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bw=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function bk(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),t="function"==typeof n.getTextInfo?n.getTextInfo():n.textInfo;if(t)return"rtl"===t.direction;if(n.script)return b$.has(n.script)}let n=e.split("-")[0];return bw.has(n)}let bx={prefix:String(Math.round(1e10*Math.random())),current:0},bC=fm.createContext(bx),bE=fm.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let bS=new WeakMap,bD="function"==typeof fm.useId?function(e){let n=fm.useId(),[t]=(0,fm.useState)(bM()),r=t?"react-aria":`react-aria${bx.prefix}`;return e||`${r}-${n}`}:function(e){let n=(0,fm.useContext)(bC),t=function(e=!1){let n=(0,fm.useContext)(bC),t=(0,fm.useRef)(null);if(null===t.current&&!e){var r,a;let e=null==(a=fm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=a.ReactCurrentOwner)?void 0:r.current;if(e){let t=bS.get(e);null==t?bS.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,bS.delete(e))}t.current=++n.current}return t.current}(!!e),r=`react-aria${n.prefix}`;return e||`${r}-${t}`};function bz(){return!1}function bB(){return!0}function bO(e){return()=>{}}function bM(){return"function"==typeof fm.useSyncExternalStore?fm.useSyncExternalStore(bO,bz,bB):(0,fm.useContext)(bE)}let bT=Symbol.for("react-aria.i18n.locale");function bP(){let e="undefined"!=typeof window&&window[bT]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:bk(e)?"rtl":"ltr"}}let bI=bP(),bN=new Set;function bF(){for(let e of(bI=bP(),bN))e(bI)}function bj(){let e=bM(),[n,t]=(0,fm.useState)(bI);return((0,fm.useEffect)(()=>(0===bN.size&&window.addEventListener("languagechange",bF),bN.add(t),()=>{bN.delete(t),0===bN.size&&window.removeEventListener("languagechange",bF)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let bR=fm.createContext(null);function bL(e){let{locale:n,children:t}=e,r=bj(),a=fm.useMemo(()=>n?{locale:n,direction:bk(n)?"rtl":"ltr"}:r,[r,n]);return fm.createElement(bR.Provider,{value:a},t)}function bV(){let e=bj();return(0,fm.useContext)(bR)||e}function bW(e){let n=(0,fm.useRef)(null),t=(0,fm.useRef)(void 0),r=(0,fm.useCallback)(n=>{if("function"==typeof e){let t=e(n);return()=>{"function"==typeof t?t():e(null)}}if(e)return e.current=n,()=>{e.current=null}},[e]);return(0,fm.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,t.current&&(t.current(),t.current=void 0),null!=value&&(t.current=r(value))}}),[r])}function bG(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function bH(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let bU="undefined"!=typeof document?fm.useLayoutEffect:()=>{};function bq(e){let n=(0,fm.useRef)(null);return bU(()=>{n.current=e},[e]),(0,fm.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let bK=!!("undefined"!=typeof window&&window.document&&window.document.createElement),bZ=new Map;function bY(e){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(null),a=bD(n),o=(0,fm.useRef)(null);if(c&&c.register(o,a),bK){let e=bZ.get(a);e&&!e.includes(r)?e.push(r):bZ.set(a,[r])}return bU(()=>()=>{c&&c.unregister(o),bZ.delete(a)},[a]),(0,fm.useEffect)(()=>{let e=r.current;return e&&t(e),()=>{e&&(r.current=null)}}),a}function bJ(e=[]){let n=bY(),[t,r]=function(e){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(null),a=bq(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}n===e.value?a():t(e.value)});bU(()=>{r.current&&a()});let o=bq(e=>{r.current=e(n),a()});return[n,o]}(n),a=(0,fm.useCallback)(()=>{r(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,r]);return bU(a,[n,a,...e]),t}"undefined"!=typeof FinalizationRegistry&&(c=new FinalizationRegistry(e=>{bZ.delete(e)}));let bX=function(){for(var e,n,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(n=function e(n){var t,r,a="";if("string"==typeof n||"number"==typeof n)a+=n;else if("object"==typeof n)if(Array.isArray(n)){var o=n.length;for(t=0;t<o;t++)n[t]&&(r=e(n[t]))&&(a&&(a+=" "),a+=r)}else for(r in n)n[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=n);return r};function bQ(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let e in r){let t=n[e],a=r[e];"function"==typeof t&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=bH(t,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof a?n[e]=bX(t,a):"id"===e&&t&&a?n.id=function(e,n){if(e===n)return e;let t=bZ.get(e);if(t)return t.forEach(e=>e.current=n),n;let r=bZ.get(n);return r?(r.forEach(n=>n.current=e),e):n}(t,a):n[e]=void 0!==a?a:t}}return n}let b0=Symbol("default");function b1({values:e,children:n}){for(let[t,r]of e)n=fm.createElement(t.Provider,{value:r},n);return n}function b2(e){let{className:n,style:t,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,fm.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:a}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:l||i?{...i,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[n,t,r,a,o,i,s])}function b3(e,n){let t=(0,fm.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||b0;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),r=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return t.slots[e]}return t}function b4(e,n,t){let{ref:r,...a}=b3(t,e.slot)||{},o=bW((0,fm.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:n=>{let t=!1,r=e.map(e=>{let r=bG(e,n);return t||(t="function"==typeof r),r});if(t)return()=>{r.forEach((n,t)=>{"function"==typeof n?n():bG(e[t],null)})}}})(n,r),[n,r])),i=bQ(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=n=>{let t="function"==typeof a.style?a.style(n):a.style,r={...n.defaultStyle,...t},o="function"==typeof e.style?e.style({...n,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function b5(e=!0){let[n,t]=(0,fm.useState)(e),r=(0,fm.useRef)(!1),a=(0,fm.useCallback)(e=>{r.current=!0,t(!!e)},[]);return bU(()=>{r.current||t(!1)},[]),[a,n]}function b6(e){let n=/^(data-.*)$/,t={};for(let r in e)n.test(r)||(t[r]=e[r]);return t}let b8=(0,fm.createContext)(null),b7=null;function b9(e,n="assertive",t=7e3){b7?b7.announce(e,n,t):(b7=new _e,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?b7.announce(e,n,t):setTimeout(()=>{(null==b7?void 0:b7.isAttached())&&(null==b7||b7.announce(e,n,t))},100))}class _e{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",t=7e3){var r,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===n?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},t)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"undefined"!=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 _n=new Set(["id"]),_t=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),_r=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_a=/^(data-.*)$/;function _o(e,n={}){let{labelable:t,isLink:r,propNames:a}=n,o={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(_n.has(n)||t&&_t.has(n)||r&&_r.has(n)||(null==a?void 0:a.has(n))||_a.test(n))&&(o[n]=e[n]);return o}let _i=["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"])'],_s=_i.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";_i.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let _l=_i.join(':not([hidden]):not([tabindex="-1"]),');function _c(e){return e.matches(_s)}function _u(e){return e.matches(_l)}let _d=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},_p=e=>e&&"window"in e&&e.window===e?e:_d(e).defaultView||window;function _f(e){if(function(){if(null==_m){_m=!1;try{document.createElement("div").focus({get preventScroll(){return _m=!0,!0}})}catch{}}return _m}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],r=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==r;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return r instanceof HTMLElement&&t.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:r}of e)n.scrollTop=t,n.scrollLeft=r}(n)}}let _m=null;function _g(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function _h(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function _b(e){let n=(0,fm.useRef)({isFocused:!1,observer:null});bU(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=bq(n=>{null==e||e(n)});return(0,fm.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{n.current.isFocused=!1,r.disabled&&t(_g(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&r.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let __=!1;function _y(e){var n;return"undefined"!=typeof window&&null!=window.navigator&&((null==(n=window.navigator.userAgentData)?void 0:n.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent))}function _v(e){var n;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(n=window.navigator.userAgentData)?void 0:n.platform)||window.navigator.platform)}function _A(e){let n=null;return()=>(null==n&&(n=e()),n)}let _$=_A(function(){return _v(/^Mac/i)}),_w=_A(function(){return _v(/^iPhone/i)}),_k=_A(function(){return _v(/^iPad/i)||_$()&&navigator.maxTouchPoints>1}),_x=_A(function(){return _w()||_k()});_A(function(){return _$()||_x()});let _C=_A(function(){return _y(/AppleWebKit/i)&&!_E()}),_E=_A(function(){return _y(/Chrome/i)}),_S=_A(function(){return _y(/Android/i)}),_D=_A(function(){return _y(/Firefox/i)}),_z=new Map,_B=new Set;function _O(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let r=_z.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",n),_z.delete(t.target)),0===_z.size)){for(let e of _B)e();_B.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let r=_z.get(t.target);r||(r=new Set,_z.set(t.target,r),t.target.addEventListener("transitioncancel",n,{once:!0})),r.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function _M(e){requestAnimationFrame(()=>{for(let[e]of _z)"isConnected"in e&&!e.isConnected&&_z.delete(e);0===_z.size?e():_B.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?_O():document.addEventListener("DOMContentLoaded",_O));let _T="default",_P="",_I=new WeakMap;function _N(e){if(_x())"disabled"===_T&&(_T="restoring",setTimeout(()=>{_M(()=>{if("restoring"===_T){let n=_d(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=_P||""),_P="",_T="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&_I.has(e)){let n=_I.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),_I.delete(e)}}let _F=fm.createContext({register:()=>{}});function _j(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function _R(e,n,t){var r=_j(e,n,"set");if(r.set)r.set.call(e,t);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=t}return t}function _L(e,n){bU(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function _V(){let e=(0,fm.useRef)(new Map),n=(0,fm.useCallback)((n,t,r,a)=>{let o=(null==a?void 0:a.once)?(...n)=>{e.current.delete(r),r(...n)}:r;e.current.set(r,{type:t,eventTarget:n,fn:o,options:a}),n.addEventListener(t,o,a)},[]),t=(0,fm.useCallback)((n,t,r,a)=>{var o;let i=(null==(o=e.current.get(r))?void 0:o.fn)||r;n.removeEventListener(t,i,a),e.current.delete(r)},[]),r=(0,fm.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,fm.useEffect)(()=>r,[r]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:r}}_F.displayName="PressResponderContext";function _W(e,n){return!!n&&!!e&&e.contains(n)}function _G(e){return e.target}function _H(e,n,t=!0){var r,a;let{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}=n;_D()&&(null==(a=window.event)||null==(r=a.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(_$()?o=!0:i=!0);let c=_C()&&_$()&&!_k()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});_H.isOpening=t,_f(e),e.dispatchEvent(c),_H.isOpening=!1}function _U(e){return 0===e.mozInputSource&&!!e.isTrusted||(_S()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}_H.isOpening=!1;var _q=t(28316),_K=new WeakMap;class _Z{continuePropagation(){_R(this,_K,!1)}get shouldStopPropagation(){var e;return e=_j(this,_K,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,r){var a;hT(this,_K,{writable:!0,value:void 0}),_R(this,_K,!0);let o=null!=(a=null==r?void 0:r.target)?a:t.currentTarget,i=null==o?void 0:o.getBoundingClientRect(),s,l=0,c,u=null;null!=t.clientX&&null!=t.clientY&&(c=t.clientX,u=t.clientY),i&&(null!=c&&null!=u?(s=c-i.left,l=u-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=n,this.target=t.currentTarget,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.x=s,this.y=l}}let _Y=Symbol("linkClicked"),_J="react-aria-pressable-style",_X="data-react-aria-pressable";function _Q(e){let{onPress:n,onPressChange:t,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let n=(0,fm.useContext)(_F);if(n){let{register:t,...r}=n;e=bQ(r,e),t()}return _L(n,e.ref),e}(e),[m,g]=(0,fm.useState)(!1),h=(0,fm.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:y}=_V(),v=bq((e,n)=>{let a=h.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let t=new _Z("pressstart",n,e);r(t),o=t.shouldStopPropagation}return t&&t(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,g(!0),o}),A=bq((e,r,o=!0)=>{let i=h.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(a){let n=new _Z("pressend",r,e);a(n),l=n.shouldStopPropagation}if(t&&t(!1),g(!1),n&&o&&!s){let t=new _Z("press",r,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),$=bq((e,n)=>{let t=h.current;if(s)return!1;if(o){t.isTriggeringEvent=!0;let r=new _Z("pressup",n,e);return o(r),t.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=bq(e=>{let n=h.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&A(_2(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,y(),d||_N(n.target),n.disposables))t();n.disposables=[]}}),k=bq(e=>{u&&w(e)}),x=bq(e=>{null==i||i(e)}),C=bq((e,n)=>{if(i){let t=new MouseEvent("click",e);_h(t,n),i(_g(t))}}),E=(0,fm.useMemo)(()=>{let e=h.current,n={onKeyDown(n){if(_1(n.nativeEvent,n.currentTarget)&&_W(n.currentTarget,_G(n.nativeEvent))){var r;_3(_G(n.nativeEvent),n.key)&&n.preventDefault();let a=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",a=v(n,"keyboard");let r=n.currentTarget;b(_d(n.currentTarget),"keyup",bH(n=>{_1(n,r)&&!n.repeat&&_W(r,_G(n))&&e.target&&$(_2(e.target,n),"keyboard")},t),!0)}a&&n.stopPropagation(),n.metaKey&&_$()&&(null==(r=e.metaKeyEvents)||r.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||_W(n.currentTarget,_G(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!_H.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||_U(n.nativeEvent))){let e=v(n,"virtual"),r=$(n,"virtual"),a=A(n,"virtual");x(n),t=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||n.nativeEvent.pointerType||"virtual",a=$(_2(n.currentTarget,n),r),o=A(_2(n.currentTarget,n),r,!0);t=a&&o,e.isOverTarget=!1,x(n),w(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,r,a;if(e.isPressed&&e.target&&_1(n,e.target)){_3(_G(n),n.key)&&n.preventDefault();let t=_G(n),a=_W(e.target,_G(n));A(_2(e.target,n),"keyboard",a),a&&C(n,e.target),y(),"Enter"!==n.key&&_0(e.target)&&_W(e.target,t)&&!n[_Y]&&(n[_Y]=!0,_H(e.target,n,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(n.key)}else if("Meta"===n.key&&(null==(t=e.metaKeyEvents)?void 0:t.size)){let n=e.metaKeyEvents;for(let t of(e.metaKeyEvents=void 0,n.values()))null==(a=e.target)||a.dispatchEvent(new KeyboardEvent("keyup",t))}};if("undefined"!=typeof PointerEvent){n.onPointerDown=n=>{var a;if(0!==n.button||!_W(n.currentTarget,_G(n.nativeEvent)))return;if(a=n.nativeEvent,!_S()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=n.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,d||function(e){if(_x()){if("default"===_T){let n=_d(e);_P=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}_T="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";_I.set(e,e.style[n]),e.style[n]="none"}}(e.target),o=v(n,e.pointerType);let a=_G(n.nativeEvent);"releasePointerCapture"in a&&a.releasePointerCapture(n.pointerId),b(_d(n.currentTarget),"pointerup",t,!1),b(_d(n.currentTarget),"pointercancel",r,!1)}o&&n.stopPropagation()},n.onMouseDown=n=>{if(_W(n.currentTarget,_G(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!_c(e);)e=e.parentElement;let n=_p(e),t=n.document.activeElement;if(!t||t===e)return;__=!0;let r=!1,a=e=>{(e.target===t||r)&&e.stopImmediatePropagation()},o=n=>{(n.target===t||r)&&(n.stopImmediatePropagation(),e||r||(r=!0,_f(t),l()))},i=n=>{(n.target===e||r)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||r)&&(n.stopImmediatePropagation(),r||(r=!0,_f(t),l()))};n.addEventListener("blur",a,!0),n.addEventListener("focusout",o,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",a,!0),n.removeEventListener("focusout",o,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),__=!1,r=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{_W(n.currentTarget,_G(n.nativeEvent))&&"virtual"!==e.pointerType&&(0!==n.button||e.isPressed||$(n,e.pointerType||n.pointerType))},n.onPointerEnter=n=>{n.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_2(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_2(e.target,n),e.pointerType,!1),k(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(_W(e.target,_G(n))&&null!=e.pointerType){let t=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?w(n):(_f(e.target),e.target.click()))},80);b(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(n);e.isOverTarget=!1}},r=e=>{w(e)};n.onDragStart=e=>{_W(e.currentTarget,_G(e.nativeEvent))&&w(e)}}return n},[b,s,c,y,d,w,k,A,v,$,x,C]);return(0,fm.useEffect)(()=>{if(!p)return;let e=_d(p.current);if(!e||!e.head||e.getElementById(_J))return;let n=e.createElement("style");n.id=_J,n.textContent=`
33
33
  @layer {
34
34
  [${_X}] {
35
35
  touch-action: pan-x pan-y pinch-zoom;