@openmrs/esm-patient-registration-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.
@@ -9,4 +9,4 @@ WARNING in ⚠ entrypoint size limit: The following entrypoint(s) combined asset
9
9
  │ main (508.401 KiB)
10
10
  │ main.js
11
11
 
12
- Rspack compiled with 2 warnings in 44.80 s
12
+ Rspack compiled with 2 warnings in 36.35 s
package/dist/7267.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.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
30
  To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}}function fs(){fo.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of fo){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,i=t.containerDomId??"omrs-apps-container",o=document.getElementById(i),a=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=a,o?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${i}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
31
  To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rp(e,()=>ft(t.appName,t.component),function(e,{online:t,offline:n,featureFlag:r}){return window.offlineEnabled?i=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&n)&&(!r||!!ue(r))&&e(i):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?r_(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}function fl(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let fc=fl();function fu(e,t){if(fc){if("string"==typeof t)if(t.startsWith("http"))return ff(e,t);else try{let n=JSON.parse(t);if(fg(n))return ff(e,n);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t)}catch(t){console.error(`Could not add routes override for ${e}: `,t)}else if(t instanceof URL)return ff(e,t.toString());else if(fg(t))return ff(e,t);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`,t)}}function fp(e){fc&&localStorage.removeItem(d9+e)}function fd(){if(!fc)return;let e=window.localStorage;for(let t=0;t<e.length;t++){let n=e.key(t);n?.startsWith(d9)&&e.removeItem(n)}}function ff(e,t){localStorage.setItem(d9+e,JSON.stringify(t))}function fg(e){if(e&&"object"==typeof e){let t=Object.prototype.hasOwnProperty;return!(t.call(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||t.call(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||t.call(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||t.call(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}return!1}function fm(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&fg(t))}var fh={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 f_(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fh.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fh.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fh.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fh.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fh.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fh.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fh.SMALL_DESKTOP_MAX)}var fy=!1;function fb(){fy||(window.addEventListener("resize",f_),f_(),fy=!0)}var fv=n(16709),fA=n.n(fv),f$=n(46062),fw=n.n(f$),fk=n(44036),fx=n.n(fk),fC=n(96793),fE=n.n(fC),fD=n(17892),fS=n.n(fD),fz=n(11173),fB=n.n(fz),fM=n(42464),fO=n.n(fM),fT=n(6370),fP={};fP.styleTagTransform=fO(),fP.setAttributes=fS(),fP.insert=fE().bind(null,"head"),fP.domAPI=fx(),fP.insertStyleElement=fB(),fw()(fT.Z,fP);let fI=fT.Z&&fT.Z.locals?fT.Z.locals:void 0;function fN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fF(e){var t,n=e.title,r=e.children,i="tablet"===dL();return px().createElement("div",{className:fA()((fN(t={},fI.tabletHeader,i),fN(t,fI.desktopHeader,!i),t))},px().createElement("h4",null,n),r)}var fR=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fj={primaryColor:{_type:tt.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[t0.oneOf(fR)]},secondaryColor:{_type:tt.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[t0.oneOf(fR)]}},fL={"Brand color #1":{_default:"#005d5d",_type:tt.String},"Brand color #2":{_default:"#004144",_type:tt.String},"Brand color #3":{_default:"#007d79",_type:tt.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tt.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tt.UUID}}},implementationName:{_type:tt.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tt.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:tt.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:[t0.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:tt.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:tt.String}},diagnosisTags:fj},fV=n(72530),fG={};fG.styleTagTransform=fO(),fG.setAttributes=fS(),fG.insert=fE().bind(null,"head"),fG.domAPI=fx(),fG.insertStyleElement=fB(),fw()(fV.Z,fG);let fW=fV.Z&&fV.Z.locals?fV.Z.locals:void 0;function fH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fU(e){var t,n,r,i=e.menuTitle,o=e.children,a=(t=px().useState(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(n=i.next()).done)&&(o.push(n.value),o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(t,2)||function(e,t){if(e){if("string"==typeof e)return fH(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fH(e,t)}}(t,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=a[0],l=a[1],c=dU(function(){return l(!1)},s),u="tablet"===dL(),p=(0,pk.useCallback)(function(){return l(function(e){return!e})},[]);return px().createElement("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",fW.container),ref:c},px().createElement("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},fW.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:p},i),px().createElement("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fW.menu,(n={},r=fW.show,r in n?Object.defineProperty(n,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[r]=s,n)),tabIndex:0,"data-floating-menu-direction":"bottom",role:"menu","aria-labelledby":"custom-actions-overflow-menu-trigger",id:"custom-actions-overflow-menu"},px().createElement("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),px().createElement("span",null)))}var fq=n(62836),fK=n(20708),fZ=n(23148),fY={};fY.styleTagTransform=fO(),fY.setAttributes=fS(),fY.insert=fE().bind(null,"head"),fY.domAPI=fx(),fY.insertStyleElement=fB(),fw()(fZ.Z,fY);let fJ=fZ.Z&&fZ.Z.locals?fZ.Z.locals:void 0;var fX=function(e){var t=e.path,n=e.title,r=e.basePath,i=e.icon,o=(0,p6.useTranslation)().t,a=(0,fq.useLocation)(),s=(0,pk.useMemo)(function(){if(!t)return!1;var e,n=t.startsWith("/")?t.slice(1):t;if(n.startsWith("http"))return n===window.location.href;var r=n.split("/").map(function(e){return decodeURIComponent(e)}),i=(null!=(e=a.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,i)},[a.pathname,t]);return px().createElement("div",{key:t},px().createElement(fK.ConfigurableLink,{className:fA()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(t))},px().createElement("span",{className:fJ.menu},px().createElement(fK.MaybeIcon,{icon:i,className:fJ.icon,size:16}),px().createElement("span",null,o(n)))))};function fQ(e){return function(t){var n=t.basePath;return px().createElement(fq.BrowserRouter,null,px().createElement(fX,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({basePath:n},e)))}}function f0(e,t){return e-t*Math.floor(e/t)}function f1(e,t,n,r){let i=(t=f3(e,t))-1,o=-2;return n<=2?o=0:f2(t)&&(o=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+o+r)}function f2(e){return e%4==0&&(e%100!=0||e%400==0)}function f3(e,t){return"BC"===e?1-t:t}function f4(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let f5={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 f6{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=f0(t,146097),i=Math.floor(r/36524),o=f0(r,36524),a=Math.floor(o/1461),s=Math.floor(f0(o,1461)/365),[l,c]=f4(400*n+100*i+4*a+s+ +(4!==i&&4!==s)),u=e-f1(l,c,1,1),p=2;e<f1(l,c,3,1)?p=0:f2(c)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-f1(l,c,d,1)+1;return new gK(l,c,d,f)}toJulianDay(e){return f1(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return f5[f2(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return f2(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 f8={"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 f7(e,t){return t=gx(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function f9(e,t){return ge(e.calendar,t.calendar)&&f7(e,t)}function ge(e,t){var n,r,i,o;return null!=(o=null!=(i=null==(n=e.isEqual)?void 0:n.call(e,t))?i:null==(r=t.isEqual)?void 0:r.call(t,e))?o:e.identifier===t.identifier}let gt={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function gn(e,t,n){let r,i=Math.ceil(e.calendar.toJulianDay(e)+1-(n?gt[n]:(r=function(e){if(Intl.Locale){let t=gd.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&gd.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&f8[r]||0))%7;return i<0&&(i+=7),i}function gr(e){return g$(Date.now(),e)}function gi(e){return gw(gr(e))}function go(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ga(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let gs=null;function gl(){return null==gs&&(gs=new Intl.DateTimeFormat().resolvedOptions().timeZone),gs}function gc(e){return e.subtract({days:e.day-1})}function gu(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function gp(e,t,n){let r=gn(e,t,n);return e.subtract({days:r})}let gd=new Map;function gf(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function gg(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gm(e){return gh(f3((e=gx(e,new f6)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gh(e,t,n,r,i,o,a){let s=new Date;return s.setUTCHours(r,i,o,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function g_(e,t){if("UTC"===t)return 0;if(e>0&&t===gl())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:i,hour:o,minute:a,second:s}=gb(e,t);return gh(n,r,i,o,a,s,0)-1e3*Math.floor(e/1e3)}let gy=new Map;function gb(e,t){let n=gy.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gy.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)"literal"!==e.type&&(i[e.type]=e.value);return{year:"BC"===i.era||"B"===i.era?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:"24"===i.hour?0:+i.hour,minute:+i.minute,second:+i.second}}function gv(e,t,n="compatible"){var r,i,o;let a=gk(e);if("UTC"===t)return gm(a);if(t===gl()&&"compatible"===n){a=gx(a,new f6);let e=new Date,t=f3(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=gm(a),l=g_(s-864e5,t),c=g_(s+864e5,t),u=(r=a,((i=s-l)==(o=s-c)?[i]:[i,o]).filter(e=>{var n;let i;return n=r,i=gb(e,t),n.year===i.year&&n.month===i.month&&n.day===i.day&&n.hour===i.hour&&n.minute===i.minute&&n.second===i.second}));if(1===u.length)return u[0];if(u.length>1)switch(n){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function gA(e,t,n="compatible"){return new Date(gv(e,t,n))}function g$(e,t){let n=g_(e,t),r=new Date(e+n),i=r.getUTCFullYear();return new g0(i<1?"BC":"AD",i<1?-i+1:i,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function gw(e){return new gK(e.calendar,e.era,e.year,e.month,e.day)}function gk(e,t){let n=0,r=0,i=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:o}=t),new gX(e.calendar,e.era,e.year,e.month,e.day,n,r,i,o)}function gx(e,t){if(ge(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,gz(r),r}function gC(e,t){let n=e.copy(),r="hour"in n?gI(n,t):0;gE(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,gD(n),gS(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,gD(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gD(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var o,a;let e=null==(o=(a=n.calendar).isInverseEra)?void 0:o.call(a,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function gE(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function gD(e){for(;e.month<1;)gE(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gE(e,1)}function gS(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 gz(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gS(e)}function gB(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function gM(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),gz(n),n}function gO(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),gT(n),n}function gT(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 gP(e,t){let n=e%t;return n<0&&(n+=t),n}function gI(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gP(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gP(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gP(e.minute,60),n=Math.floor(e.hour/24),e.hour=gP(e.hour,24),n}function gN(e,t){let n=e.copy();return gI(n,t),n}function gF(e,t,n,r){let i=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=gj(o,n,0,t.length-1,null==r?void 0:r.round),i.era=t[o],gz(i);break}case"year":var o,a;(null==(o=(a=i.calendar).isInverseEra)?void 0:o.call(a,i))&&(n=-n),i.year=gj(e.year,n,-1/0,9999,null==r?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=gj(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":i.day=gj(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),gz(i),i}function gR(e,t,n,r){let i=e.copy();switch(t){case"hour":{let t=e.hour,o=0,a=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;o=12*!!e,a=e?23:11}i.hour=gj(t,n,o,a,null==r?void 0:r.round);break}case"minute":i.minute=gj(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":i.second=gj(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":i.millisecond=gj(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return i}function gj(e,t,n,r,i=!1){if(i){(e+=Math.sign(t))<n&&(e=r);let i=Math.abs(t);(e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function gL(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?gv(gC(gk(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gm(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),gx(g$(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gV(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 gG(e){let t,n=gx(e,new f6);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function gW(e){return`${gG(e)}T${gV(e)}`}function gH(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function gU(e){let t,n="object"==typeof e[0]?e.shift():new f6;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var gq=new WeakMap;class gK{copy(){return this.era?new gK(this.calendar,this.era,this.year,this.month,this.day):new gK(this.calendar,this.year,this.month,this.day)}add(e){return gC(this,e)}subtract(e){return gC(this,gB(e))}set(e){return gM(this,e)}cycle(e,t,n){return gF(this,e,t,n)}toDate(e){return gA(this,e)}toString(){return gG(this)}compare(e){return go(this,e)}constructor(...e){gH(this,gq,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,gz(this)}}var gZ=new WeakMap;class gY{copy(){return new gY(this.hour,this.minute,this.second,this.millisecond)}add(e){return gN(this,e)}subtract(e){return gN(this,gB(e))}set(e){return gO(this,e)}cycle(e,t,n){return gR(this,e,t,n)}toString(){return gV(this)}compare(e){return ga(this)-ga(e)}constructor(e=0,t=0,n=0,r=0){gH(this,gZ,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,gT(this)}}var gJ=new WeakMap;class gX{copy(){return this.era?new gX(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gX(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gC(this,e)}subtract(e){return gC(this,gB(e))}set(e){return gM(gO(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return gF(this,e,t,n);default:return gR(this,e,t,n)}}toDate(e,t){return gA(this,e,t)}toString(){return gW(this)}compare(e){let t=go(this,e);if(0===t){var n;return n=gk(e),ga(this)-ga(n)}return t}constructor(...e){gH(this,gJ,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gz(this)}}var gQ=new WeakMap;class g0{copy(){return this.era?new g0(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g0(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gL(this,e)}subtract(e){return gL(this,gB(e))}set(e,t){let n,r;return 0===(r=gO(gM(n=gk(this),e),e)).compare(n)?this:gx(g$(gv(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,i=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,i=n?23:11}let o=gk(e),a=gx(gO(o,{hour:t}),new f6),s=[gv(a,e.timeZone,"earlier"),gv(a,e.timeZone,"later")].filter(t=>g$(t,e.timeZone).day===a.day)[0],l=gx(gO(o,{hour:i}),new f6),c=[gv(l,e.timeZone,"earlier"),gv(l,e.timeZone,"later")].filter(t=>g$(t,e.timeZone).day===l.day).pop(),u=gm(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return gx(g$(u=36e5*gj(p,n,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gR(e,t,n,r);case"era":case"year":case"month":case"day":return gx(g$(gv(gF(gk(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){return new Date(gm(this)-this.offset)}toString(){var e;let t,n,r;return`${gW(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t,n){if(e instanceof g0){var r,i;return e.timeZone===t?e:(r=e,i=t,gx(g$(gm(r)-r.offset,i),r.calendar))}return g$(gv(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){gH(this,gQ,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gz(this)}}class g1 extends f6{fromJulianDay(e){let t=super.fromJulianDay(e);return new gK(this,f3(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(g2(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(g2(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function g2(e){let[t,n]=f4(e.year+-543);return new gK(t,n,e.month,e.day)}function g3(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function g4(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-g3(e,n,1,1))/30),i=t+1-g3(e,n,r,1);return[n,r,i]}function g5(e){return Math.floor(e%4/3)}function g6(e,t){return t%13!=0?30:g5(e)+5}class g8{fromJulianDay(e){let[t,n,r]=g4(1723856,e),i="AM";return t<=0&&(i="AA",t+=5500),new gK(this,i,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),g3(1723856,t,e.month,e.day)}getDaysInMonth(e){return g6(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+g5(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class g7 extends g8{fromJulianDay(e){let[t,n,r]=g4(1723856,e);return new gK(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class g9 extends g8{fromJulianDay(e){let[t,n,r]=g4(1824665,e),i="CE";return t<=0&&(i="BCE",t=1-t),new gK(this,i,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),g3(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),g6(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let me=765433;function mt(e){return 7>f0(7*e+1,19)}function mn(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>f0(3*(n+1),7)&&(n+=1),n}function mr(e){let t,n;return mn(e)+(t=mn(e-1),n=mn(e),mn(e+1)-n==356?2:+(n-t==382))}function mi(e){return mr(e+1)-mr(e)}function mo(e,t){if(t>=6&&!mt(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=mi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!mt(e):30}class ma{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/me*19+234)/235)+1,r=mr(n),i=Math.floor(t-r);for(;i<1;)i=Math.floor(t-(r=mr(--n)));let o=1,a=0;for(;a<i;)a+=mo(n,o),o++;let s=i-(a-=mo(n,--o));return new gK(this,n,o,s)}toJulianDay(e){let t=mr(e.year);for(let n=1;n<e.month;n++)t+=mo(e.year,n);return t+e.day+347997}getDaysInMonth(e){return mo(e.year,e.month)}getMonthsInYear(e){return mt(e.year)?13:12}getDaysInYear(e){return mi(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(mt(t.year)&&!mt(e.year)&&t.month>6?e.month--:!mt(t.year)&&mt(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class ms extends f6{fromJulianDay(e){let t,n,r,i=super.fromJulianDay(e),o=i.year-78,a=e-f1(i.era,i.year,1,1);if(a<80?(o--,a+=(t=f2(i.year-1)?31:30)+155+90+10):(t=f2(i.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new gK(this,o,n,r)}toJulianDay(e){let t,n,[r,i]=f4(e.year+78);return(f2(i)?(t=31,n=f1(r,i,3,21)):(t=30,n=f1(r,i,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&f2(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 ml(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function mc(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+ml(t,r,1,1)))/29.5)+1),o=n-ml(t,r,i,1)+1;return new gK(e,r,i,o)}function mu(e){return(14+11*e)%30<11}class mp{fromJulianDay(e){return mc(this,1948440,e)}toJulianDay(e){return ml(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&mu(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return mu(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class md extends mp{fromJulianDay(e){return mc(this,1948439,e)}toJulianDay(e){return ml(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function mf(e){return 460322+l[e-1300]}function mg(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function mm(e,t){let n=mf(e);for(let r=1;r<t;r++)n+=mg(e,r);return n}function mh(e){return l[e+1-1300]-l[e-1300]}class m_ extends mp{fromJulianDay(e){let t=e-1948440,n=mf(1300),r=mf(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-mf(++e)+1;let i=mh(e);if(r===i){n=12;break}if(r<i){let t=mg(e,n);for(n=1;r>t;)r-=t,t=mg(e,++n);break}}return new gK(this,e,n,t-mm(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+mm(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):mg(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):mh(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 t=1300;t<=1600;t++){l[t-1300]=e;for(let n=1;n<=12;n++)e+=mg(t,n)}}}}let my=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],mb=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],mv=[1867,1911,1925,1988,2018],mA=["meiji","taisho","showa","heisei","reiwa"];function m$(e){let t=my.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?my.length-1:0===t?0:t-1}function mw(e){let t=mv[mA.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gK(e.year+t,e.month,e.day)}class mk extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),n=m$(t);return new gK(this,mA[n],t.year-mv[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(mw(e))}balanceDate(e){let t=mw(e),n=m$(t);mA[n]!==e.era&&(e.era=mA[n],e.year=t.year-mv[n]),this.constrainDate(e)}constrainDate(e){let t=mA.indexOf(e.era),n=mb[t];if(null!=n){let[r,i,o]=n,a=r-mv[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=my[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return mA}getYearsInEra(e){let t=mA.indexOf(e.era),n=my[t],r=my[t+1];if(null==r)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(mw(e))}getMinimumMonthInYear(e){let t=mx(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=mx(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function mx(e){if(1===e.year)return my[mA.indexOf(e.era)]}let mC=[0,31,62,93,124,155,186,216,246,276,306,336];class mE{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),i=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-mC[i]+1;return new gK(this,n,i+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=mC[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>f0(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function mD(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function mS(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class mz extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=mS(f3(t.era,t.year));return new gK(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(mB(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=mS(mD(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(mB(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function mB(e){let[t,n]=f4(mD(e));return new gK(t,n,e.month,e.day)}function mM(e){switch(e){case"buddhist":return new g1;case"ethiopic":return new g8;case"ethioaa":return new g7;case"coptic":return new g9;case"hebrew":return new ma;case"indian":return new ms;case"islamic-civil":return new mp;case"islamic-tbla":return new md;case"islamic-umalqura":return new m_;case"japanese":return new mk;case"persian":return new mE;case"roc":return new mz;default:return new f6}}let mO=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function mP(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return mO.has(t.script)}let t=e.split("-")[0];return mT.has(t)}let mI={prefix:String(Math.round(1e10*Math.random())),current:0},mN=pk.createContext(mI),mF=pk.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let mR=new WeakMap,mj="function"==typeof pk.useId?function(e){let t=pk.useId(),[n]=(0,pk.useState)(mW()),r=n?"react-aria":`react-aria${mI.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,pk.useContext)(mN),n=function(e=!1){let t=(0,pk.useContext)(mN),n=(0,pk.useRef)(null);if(null===n.current&&!e){var r,i;let e=null==(i=pk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=i.ReactCurrentOwner)?void 0:r.current;if(e){let n=mR.get(e);null==n?mR.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,mR.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function mL(){return!1}function mV(){return!0}function mG(e){return()=>{}}function mW(){return"function"==typeof pk.useSyncExternalStore?pk.useSyncExternalStore(mG,mL,mV):(0,pk.useContext)(mF)}let mH=Symbol.for("react-aria.i18n.locale");function mU(){let e="undefined"!=typeof window&&window[mH]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:mP(e)?"rtl":"ltr"}}let mq=mU(),mK=new Set;function mZ(){for(let e of(mq=mU(),mK))e(mq)}function mY(){let e=mW(),[t,n]=(0,pk.useState)(mq);return((0,pk.useEffect)(()=>(0===mK.size&&window.addEventListener("languagechange",mZ),mK.add(n),()=>{mK.delete(n),0===mK.size&&window.removeEventListener("languagechange",mZ)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let mJ=pk.createContext(null);function mX(e){let{locale:t,children:n}=e,r=mY(),i=pk.useMemo(()=>t?{locale:t,direction:mP(t)?"rtl":"ltr"}:r,[r,t]);return pk.createElement(mJ.Provider,{value:i},n)}function mQ(){let e=mY();return(0,pk.useContext)(mJ)||e}function m0(e){let t=(0,pk.useRef)(null),n=(0,pk.useRef)(void 0),r=(0,pk.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,pk.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function m1(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function m2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let m3="undefined"!=typeof document?pk.useLayoutEffect:()=>{};function m4(e){let t=(0,pk.useRef)(null);return m3(()=>{t.current=e},[e]),(0,pk.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let m5=!!("undefined"!=typeof window&&window.document&&window.document.createElement),m6=new Map;function m8(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(null),i=mj(t),o=(0,pk.useRef)(null);if(c&&c.register(o,i),m5){let e=m6.get(i);e&&!e.includes(r)?e.push(r):m6.set(i,[r])}return m3(()=>()=>{c&&c.unregister(o),m6.delete(i)},[i]),(0,pk.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function m7(e=[]){let t=m8(),[n,r]=function(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(null),i=m4(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?i():n(e.value)});m3(()=>{r.current&&i()});let o=m4(e=>{r.current=e(t),i()});return[t,o]}(t),i=(0,pk.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return m3(i,[t,i,...e]),n}"undefined"!=typeof FinalizationRegistry&&(c=new FinalizationRegistry(e=>{m6.delete(e)}));let m9=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(r&&(r+=" "),r+=t);return r};function he(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];"function"==typeof n&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=m2(n,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof i?t[e]=m9(n,i):"id"===e&&n&&i?t.id=function(e,t){if(e===t)return e;let n=m6.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=m6.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,i):t[e]=void 0!==i?i:n}}return t}let ht=Symbol("default");function hn({values:e,children:t}){for(let[n,r]of e)t=pk.createElement(n.Provider,{value:r},t);return t}function hr(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=e;return(0,pk.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:i}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:i,style:l||a?{...a,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[t,n,r,i,o,a,s])}function hi(e,t){let n=(0,pk.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||ht;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function ho(e,t,n){let{ref:r,...i}=hi(n,e.slot)||{},o=m0((0,pk.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=m1(e,t);return n||(n="function"==typeof r),r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():m1(e[n],null)})}}})(t,r),[t,r])),a=he(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&("function"==typeof i.style||"function"==typeof e.style?a.style=t=>{let n="function"==typeof i.style?i.style(t):i.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:a.style={...i.style,...e.style}),[a,o]}function ha(e=!0){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(!1),i=(0,pk.useCallback)(e=>{r.current=!0,n(!!e)},[]);return m3(()=>{r.current||n(!1)},[]),[i,t]}function hs(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let hl=(0,pk.createContext)(null),hc=null;function hu(e,t="assertive",n=7e3){hc?hc.announce(e,t,n):(hc=new hp,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?hc.announce(e,t,n):setTimeout(()=>{(null==hc?void 0:hc.isAttached())&&(null==hc||hc.announce(e,t,n))},100))}class hp{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,i;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"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(i=this.politeLog)||i.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"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 hd=new Set(["id"]),hf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),hg=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),hm=/^(data-.*)$/;function hh(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(hd.has(t)||n&&hf.has(t)||r&&hg.has(t)||(null==i?void 0:i.has(t))||hm.test(t))&&(o[t]=e[t]);return o}let h_=["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"])'],hy=h_.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";h_.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let hb=h_.join(':not([hidden]):not([tabindex="-1"]),');function hv(e){return e.matches(hy)}function hA(e){return e.matches(hb)}let h$=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},hw=e=>e&&"window"in e&&e.window===e?e:h$(e).defaultView||window;function hk(e){if(function(){if(null==hx){hx=!1;try{document.createElement("div").focus({get preventScroll(){return hx=!0,!0}})}catch{}}return hx}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let hx=null;function hC(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function hE(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function hD(e){let t=(0,pk.useRef)({isFocused:!1,observer:null});m3(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=m4(t=>{null==e||e(t)});return(0,pk.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(hC(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let hS=!1;function hz(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function hB(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function hM(e){let t=null;return()=>(null==t&&(t=e()),t)}let hO=hM(function(){return hB(/^Mac/i)}),hT=hM(function(){return hB(/^iPhone/i)}),hP=hM(function(){return hB(/^iPad/i)||hO()&&navigator.maxTouchPoints>1}),hI=hM(function(){return hT()||hP()});hM(function(){return hO()||hI()});let hN=hM(function(){return hz(/AppleWebKit/i)&&!hF()}),hF=hM(function(){return hz(/Chrome/i)}),hR=hM(function(){return hz(/Android/i)}),hj=hM(function(){return hz(/Firefox/i)}),hL=new Map,hV=new Set;function hG(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=hL.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),hL.delete(n.target)),0===hL.size)){for(let e of hV)e();hV.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=hL.get(n.target);r||(r=new Set,hL.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function hW(e){requestAnimationFrame(()=>{for(let[e]of hL)"isConnected"in e&&!e.isConnected&&hL.delete(e);0===hL.size?e():hV.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?hG():document.addEventListener("DOMContentLoaded",hG));let hH="default",hU="",hq=new WeakMap;function hK(e){if(hI())"disabled"===hH&&(hH="restoring",setTimeout(()=>{hW(()=>{if("restoring"===hH){let t=h$(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hU||""),hU="",hH="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hq.has(e)){let t=hq.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hq.delete(e)}}let hZ=pk.createContext({register:()=>{}});function hY(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function hJ(e,t,n){var r=hY(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function hX(e,t){m3(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hQ(){let e=(0,pk.useRef)(new Map),t=(0,pk.useCallback)((t,n,r,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:i}),t.addEventListener(n,o,i)},[]),n=(0,pk.useCallback)((t,n,r,i)=>{var o;let a=(null==(o=e.current.get(r))?void 0:o.fn)||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,pk.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,pk.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}hZ.displayName="PressResponderContext";function h0(e,t){return!!t&&!!e&&e.contains(t)}function h1(e){return e.target}function h2(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=t;hj()&&(null==(i=window.event)||null==(r=i.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(hO()?o=!0:a=!0);let c=hN()&&hO()&&!hP()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});h2.isOpening=n,hk(e),e.dispatchEvent(c),h2.isOpening=!1}function h3(e){return 0===e.mozInputSource&&!!e.isTrusted||(hR()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}h2.isOpening=!1;var h4=n(28316),h5=new WeakMap;class h6{continuePropagation(){hJ(this,h5,!1)}get shouldStopPropagation(){var e;return e=hY(this,h5,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var i;gH(this,h5,{writable:!0,value:void 0}),hJ(this,h5,!0);let o=null!=(i=null==r?void 0:r.target)?i:n.currentTarget,a=null==o?void 0:o.getBoundingClientRect(),s,l=0,c,u=null;null!=n.clientX&&null!=n.clientY&&(c=n.clientX,u=n.clientY),a&&(null!=c&&null!=u?(s=c-a.left,l=u-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l}}let h8=Symbol("linkClicked"),h7="react-aria-pressable-style",h9="data-react-aria-pressable";function _e(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,pk.useContext)(hZ);if(t){let{register:n,...r}=t;e=he(r,e),n()}return hX(t,e.ref),e}(e),[g,m]=(0,pk.useState)(!1),h=(0,pk.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=hQ(),v=m4((e,t)=>{let i=h.current;if(s||i.didFirePressStart)return!1;let o=!0;if(i.isTriggeringEvent=!0,r){let n=new h6("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,m(!0),o}),A=m4((e,r,o=!0)=>{let a=h.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(i){let t=new h6("pressend",r,e);i(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&o&&!s){let n=new h6("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),$=m4((e,t)=>{let n=h.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new h6("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=m4(e=>{let t=h.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(_r(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),p||hK(t.target),t.disposables))n();t.disposables=[]}}),k=m4(e=>{u&&w(e)}),x=m4(e=>{null==a||a(e)}),C=m4((e,t)=>{if(a){let n=new MouseEvent("click",e);hE(n,t),a(hC(n))}}),E=(0,pk.useMemo)(()=>{let e=h.current,t={onKeyDown(t){if(_n(t.nativeEvent,t.currentTarget)&&h0(t.currentTarget,h1(t.nativeEvent))){var r;_i(h1(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",i=v(t,"keyboard");let r=t.currentTarget;y(h$(t.currentTarget),"keyup",m2(t=>{_n(t,r)&&!t.repeat&&h0(r,h1(t))&&e.target&&$(_r(e.target,t),"keyboard")},n),!0)}i&&t.stopPropagation(),t.metaKey&&hO()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||h0(t.currentTarget,h1(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!h2.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||h3(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),i=A(t,"virtual");x(t),n=e&&r&&i}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",i=$(_r(t.currentTarget,t),r),o=A(_r(t.currentTarget,t),r,!0);n=i&&o,e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,i;if(e.isPressed&&e.target&&_n(t,e.target)){_i(h1(t),t.key)&&t.preventDefault();let n=h1(t),i=h0(e.target,h1(t));A(_r(e.target,t),"keyboard",i),i&&C(t,e.target),b(),"Enter"!==t.key&&_t(e.target)&&h0(e.target,n)&&!t[h8]&&(t[h8]=!0,h2(e.target,t,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(t.key)}else if("Meta"===t.key&&(null==(n=e.metaKeyEvents)?void 0:n.size)){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))null==(i=e.target)||i.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{var i;if(0!==t.button||!h0(t.currentTarget,h1(t.nativeEvent)))return;if(i=t.nativeEvent,!hR()&&0===i.width&&0===i.height||1===i.width&&1===i.height&&0===i.pressure&&0===i.detail&&"mouse"===i.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,p||function(e){if(hI()){if("default"===hH){let t=h$(e);hU=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hH="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hq.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=v(t,e.pointerType);let i=h1(t.nativeEvent);"releasePointerCapture"in i&&i.releasePointerCapture(t.pointerId),y(h$(t.currentTarget),"pointerup",n,!1),y(h$(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(h0(t.currentTarget,h1(t.nativeEvent))&&0===t.button){if(c){let n=function(e){for(;e&&!hv(e);)e=e.parentElement;let t=hw(e),n=t.document.activeElement;if(!n||n===e)return;hS=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},o=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,hk(n),l()))},a=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,hk(n),l()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),hS=!1,r=!1},c=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{h0(t.currentTarget,h1(t.nativeEvent))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||$(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_r(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_r(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(h0(e.target,h1(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(hk(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(t);e.isOverTarget=!1}},r=e=>{w(e)};t.onDragStart=e=>{h0(e.currentTarget,h1(e.nativeEvent))&&w(e)}}return t},[y,s,c,b,p,w,k,A,v,$,x,C]);return(0,pk.useEffect)(()=>{if(!d)return;let e=h$(d.current);if(!e||!e.head||e.getElementById(h7))return;let t=e.createElement("style");t.id=h7,t.textContent=`
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}function fl(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let fc=fl();function fu(e,t){if(fc){if("string"==typeof t)if(t.startsWith("http"))return ff(e,t);else try{let n=JSON.parse(t);if(fg(n))return ff(e,n);console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t)}catch(t){console.error(`Could not add routes override for ${e}: `,t)}else if(t instanceof URL)return ff(e,t.toString());else if(fg(t))return ff(e,t);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`,t)}}function fp(e){fc&&localStorage.removeItem(d9+e)}function fd(){if(fc)for(let e of Object.keys(localStorage))e.startsWith(d9)&&localStorage.removeItem(e)}function ff(e,t){localStorage.setItem(d9+e,JSON.stringify(t))}function fg(e){if(e&&"object"==typeof e){let t=Object.prototype.hasOwnProperty;return!(t.call(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||t.call(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||t.call(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||t.call(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}return!1}function fm(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&fg(t))}var fh={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 f_(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fh.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fh.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fh.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fh.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fh.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fh.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fh.SMALL_DESKTOP_MAX)}var fy=!1;function fb(){fy||(window.addEventListener("resize",f_),f_(),fy=!0)}var fv=n(16709),fA=n.n(fv),f$=n(46062),fw=n.n(f$),fk=n(44036),fx=n.n(fk),fC=n(96793),fE=n.n(fC),fD=n(17892),fS=n.n(fD),fz=n(11173),fB=n.n(fz),fM=n(42464),fO=n.n(fM),fT=n(6370),fP={};fP.styleTagTransform=fO(),fP.setAttributes=fS(),fP.insert=fE().bind(null,"head"),fP.domAPI=fx(),fP.insertStyleElement=fB(),fw()(fT.Z,fP);let fI=fT.Z&&fT.Z.locals?fT.Z.locals:void 0;function fN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fF(e){var t,n=e.title,r=e.children,i="tablet"===dL();return px().createElement("div",{className:fA()((fN(t={},fI.tabletHeader,i),fN(t,fI.desktopHeader,!i),t))},px().createElement("h4",null,n),r)}var fR=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fj={primaryColor:{_type:tt.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[t0.oneOf(fR)]},secondaryColor:{_type:tt.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[t0.oneOf(fR)]}},fL={"Brand color #1":{_default:"#005d5d",_type:tt.String},"Brand color #2":{_default:"#004144",_type:tt.String},"Brand color #3":{_default:"#007d79",_type:tt.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tt.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tt.UUID}}},implementationName:{_type:tt.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tt.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:tt.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:[t0.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:tt.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:tt.String}},diagnosisTags:fj},fV=n(72530),fG={};fG.styleTagTransform=fO(),fG.setAttributes=fS(),fG.insert=fE().bind(null,"head"),fG.domAPI=fx(),fG.insertStyleElement=fB(),fw()(fV.Z,fG);let fW=fV.Z&&fV.Z.locals?fV.Z.locals:void 0;function fH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fU(e){var t,n,r,i=e.menuTitle,o=e.children,a=(t=px().useState(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(n=i.next()).done)&&(o.push(n.value),o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(t,2)||function(e,t){if(e){if("string"==typeof e)return fH(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fH(e,t)}}(t,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=a[0],l=a[1],c=dU(function(){return l(!1)},s),u="tablet"===dL(),p=(0,pk.useCallback)(function(){return l(function(e){return!e})},[]);return px().createElement("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",fW.container),ref:c},px().createElement("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},fW.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:p},i),px().createElement("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fW.menu,(n={},r=fW.show,r in n?Object.defineProperty(n,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[r]=s,n)),tabIndex:0,"data-floating-menu-direction":"bottom",role:"menu","aria-labelledby":"custom-actions-overflow-menu-trigger",id:"custom-actions-overflow-menu"},px().createElement("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),px().createElement("span",null)))}var fq=n(62836),fK=n(20708),fZ=n(23148),fY={};fY.styleTagTransform=fO(),fY.setAttributes=fS(),fY.insert=fE().bind(null,"head"),fY.domAPI=fx(),fY.insertStyleElement=fB(),fw()(fZ.Z,fY);let fJ=fZ.Z&&fZ.Z.locals?fZ.Z.locals:void 0;var fX=function(e){var t=e.path,n=e.title,r=e.basePath,i=e.icon,o=(0,p6.useTranslation)().t,a=(0,fq.useLocation)(),s=(0,pk.useMemo)(function(){if(!t)return!1;var e,n=t.startsWith("/")?t.slice(1):t;if(n.startsWith("http"))return n===window.location.href;var r=n.split("/").map(function(e){return decodeURIComponent(e)}),i=(null!=(e=a.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,i)},[a.pathname,t]);return px().createElement("div",{key:t},px().createElement(fK.ConfigurableLink,{className:fA()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(t))},px().createElement("span",{className:fJ.menu},px().createElement(fK.MaybeIcon,{icon:i,className:fJ.icon,size:16}),px().createElement("span",null,o(n)))))};function fQ(e){return function(t){var n=t.basePath;return px().createElement(fq.BrowserRouter,null,px().createElement(fX,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({basePath:n},e)))}}function f0(e,t){return e-t*Math.floor(e/t)}function f1(e,t,n,r){let i=(t=f3(e,t))-1,o=-2;return n<=2?o=0:f2(t)&&(o=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+o+r)}function f2(e){return e%4==0&&(e%100!=0||e%400==0)}function f3(e,t){return"BC"===e?1-t:t}function f4(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let f5={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 f6{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=f0(t,146097),i=Math.floor(r/36524),o=f0(r,36524),a=Math.floor(o/1461),s=Math.floor(f0(o,1461)/365),[l,c]=f4(400*n+100*i+4*a+s+ +(4!==i&&4!==s)),u=e-f1(l,c,1,1),p=2;e<f1(l,c,3,1)?p=0:f2(c)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-f1(l,c,d,1)+1;return new gK(l,c,d,f)}toJulianDay(e){return f1(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return f5[f2(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return f2(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 f8={"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 f7(e,t){return t=gx(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function f9(e,t){return ge(e.calendar,t.calendar)&&f7(e,t)}function ge(e,t){var n,r,i,o;return null!=(o=null!=(i=null==(n=e.isEqual)?void 0:n.call(e,t))?i:null==(r=t.isEqual)?void 0:r.call(t,e))?o:e.identifier===t.identifier}let gt={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function gn(e,t,n){let r,i=Math.ceil(e.calendar.toJulianDay(e)+1-(n?gt[n]:(r=function(e){if(Intl.Locale){let t=gd.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&gd.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&f8[r]||0))%7;return i<0&&(i+=7),i}function gr(e){return g$(Date.now(),e)}function gi(e){return gw(gr(e))}function go(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ga(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let gs=null;function gl(){return null==gs&&(gs=new Intl.DateTimeFormat().resolvedOptions().timeZone),gs}function gc(e){return e.subtract({days:e.day-1})}function gu(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function gp(e,t,n){let r=gn(e,t,n);return e.subtract({days:r})}let gd=new Map;function gf(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function gg(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gm(e){return gh(f3((e=gx(e,new f6)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gh(e,t,n,r,i,o,a){let s=new Date;return s.setUTCHours(r,i,o,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function g_(e,t){if("UTC"===t)return 0;if(e>0&&t===gl())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:i,hour:o,minute:a,second:s}=gb(e,t);return gh(n,r,i,o,a,s,0)-1e3*Math.floor(e/1e3)}let gy=new Map;function gb(e,t){let n=gy.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gy.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)"literal"!==e.type&&(i[e.type]=e.value);return{year:"BC"===i.era||"B"===i.era?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:"24"===i.hour?0:+i.hour,minute:+i.minute,second:+i.second}}function gv(e,t,n="compatible"){var r,i,o;let a=gk(e);if("UTC"===t)return gm(a);if(t===gl()&&"compatible"===n){a=gx(a,new f6);let e=new Date,t=f3(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=gm(a),l=g_(s-864e5,t),c=g_(s+864e5,t),u=(r=a,((i=s-l)==(o=s-c)?[i]:[i,o]).filter(e=>{var n;let i;return n=r,i=gb(e,t),n.year===i.year&&n.month===i.month&&n.day===i.day&&n.hour===i.hour&&n.minute===i.minute&&n.second===i.second}));if(1===u.length)return u[0];if(u.length>1)switch(n){case"compatible":case"earlier":return u[0];case"later":return u[u.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function gA(e,t,n="compatible"){return new Date(gv(e,t,n))}function g$(e,t){let n=g_(e,t),r=new Date(e+n),i=r.getUTCFullYear();return new g0(i<1?"BC":"AD",i<1?-i+1:i,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function gw(e){return new gK(e.calendar,e.era,e.year,e.month,e.day)}function gk(e,t){let n=0,r=0,i=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:o}=t),new gX(e.calendar,e.era,e.year,e.month,e.day,n,r,i,o)}function gx(e,t){if(ge(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,gz(r),r}function gC(e,t){let n=e.copy(),r="hour"in n?gI(n,t):0;gE(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,gD(n),gS(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,gD(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gD(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var o,a;let e=null==(o=(a=n.calendar).isInverseEra)?void 0:o.call(a,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function gE(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function gD(e){for(;e.month<1;)gE(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gE(e,1)}function gS(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 gz(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gS(e)}function gB(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function gM(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),gz(n),n}function gO(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),gT(n),n}function gT(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 gP(e,t){let n=e%t;return n<0&&(n+=t),n}function gI(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gP(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gP(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gP(e.minute,60),n=Math.floor(e.hour/24),e.hour=gP(e.hour,24),n}function gN(e,t){let n=e.copy();return gI(n,t),n}function gF(e,t,n,r){let i=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=gj(o,n,0,t.length-1,null==r?void 0:r.round),i.era=t[o],gz(i);break}case"year":var o,a;(null==(o=(a=i.calendar).isInverseEra)?void 0:o.call(a,i))&&(n=-n),i.year=gj(e.year,n,-1/0,9999,null==r?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=gj(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":i.day=gj(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),gz(i),i}function gR(e,t,n,r){let i=e.copy();switch(t){case"hour":{let t=e.hour,o=0,a=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;o=12*!!e,a=e?23:11}i.hour=gj(t,n,o,a,null==r?void 0:r.round);break}case"minute":i.minute=gj(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":i.second=gj(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":i.millisecond=gj(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return i}function gj(e,t,n,r,i=!1){if(i){(e+=Math.sign(t))<n&&(e=r);let i=Math.abs(t);(e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function gL(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?gv(gC(gk(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gm(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),gx(g$(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gV(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 gG(e){let t,n=gx(e,new f6);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function gW(e){return`${gG(e)}T${gV(e)}`}function gH(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function gU(e){let t,n="object"==typeof e[0]?e.shift():new f6;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var gq=new WeakMap;class gK{copy(){return this.era?new gK(this.calendar,this.era,this.year,this.month,this.day):new gK(this.calendar,this.year,this.month,this.day)}add(e){return gC(this,e)}subtract(e){return gC(this,gB(e))}set(e){return gM(this,e)}cycle(e,t,n){return gF(this,e,t,n)}toDate(e){return gA(this,e)}toString(){return gG(this)}compare(e){return go(this,e)}constructor(...e){gH(this,gq,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,gz(this)}}var gZ=new WeakMap;class gY{copy(){return new gY(this.hour,this.minute,this.second,this.millisecond)}add(e){return gN(this,e)}subtract(e){return gN(this,gB(e))}set(e){return gO(this,e)}cycle(e,t,n){return gR(this,e,t,n)}toString(){return gV(this)}compare(e){return ga(this)-ga(e)}constructor(e=0,t=0,n=0,r=0){gH(this,gZ,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,gT(this)}}var gJ=new WeakMap;class gX{copy(){return this.era?new gX(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gX(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gC(this,e)}subtract(e){return gC(this,gB(e))}set(e){return gM(gO(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return gF(this,e,t,n);default:return gR(this,e,t,n)}}toDate(e,t){return gA(this,e,t)}toString(){return gW(this)}compare(e){let t=go(this,e);if(0===t){var n;return n=gk(e),ga(this)-ga(n)}return t}constructor(...e){gH(this,gJ,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gz(this)}}var gQ=new WeakMap;class g0{copy(){return this.era?new g0(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g0(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gL(this,e)}subtract(e){return gL(this,gB(e))}set(e,t){let n,r;return 0===(r=gO(gM(n=gk(this),e),e)).compare(n)?this:gx(g$(gv(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,i=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,i=n?23:11}let o=gk(e),a=gx(gO(o,{hour:t}),new f6),s=[gv(a,e.timeZone,"earlier"),gv(a,e.timeZone,"later")].filter(t=>g$(t,e.timeZone).day===a.day)[0],l=gx(gO(o,{hour:i}),new f6),c=[gv(l,e.timeZone,"earlier"),gv(l,e.timeZone,"later")].filter(t=>g$(t,e.timeZone).day===l.day).pop(),u=gm(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return gx(g$(u=36e5*gj(p,n,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gR(e,t,n,r);case"era":case"year":case"month":case"day":return gx(g$(gv(gF(gk(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){return new Date(gm(this)-this.offset)}toString(){var e;let t,n,r;return`${gW(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t,n){if(e instanceof g0){var r,i;return e.timeZone===t?e:(r=e,i=t,gx(g$(gm(r)-r.offset,i),r.calendar))}return g$(gv(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){gH(this,gQ,{writable:!0,value:void 0});let[t,n,r,i,o]=gU(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=o,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gz(this)}}class g1 extends f6{fromJulianDay(e){let t=super.fromJulianDay(e);return new gK(this,f3(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(g2(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(g2(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function g2(e){let[t,n]=f4(e.year+-543);return new gK(t,n,e.month,e.day)}function g3(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function g4(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-g3(e,n,1,1))/30),i=t+1-g3(e,n,r,1);return[n,r,i]}function g5(e){return Math.floor(e%4/3)}function g6(e,t){return t%13!=0?30:g5(e)+5}class g8{fromJulianDay(e){let[t,n,r]=g4(1723856,e),i="AM";return t<=0&&(i="AA",t+=5500),new gK(this,i,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),g3(1723856,t,e.month,e.day)}getDaysInMonth(e){return g6(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+g5(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class g7 extends g8{fromJulianDay(e){let[t,n,r]=g4(1723856,e);return new gK(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class g9 extends g8{fromJulianDay(e){let[t,n,r]=g4(1824665,e),i="CE";return t<=0&&(i="BCE",t=1-t),new gK(this,i,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),g3(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),g6(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let me=765433;function mt(e){return 7>f0(7*e+1,19)}function mn(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>f0(3*(n+1),7)&&(n+=1),n}function mr(e){let t,n;return mn(e)+(t=mn(e-1),n=mn(e),mn(e+1)-n==356?2:+(n-t==382))}function mi(e){return mr(e+1)-mr(e)}function mo(e,t){if(t>=6&&!mt(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=mi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!mt(e):30}class ma{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/me*19+234)/235)+1,r=mr(n),i=Math.floor(t-r);for(;i<1;)i=Math.floor(t-(r=mr(--n)));let o=1,a=0;for(;a<i;)a+=mo(n,o),o++;let s=i-(a-=mo(n,--o));return new gK(this,n,o,s)}toJulianDay(e){let t=mr(e.year);for(let n=1;n<e.month;n++)t+=mo(e.year,n);return t+e.day+347997}getDaysInMonth(e){return mo(e.year,e.month)}getMonthsInYear(e){return mt(e.year)?13:12}getDaysInYear(e){return mi(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(mt(t.year)&&!mt(e.year)&&t.month>6?e.month--:!mt(t.year)&&mt(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class ms extends f6{fromJulianDay(e){let t,n,r,i=super.fromJulianDay(e),o=i.year-78,a=e-f1(i.era,i.year,1,1);if(a<80?(o--,a+=(t=f2(i.year-1)?31:30)+155+90+10):(t=f2(i.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new gK(this,o,n,r)}toJulianDay(e){let t,n,[r,i]=f4(e.year+78);return(f2(i)?(t=31,n=f1(r,i,3,21)):(t=30,n=f1(r,i,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&f2(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 ml(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function mc(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+ml(t,r,1,1)))/29.5)+1),o=n-ml(t,r,i,1)+1;return new gK(e,r,i,o)}function mu(e){return(14+11*e)%30<11}class mp{fromJulianDay(e){return mc(this,1948440,e)}toJulianDay(e){return ml(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&mu(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return mu(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class md extends mp{fromJulianDay(e){return mc(this,1948439,e)}toJulianDay(e){return ml(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function mf(e){return 460322+l[e-1300]}function mg(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function mm(e,t){let n=mf(e);for(let r=1;r<t;r++)n+=mg(e,r);return n}function mh(e){return l[e+1-1300]-l[e-1300]}class m_ extends mp{fromJulianDay(e){let t=e-1948440,n=mf(1300),r=mf(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-mf(++e)+1;let i=mh(e);if(r===i){n=12;break}if(r<i){let t=mg(e,n);for(n=1;r>t;)r-=t,t=mg(e,++n);break}}return new gK(this,e,n,t-mm(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+mm(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):mg(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):mh(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 t=1300;t<=1600;t++){l[t-1300]=e;for(let n=1;n<=12;n++)e+=mg(t,n)}}}}let my=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],mb=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],mv=[1867,1911,1925,1988,2018],mA=["meiji","taisho","showa","heisei","reiwa"];function m$(e){let t=my.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?my.length-1:0===t?0:t-1}function mw(e){let t=mv[mA.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gK(e.year+t,e.month,e.day)}class mk extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),n=m$(t);return new gK(this,mA[n],t.year-mv[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(mw(e))}balanceDate(e){let t=mw(e),n=m$(t);mA[n]!==e.era&&(e.era=mA[n],e.year=t.year-mv[n]),this.constrainDate(e)}constrainDate(e){let t=mA.indexOf(e.era),n=mb[t];if(null!=n){let[r,i,o]=n,a=r-mv[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=my[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return mA}getYearsInEra(e){let t=mA.indexOf(e.era),n=my[t],r=my[t+1];if(null==r)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(mw(e))}getMinimumMonthInYear(e){let t=mx(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=mx(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function mx(e){if(1===e.year)return my[mA.indexOf(e.era)]}let mC=[0,31,62,93,124,155,186,216,246,276,306,336];class mE{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),i=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-mC[i]+1;return new gK(this,n,i+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=mC[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>f0(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function mD(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function mS(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class mz extends f6{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=mS(f3(t.era,t.year));return new gK(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(mB(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=mS(mD(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(mB(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function mB(e){let[t,n]=f4(mD(e));return new gK(t,n,e.month,e.day)}function mM(e){switch(e){case"buddhist":return new g1;case"ethiopic":return new g8;case"ethioaa":return new g7;case"coptic":return new g9;case"hebrew":return new ma;case"indian":return new ms;case"islamic-civil":return new mp;case"islamic-tbla":return new md;case"islamic-umalqura":return new m_;case"japanese":return new mk;case"persian":return new mE;case"roc":return new mz;default:return new f6}}let mO=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function mP(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return mO.has(t.script)}let t=e.split("-")[0];return mT.has(t)}let mI={prefix:String(Math.round(1e10*Math.random())),current:0},mN=pk.createContext(mI),mF=pk.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let mR=new WeakMap,mj="function"==typeof pk.useId?function(e){let t=pk.useId(),[n]=(0,pk.useState)(mW()),r=n?"react-aria":`react-aria${mI.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,pk.useContext)(mN),n=function(e=!1){let t=(0,pk.useContext)(mN),n=(0,pk.useRef)(null);if(null===n.current&&!e){var r,i;let e=null==(i=pk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=i.ReactCurrentOwner)?void 0:r.current;if(e){let n=mR.get(e);null==n?mR.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,mR.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function mL(){return!1}function mV(){return!0}function mG(e){return()=>{}}function mW(){return"function"==typeof pk.useSyncExternalStore?pk.useSyncExternalStore(mG,mL,mV):(0,pk.useContext)(mF)}let mH=Symbol.for("react-aria.i18n.locale");function mU(){let e="undefined"!=typeof window&&window[mH]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:mP(e)?"rtl":"ltr"}}let mq=mU(),mK=new Set;function mZ(){for(let e of(mq=mU(),mK))e(mq)}function mY(){let e=mW(),[t,n]=(0,pk.useState)(mq);return((0,pk.useEffect)(()=>(0===mK.size&&window.addEventListener("languagechange",mZ),mK.add(n),()=>{mK.delete(n),0===mK.size&&window.removeEventListener("languagechange",mZ)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let mJ=pk.createContext(null);function mX(e){let{locale:t,children:n}=e,r=mY(),i=pk.useMemo(()=>t?{locale:t,direction:mP(t)?"rtl":"ltr"}:r,[r,t]);return pk.createElement(mJ.Provider,{value:i},n)}function mQ(){let e=mY();return(0,pk.useContext)(mJ)||e}function m0(e){let t=(0,pk.useRef)(null),n=(0,pk.useRef)(void 0),r=(0,pk.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,pk.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function m1(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function m2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let m3="undefined"!=typeof document?pk.useLayoutEffect:()=>{};function m4(e){let t=(0,pk.useRef)(null);return m3(()=>{t.current=e},[e]),(0,pk.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let m5=!!("undefined"!=typeof window&&window.document&&window.document.createElement),m6=new Map;function m8(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(null),i=mj(t),o=(0,pk.useRef)(null);if(c&&c.register(o,i),m5){let e=m6.get(i);e&&!e.includes(r)?e.push(r):m6.set(i,[r])}return m3(()=>()=>{c&&c.unregister(o),m6.delete(i)},[i]),(0,pk.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function m7(e=[]){let t=m8(),[n,r]=function(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(null),i=m4(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?i():n(e.value)});m3(()=>{r.current&&i()});let o=m4(e=>{r.current=e(t),i()});return[t,o]}(t),i=(0,pk.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return m3(i,[t,i,...e]),n}"undefined"!=typeof FinalizationRegistry&&(c=new FinalizationRegistry(e=>{m6.delete(e)}));let m9=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(r&&(r+=" "),r+=t);return r};function he(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];"function"==typeof n&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=m2(n,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof i?t[e]=m9(n,i):"id"===e&&n&&i?t.id=function(e,t){if(e===t)return e;let n=m6.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=m6.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,i):t[e]=void 0!==i?i:n}}return t}let ht=Symbol("default");function hn({values:e,children:t}){for(let[n,r]of e)t=pk.createElement(n.Provider,{value:r},t);return t}function hr(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=e;return(0,pk.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...s,defaultClassName:i}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,c="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:i,style:l||a?{...a,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[t,n,r,i,o,a,s])}function hi(e,t){let n=(0,pk.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||ht;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function ho(e,t,n){let{ref:r,...i}=hi(n,e.slot)||{},o=m0((0,pk.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=m1(e,t);return n||(n="function"==typeof r),r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():m1(e[n],null)})}}})(t,r),[t,r])),a=he(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&("function"==typeof i.style||"function"==typeof e.style?a.style=t=>{let n="function"==typeof i.style?i.style(t):i.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:a.style={...i.style,...e.style}),[a,o]}function ha(e=!0){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(!1),i=(0,pk.useCallback)(e=>{r.current=!0,n(!!e)},[]);return m3(()=>{r.current||n(!1)},[]),[i,t]}function hs(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let hl=(0,pk.createContext)(null),hc=null;function hu(e,t="assertive",n=7e3){hc?hc.announce(e,t,n):(hc=new hp,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?hc.announce(e,t,n):setTimeout(()=>{(null==hc?void 0:hc.isAttached())&&(null==hc||hc.announce(e,t,n))},100))}class hp{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,i;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"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(i=this.politeLog)||i.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"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 hd=new Set(["id"]),hf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),hg=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),hm=/^(data-.*)$/;function hh(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(hd.has(t)||n&&hf.has(t)||r&&hg.has(t)||(null==i?void 0:i.has(t))||hm.test(t))&&(o[t]=e[t]);return o}let h_=["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"])'],hy=h_.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";h_.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let hb=h_.join(':not([hidden]):not([tabindex="-1"]),');function hv(e){return e.matches(hy)}function hA(e){return e.matches(hb)}let h$=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},hw=e=>e&&"window"in e&&e.window===e?e:h$(e).defaultView||window;function hk(e){if(function(){if(null==hx){hx=!1;try{document.createElement("div").focus({get preventScroll(){return hx=!0,!0}})}catch{}}return hx}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let hx=null;function hC(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function hE(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function hD(e){let t=(0,pk.useRef)({isFocused:!1,observer:null});m3(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=m4(t=>{null==e||e(t)});return(0,pk.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(hC(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let hS=!1;function hz(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function hB(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function hM(e){let t=null;return()=>(null==t&&(t=e()),t)}let hO=hM(function(){return hB(/^Mac/i)}),hT=hM(function(){return hB(/^iPhone/i)}),hP=hM(function(){return hB(/^iPad/i)||hO()&&navigator.maxTouchPoints>1}),hI=hM(function(){return hT()||hP()});hM(function(){return hO()||hI()});let hN=hM(function(){return hz(/AppleWebKit/i)&&!hF()}),hF=hM(function(){return hz(/Chrome/i)}),hR=hM(function(){return hz(/Android/i)}),hj=hM(function(){return hz(/Firefox/i)}),hL=new Map,hV=new Set;function hG(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=hL.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),hL.delete(n.target)),0===hL.size)){for(let e of hV)e();hV.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=hL.get(n.target);r||(r=new Set,hL.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function hW(e){requestAnimationFrame(()=>{for(let[e]of hL)"isConnected"in e&&!e.isConnected&&hL.delete(e);0===hL.size?e():hV.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?hG():document.addEventListener("DOMContentLoaded",hG));let hH="default",hU="",hq=new WeakMap;function hK(e){if(hI())"disabled"===hH&&(hH="restoring",setTimeout(()=>{hW(()=>{if("restoring"===hH){let t=h$(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hU||""),hU="",hH="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hq.has(e)){let t=hq.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hq.delete(e)}}let hZ=pk.createContext({register:()=>{}});function hY(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function hJ(e,t,n){var r=hY(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function hX(e,t){m3(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hQ(){let e=(0,pk.useRef)(new Map),t=(0,pk.useCallback)((t,n,r,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:i}),t.addEventListener(n,o,i)},[]),n=(0,pk.useCallback)((t,n,r,i)=>{var o;let a=(null==(o=e.current.get(r))?void 0:o.fn)||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,pk.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,pk.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}hZ.displayName="PressResponderContext";function h0(e,t){return!!t&&!!e&&e.contains(t)}function h1(e){return e.target}function h2(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=t;hj()&&(null==(i=window.event)||null==(r=i.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(hO()?o=!0:a=!0);let c=hN()&&hO()&&!hP()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});h2.isOpening=n,hk(e),e.dispatchEvent(c),h2.isOpening=!1}function h3(e){return 0===e.mozInputSource&&!!e.isTrusted||(hR()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}h2.isOpening=!1;var h4=n(28316),h5=new WeakMap;class h6{continuePropagation(){hJ(this,h5,!1)}get shouldStopPropagation(){var e;return e=hY(this,h5,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var i;gH(this,h5,{writable:!0,value:void 0}),hJ(this,h5,!0);let o=null!=(i=null==r?void 0:r.target)?i:n.currentTarget,a=null==o?void 0:o.getBoundingClientRect(),s,l=0,c,u=null;null!=n.clientX&&null!=n.clientY&&(c=n.clientX,u=n.clientY),a&&(null!=c&&null!=u?(s=c-a.left,l=u-a.top):(s=a.width/2,l=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l}}let h8=Symbol("linkClicked"),h7="react-aria-pressable-style",h9="data-react-aria-pressable";function _e(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,pk.useContext)(hZ);if(t){let{register:n,...r}=t;e=he(r,e),n()}return hX(t,e.ref),e}(e),[g,m]=(0,pk.useState)(!1),h=(0,pk.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=hQ(),v=m4((e,t)=>{let i=h.current;if(s||i.didFirePressStart)return!1;let o=!0;if(i.isTriggeringEvent=!0,r){let n=new h6("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,m(!0),o}),A=m4((e,r,o=!0)=>{let a=h.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(i){let t=new h6("pressend",r,e);i(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&o&&!s){let n=new h6("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),$=m4((e,t)=>{let n=h.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new h6("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=m4(e=>{let t=h.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(_r(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),p||hK(t.target),t.disposables))n();t.disposables=[]}}),k=m4(e=>{u&&w(e)}),x=m4(e=>{null==a||a(e)}),C=m4((e,t)=>{if(a){let n=new MouseEvent("click",e);hE(n,t),a(hC(n))}}),E=(0,pk.useMemo)(()=>{let e=h.current,t={onKeyDown(t){if(_n(t.nativeEvent,t.currentTarget)&&h0(t.currentTarget,h1(t.nativeEvent))){var r;_i(h1(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",i=v(t,"keyboard");let r=t.currentTarget;y(h$(t.currentTarget),"keyup",m2(t=>{_n(t,r)&&!t.repeat&&h0(r,h1(t))&&e.target&&$(_r(e.target,t),"keyboard")},n),!0)}i&&t.stopPropagation(),t.metaKey&&hO()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||h0(t.currentTarget,h1(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!h2.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||h3(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),i=A(t,"virtual");x(t),n=e&&r&&i}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",i=$(_r(t.currentTarget,t),r),o=A(_r(t.currentTarget,t),r,!0);n=i&&o,e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,i;if(e.isPressed&&e.target&&_n(t,e.target)){_i(h1(t),t.key)&&t.preventDefault();let n=h1(t),i=h0(e.target,h1(t));A(_r(e.target,t),"keyboard",i),i&&C(t,e.target),b(),"Enter"!==t.key&&_t(e.target)&&h0(e.target,n)&&!t[h8]&&(t[h8]=!0,h2(e.target,t,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(t.key)}else if("Meta"===t.key&&(null==(n=e.metaKeyEvents)?void 0:n.size)){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))null==(i=e.target)||i.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{var i;if(0!==t.button||!h0(t.currentTarget,h1(t.nativeEvent)))return;if(i=t.nativeEvent,!hR()&&0===i.width&&0===i.height||1===i.width&&1===i.height&&0===i.pressure&&0===i.detail&&"mouse"===i.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,p||function(e){if(hI()){if("default"===hH){let t=h$(e);hU=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hH="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hq.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=v(t,e.pointerType);let i=h1(t.nativeEvent);"releasePointerCapture"in i&&i.releasePointerCapture(t.pointerId),y(h$(t.currentTarget),"pointerup",n,!1),y(h$(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(h0(t.currentTarget,h1(t.nativeEvent))&&0===t.button){if(c){let n=function(e){for(;e&&!hv(e);)e=e.parentElement;let t=hw(e),n=t.document.activeElement;if(!n||n===e)return;hS=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},o=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,hk(n),l()))},a=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,hk(n),l()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),hS=!1,r=!1},c=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{h0(t.currentTarget,h1(t.nativeEvent))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||$(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(_r(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(_r(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(h0(e.target,h1(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(hk(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(t);e.isOverTarget=!1}},r=e=>{w(e)};t.onDragStart=e=>{h0(e.currentTarget,h1(e.nativeEvent))&&w(e)}}return t},[y,s,c,b,p,w,k,A,v,$,x,C]);return(0,pk.useEffect)(()=>{if(!d)return;let e=h$(d.current);if(!e||!e.head||e.getElementById(h7))return;let t=e.createElement("style");t.id=h7,t.textContent=`
33
33
  @layer {
34
34
  [${h9}] {
35
35
  touch-action: pan-x pan-y pinch-zoom;