@openmrs/esm-patient-search-app 9.2.1-pre.7501 → 9.2.1-pre.7510
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/7272.js +1 -1
- package/dist/7272.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-patient-search-app.js +1 -1
- package/dist/openmrs-esm-patient-search-app.js.buildmanifest.json +5 -5
- package/dist/routes.json +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
|
|
2
2
|
│ Assets:
|
|
3
|
-
│ 7272.js (2.
|
|
3
|
+
│ 7272.js (2.137 MiB)
|
|
4
4
|
|
|
5
|
-
Rspack compiled with 1 warning in
|
|
5
|
+
Rspack compiled with 1 warning in 33.64 s
|
package/dist/7272.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 h7(){h6.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of h6){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}`,a=t.containerDomId??"omrs-apps-container",o=document.getElementById(a),i=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=i,o?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${a}"; 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?rT(e,()=>h2(t.appName,t.component),function(e,{online:t,offline:n,featureFlag:r}){return window.offlineEnabled?a=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&n)&&(!r||!!uw(r))&&e(a):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?rR(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 h9(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let me=h9();function mt(e,t){if(me){if("string"==typeof t)if(t.startsWith("http"))return ma(e,t);else try{let n=JSON.parse(t);if(mo(n))return ma(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 ma(e,t.toString());else if(mo(t))return ma(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 mn(e){me&&localStorage.removeItem(h0+e)}function mr(){if(!me)return;let e=window.localStorage;for(let t=0;t<e.length;t++){let n=e.key(t);n?.startsWith(h0)&&e.removeItem(n)}}function ma(e,t){localStorage.setItem(h0+e,JSON.stringify(t))}function mo(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 mi(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&mo(t))}var ms={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 mc(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<ms.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>ms.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>ms.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<ms.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<ms.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<ms.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>ms.SMALL_DESKTOP_MAX)}var ml=!1;function mu(){ml||(window.addEventListener("resize",mc),mc(),ml=!0)}var mp=n(16709),md=n.n(mp),mf=n(46062),mh=n.n(mf),mm=n(44036),mg=n.n(mm),m_=n(96793),my=n.n(m_),mb=n(17892),mv=n.n(mb),mA=n(11173),m$=n.n(mA),mw=n(42464),mk=n.n(mw),mx=n(6370),mC={};mC.styleTagTransform=mk(),mC.setAttributes=mv(),mC.insert=my().bind(null,"head"),mC.domAPI=mg(),mC.insertStyleElement=m$(),mh()(mx.Z,mC);let mE=mx.Z&&mx.Z.locals?mx.Z.locals:void 0;function mD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mS(e){var t,n=e.title,r=e.children,a="tablet"===hM();return f_().createElement("div",{className:md()((mD(t={},mE.tabletHeader,a),mD(t,mE.desktopHeader,!a),t))},f_().createElement("h4",null,n),r)}var mz=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],mB={primaryColor:{_type:tk.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nf.oneOf(mz)]},secondaryColor:{_type:tk.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nf.oneOf(mz)]}},mM={"Brand color #1":{_default:"#005d5d",_type:tk.String},"Brand color #2":{_default:"#004144",_type:tk.String},"Brand color #3":{_default:"#007d79",_type:tk.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tk.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tk.UUID}}},implementationName:{_type:tk.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tk.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:tk.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:[nf.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:tk.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:tk.String}},diagnosisTags:mB},mO=n(72530),mT={};mT.styleTagTransform=mk(),mT.setAttributes=mv(),mT.insert=my().bind(null,"head"),mT.domAPI=mg(),mT.insertStyleElement=m$(),mh()(mO.Z,mT);let mP=mO.Z&&mO.Z.locals?mO.Z.locals:void 0;function mI(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 mN(e){var t,n,r,a=e.menuTitle,o=e.children,i=(t=f_().useState(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),o.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw r}}return o}}(t,2)||function(e,t){if(e){if("string"==typeof e)return mI(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 mI(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=i[0],c=i[1],l=hN(function(){return c(!1)},s),u="tablet"===hM(),p=(0,fg.useCallback)(function(){return c(function(e){return!e})},[]);return f_().createElement("div",{"data-overflow-menu":!0,className:md()("cds--overflow-menu",mP.container),ref:l},f_().createElement("button",{className:md()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},mP.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:p},a),f_().createElement("div",{className:md()("cds--overflow-menu-options","cds--overflow-menu--flip",mP.menu,(n={},r=mP.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"},f_().createElement("ul",{className:md()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),f_().createElement("span",null)))}var mF=n(62836),mj=n(20708),mR=n(23148),mL={};mL.styleTagTransform=mk(),mL.setAttributes=mv(),mL.insert=my().bind(null,"head"),mL.domAPI=mg(),mL.insertStyleElement=m$(),mh()(mR.Z,mL);let mV=mR.Z&&mR.Z.locals?mR.Z.locals:void 0;var mW=function(e){var t=e.path,n=e.title,r=e.basePath,a=e.icon,o=(0,fX.useTranslation)().t,i=(0,mF.useLocation)(),s=(0,fg.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)}),a=(null!=(e=i.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,a)},[i.pathname,t]);return f_().createElement("div",{key:t},f_().createElement(mj.ConfigurableLink,{className:md()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(t))},f_().createElement("span",{className:mV.menu},f_().createElement(mj.MaybeIcon,{icon:a,className:mV.icon,size:16}),f_().createElement("span",null,o(n)))))};function mG(e){return function(t){var n=t.basePath;return f_().createElement(mF.BrowserRouter,null,f_().createElement(mW,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 mH(e,t){return e-t*Math.floor(e/t)}function mU(e,t,n,r){let a=(t=mK(e,t))-1,o=-2;return n<=2?o=0:mq(t)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*n-362)/12+o+r)}function mq(e){return e%4==0&&(e%100!=0||e%400==0)}function mK(e,t){return"BC"===e?1-t:t}function mY(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let mZ={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 mJ{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=mH(t,146097),a=Math.floor(r/36524),o=mH(r,36524),i=Math.floor(o/1461),s=Math.floor(mH(o,1461)/365),[c,l]=mY(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),u=e-mU(c,l,1,1),p=2;e<mU(c,l,3,1)?p=0:mq(l)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-mU(c,l,d,1)+1;return new gj(c,l,d,f)}toJulianDay(e){return mU(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return mZ[mq(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return mq(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 mX={"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 mQ(e,t){return t=gg(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function m0(e,t){return m1(e.calendar,t.calendar)&&mQ(e,t)}function m1(e,t){var n,r,a,o;return null!=(o=null!=(a=null==(n=e.isEqual)?void 0:n.call(e,t))?a:null==(r=t.isEqual)?void 0:r.call(t,e))?o:e.identifier===t.identifier}let m2={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function m3(e,t,n){let r,a=Math.ceil(e.calendar.toJulianDay(e)+1-(n?m2[n]:(r=function(e){if(Intl.Locale){let t=gr.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&gr.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&mX[r]||0))%7;return a<0&&(a+=7),a}function m4(e){return gf(Date.now(),e)}function m5(e){return gh(m4(e))}function m6(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function m8(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let m7=null;function m9(){return null==m7&&(m7=new Intl.DateTimeFormat().resolvedOptions().timeZone),m7}function ge(e){return e.subtract({days:e.day-1})}function gt(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function gn(e,t,n){let r=m3(e,t,n);return e.subtract({days:r})}let gr=new Map;function ga(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function go(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gi(e){return gs(mK((e=gg(e,new mJ)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gs(e,t,n,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,t-1,n),s.getTime()}function gc(e,t){if("UTC"===t)return 0;if(e>0&&t===m9())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=gu(e,t);return gs(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let gl=new Map;function gu(e,t){let n=gl.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"}),gl.set(t,n));let r=n.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function gp(e,t,n="compatible"){var r,a,o;let i=gm(e);if("UTC"===t)return gi(i);if(t===m9()&&"compatible"===n){i=gg(i,new mJ);let e=new Date,t=mK(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=gi(i),c=gc(s-864e5,t),l=gc(s+864e5,t),u=(r=i,((a=s-c)==(o=s-l)?[a]:[a,o]).filter(e=>{var n;let a;return n=r,a=gu(e,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.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-c,s-l);case"compatible":case"later":return Math.max(s-c,s-l);case"reject":throw RangeError("No such absolute time found")}}function gd(e,t,n="compatible"){return new Date(gp(e,t,n))}function gf(e,t){let n=gc(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new gH(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function gh(e){return new gj(e.calendar,e.era,e.year,e.month,e.day)}function gm(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new gW(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function gg(e,t){if(m1(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,gA(r),r}function g_(e,t){let n=e.copy(),r="hour"in n?gE(n,t):0;gy(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,gb(n),gv(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,gb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gb(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let a=n.calendar.getYearsInEra(n);if(n.year>a){var o,i;let e=null==(o=(i=n.calendar).isInverseEra)?void 0:o.call(i,n);n.year=a,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 gy(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function gb(e){for(;e.month<1;)gy(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gy(e,1)}function gv(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 gA(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gv(e)}function g$(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function gw(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),gA(n),n}function gk(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),gx(n),n}function gx(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 gC(e,t){let n=e%t;return n<0&&(n+=t),n}function gE(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=gC(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gC(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gC(e.minute,60),n=Math.floor(e.hour/24),e.hour=gC(e.hour,24),n}function gD(e,t){let n=e.copy();return gE(n,t),n}function gS(e,t,n,r){let a=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=gB(o,n,0,t.length-1,null==r?void 0:r.round),a.era=t[o],gA(a);break}case"year":var o,i;(null==(o=(i=a.calendar).isInverseEra)?void 0:o.call(i,a))&&(n=-n),a.year=gB(e.year,n,-1/0,9999,null==r?void 0:r.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=gB(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":a.day=gB(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(a),gA(a),a}function gz(e,t,n,r){let a=e.copy();switch(t){case"hour":{let t=e.hour,o=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;o=12*!!e,i=e?23:11}a.hour=gB(t,n,o,i,null==r?void 0:r.round);break}case"minute":a.minute=gB(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":a.second=gB(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":a.millisecond=gB(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return a}function gB(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function gM(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?gp(g_(gm(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gi(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),gg(gf(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gO(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 gT(e){let t,n=gg(e,new mJ);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 gP(e){return`${gT(e)}T${gO(e)}`}function gI(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function gN(e){let t,n="object"==typeof e[0]?e.shift():new mJ;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 gF=new WeakMap;class gj{copy(){return this.era?new gj(this.calendar,this.era,this.year,this.month,this.day):new gj(this.calendar,this.year,this.month,this.day)}add(e){return g_(this,e)}subtract(e){return g_(this,g$(e))}set(e){return gw(this,e)}cycle(e,t,n){return gS(this,e,t,n)}toDate(e){return gd(this,e)}toString(){return gT(this)}compare(e){return m6(this,e)}constructor(...e){gI(this,gF,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,gA(this)}}var gR=new WeakMap;class gL{copy(){return new gL(this.hour,this.minute,this.second,this.millisecond)}add(e){return gD(this,e)}subtract(e){return gD(this,g$(e))}set(e){return gk(this,e)}cycle(e,t,n){return gz(this,e,t,n)}toString(){return gO(this)}compare(e){return m8(this)-m8(e)}constructor(e=0,t=0,n=0,r=0){gI(this,gR,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,gx(this)}}var gV=new WeakMap;class gW{copy(){return this.era?new gW(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gW(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return g_(this,e)}subtract(e){return g_(this,g$(e))}set(e){return gw(gk(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return gS(this,e,t,n);default:return gz(this,e,t,n)}}toDate(e,t){return gd(this,e,t)}toString(){return gP(this)}compare(e){let t=m6(this,e);if(0===t){var n;return n=gm(e),m8(this)-m8(n)}return t}constructor(...e){gI(this,gV,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gA(this)}}var gG=new WeakMap;class gH{copy(){return this.era?new gH(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new gH(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gM(this,e)}subtract(e){return gM(this,g$(e))}set(e,t){let n,r;return 0===(r=gk(gw(n=gm(this),e),e)).compare(n)?this:gg(gf(gp(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,a=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,a=n?23:11}let o=gm(e),i=gg(gk(o,{hour:t}),new mJ),s=[gp(i,e.timeZone,"earlier"),gp(i,e.timeZone,"later")].filter(t=>gf(t,e.timeZone).day===i.day)[0],c=gg(gk(o,{hour:a}),new mJ),l=[gp(c,e.timeZone,"earlier"),gp(c,e.timeZone,"later")].filter(t=>gf(t,e.timeZone).day===c.day).pop(),u=gi(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return gg(gf(u=36e5*gB(p,n,Math.floor(s/36e5),Math.floor(l/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gz(e,t,n,r);case"era":case"year":case"month":case"day":return gg(gf(gp(gS(gm(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){return new Date(gi(this)-this.offset)}toString(){var e;let t,n,r;return`${gP(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 gH){var r,a;return e.timeZone===t?e:(r=e,a=t,gg(gf(gi(r)-r.offset,a),r.calendar))}return gf(gp(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){gI(this,gG,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gA(this)}}class gU extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e);return new gj(this,mK(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gq(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(gq(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function gq(e){let[t,n]=mY(e.year+-543);return new gj(t,n,e.month,e.day)}function gK(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function gY(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-gK(e,n,1,1))/30),a=t+1-gK(e,n,r,1);return[n,r,a]}function gZ(e){return Math.floor(e%4/3)}function gJ(e,t){return t%13!=0?30:gZ(e)+5}class gX{fromJulianDay(e){let[t,n,r]=gY(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new gj(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),gK(1723856,t,e.month,e.day)}getDaysInMonth(e){return gJ(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+gZ(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class gQ extends gX{fromJulianDay(e){let[t,n,r]=gY(1723856,e);return new gj(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class g0 extends gX{fromJulianDay(e){let[t,n,r]=gY(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new gj(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gK(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gJ(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 g1=765433;function g2(e){return 7>mH(7*e+1,19)}function g3(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>mH(3*(n+1),7)&&(n+=1),n}function g4(e){let t,n;return g3(e)+(t=g3(e-1),n=g3(e),g3(e+1)-n==356?2:+(n-t==382))}function g5(e){return g4(e+1)-g4(e)}function g6(e,t){if(t>=6&&!g2(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=g5(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*!!g2(e):30}class g8{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/g1*19+234)/235)+1,r=g4(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=g4(--n)));let o=1,i=0;for(;i<a;)i+=g6(n,o),o++;let s=a-(i-=g6(n,--o));return new gj(this,n,o,s)}toJulianDay(e){let t=g4(e.year);for(let n=1;n<e.month;n++)t+=g6(e.year,n);return t+e.day+347997}getDaysInMonth(e){return g6(e.year,e.month)}getMonthsInYear(e){return g2(e.year)?13:12}getDaysInYear(e){return g5(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(g2(t.year)&&!g2(e.year)&&t.month>6?e.month--:!g2(t.year)&&g2(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class g7 extends mJ{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-mU(a.era,a.year,1,1);if(i<80?(o--,i+=(t=mq(a.year-1)?31:30)+155+90+10):(t=mq(a.year)?31:30,i-=80),i<t)n=1,r=i+1;else{let e=i-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 gj(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=mY(e.year+78);return(mq(a)?(t=31,n=mU(r,a,3,21)):(t=30,n=mU(r,a,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&&mq(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 g9(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function _e(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+g9(t,r,1,1)))/29.5)+1),o=n-g9(t,r,a,1)+1;return new gj(e,r,a,o)}function _t(e){return(14+11*e)%30<11}class _n{fromJulianDay(e){return _e(this,1948440,e)}toJulianDay(e){return g9(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&_t(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return _t(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class _r extends _n{fromJulianDay(e){return _e(this,1948439,e)}toJulianDay(e){return g9(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function _a(e){return 460322+c[e-1300]}function _o(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function _i(e,t){let n=_a(e);for(let r=1;r<t;r++)n+=_o(e,r);return n}function _s(e){return c[e+1-1300]-c[e-1300]}class _c extends _n{fromJulianDay(e){let t=e-1948440,n=_a(1300),r=_a(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-_a(++e)+1;let a=_s(e);if(r===a){n=12;break}if(r<a){let t=_o(e,n);for(n=1;r>t;)r-=t,t=_o(e,++n);break}}return new gj(this,e,n,t-_i(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+_i(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):_o(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):_s(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=_o(t,n)}}}}let _l=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],_u=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_p=[1867,1911,1925,1988,2018],_d=["meiji","taisho","showa","heisei","reiwa"];function _f(e){let t=_l.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?_l.length-1:0===t?0:t-1}function _h(e){let t=_p[_d.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gj(e.year+t,e.month,e.day)}class _m extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e),n=_f(t);return new gj(this,_d[n],t.year-_p[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(_h(e))}balanceDate(e){let t=_h(e),n=_f(t);_d[n]!==e.era&&(e.era=_d[n],e.year=t.year-_p[n]),this.constrainDate(e)}constrainDate(e){let t=_d.indexOf(e.era),n=_u[t];if(null!=n){let[r,a,o]=n,i=r-_p[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=_l[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return _d}getYearsInEra(e){let t=_d.indexOf(e.era),n=_l[t],r=_l[t+1];if(null==r)return 9999-n[0]+1;let a=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(_h(e))}getMinimumMonthInYear(e){let t=_g(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=_g(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function _g(e){if(1===e.year)return _l[_d.indexOf(e.era)]}let __=[0,31,62,93,124,155,186,216,246,276,306,336];class _y{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)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-__[a]+1;return new gj(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=__[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>mH(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function _b(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function _v(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class _A extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=_v(mK(t.era,t.year));return new gj(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(_$(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=_v(_b(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(_$(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function _$(e){let[t,n]=mY(_b(e));return new gj(t,n,e.month,e.day)}function _w(e){switch(e){case"buddhist":return new gU;case"ethiopic":return new gX;case"ethioaa":return new gQ;case"coptic":return new g0;case"hebrew":return new g8;case"indian":return new g7;case"islamic-civil":return new _n;case"islamic-tbla":return new _r;case"islamic-umalqura":return new _c;case"japanese":return new _m;case"persian":return new _y;case"roc":return new _A;default:return new mJ}}let _k=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),_x=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function _C(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 _k.has(t.script)}let t=e.split("-")[0];return _x.has(t)}let _E={prefix:String(Math.round(1e10*Math.random())),current:0},_D=fg.createContext(_E),_S=fg.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let _z=new WeakMap,_B="function"==typeof fg.useId?function(e){let t=fg.useId(),[n]=(0,fg.useState)(_P()),r=n?"react-aria":`react-aria${_E.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,fg.useContext)(_D),n=function(e=!1){let t=(0,fg.useContext)(_D),n=(0,fg.useRef)(null);if(null===n.current&&!e){var r,a;let e=null==(a=fg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=a.ReactCurrentOwner)?void 0:r.current;if(e){let n=_z.get(e);null==n?_z.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,_z.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function _M(){return!1}function _O(){return!0}function _T(e){return()=>{}}function _P(){return"function"==typeof fg.useSyncExternalStore?fg.useSyncExternalStore(_T,_M,_O):(0,fg.useContext)(_S)}let _I=Symbol.for("react-aria.i18n.locale");function _N(){let e="undefined"!=typeof window&&window[_I]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:_C(e)?"rtl":"ltr"}}let _F=_N(),_j=new Set;function _R(){for(let e of(_F=_N(),_j))e(_F)}function _L(){let e=_P(),[t,n]=(0,fg.useState)(_F);return((0,fg.useEffect)(()=>(0===_j.size&&window.addEventListener("languagechange",_R),_j.add(n),()=>{_j.delete(n),0===_j.size&&window.removeEventListener("languagechange",_R)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let _V=fg.createContext(null);function _W(e){let{locale:t,children:n}=e,r=_L(),a=fg.useMemo(()=>t?{locale:t,direction:_C(t)?"rtl":"ltr"}:r,[r,t]);return fg.createElement(_V.Provider,{value:a},n)}function _G(){let e=_L();return(0,fg.useContext)(_V)||e}function _H(e){let t=(0,fg.useRef)(null),n=(0,fg.useRef)(void 0),r=(0,fg.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,fg.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 _U(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _q(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let _K="undefined"!=typeof document?fg.useLayoutEffect:()=>{};function _Y(e){let t=(0,fg.useRef)(null);return _K(()=>{t.current=e},[e]),(0,fg.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let _Z=!!("undefined"!=typeof window&&window.document&&window.document.createElement),_J=new Map;function _X(e){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(null),a=_B(t),o=(0,fg.useRef)(null);if(l&&l.register(o,a),_Z){let e=_J.get(a);e&&!e.includes(r)?e.push(r):_J.set(a,[r])}return _K(()=>()=>{l&&l.unregister(o),_J.delete(a)},[a]),(0,fg.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function _Q(e=[]){let t=_X(),[n,r]=function(e){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(null),a=_Y(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?a():n(e.value)});_K(()=>{r.current&&a()});let o=_Y(e=>{r.current=e(t),a()});return[t,o]}(t),a=(0,fg.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return _K(a,[t,a,...e]),n}"undefined"!=typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{_J.delete(e)}));let _0=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=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]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r};function _1(...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],a=r[e];"function"==typeof n&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=_q(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=_0(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=_J.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=_J.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):t[e]=void 0!==a?a:n}}return t}let _2=Symbol("default");function _3({values:e,children:t}){for(let[n,r]of e)t=fg.createElement(n.Provider,{value:r},t);return t}function _4(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,fg.useMemo)(()=>{let e,c,l;return e="function"==typeof t?t({...s,defaultClassName:a}):t,c="function"==typeof n?n({...s,defaultStyle:i||{}}):n,l="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:c||i?{...i,...c}:void 0,children:null!=l?l:o,"data-rac":""}},[t,n,r,a,o,i,s])}function _5(e,t){let n=(0,fg.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||_2;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 _6(e,t,n){let{ref:r,...a}=_5(n,e.slot)||{},o=_H((0,fg.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=_U(e,t);return n||(n="function"==typeof r),r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():_U(e[n],null)})}}})(t,r),[t,r])),i=_1(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function _8(e=!0){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(!1),a=(0,fg.useCallback)(e=>{r.current=!0,n(!!e)},[]);return _K(()=>{r.current||n(!1)},[]),[a,t]}function _7(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let _9=(0,fg.createContext)(null),ye=null;function yt(e,t="assertive",n=7e3){ye?ye.announce(e,t,n):(ye=new yn,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?ye.announce(e,t,n):setTimeout(()=>{(null==ye?void 0:ye.isAttached())&&(null==ye||ye.announce(e,t,n))},100))}class yn{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,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.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 yr=new Set(["id"]),ya=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yo=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yi=/^(data-.*)$/;function ys(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yr.has(t)||n&&ya.has(t)||r&&yo.has(t)||(null==a?void 0:a.has(t))||yi.test(t))&&(o[t]=e[t]);return o}let yc=["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"])'],yl=yc.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yc.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yu=yc.join(':not([hidden]):not([tabindex="-1"]),');function yp(e){return e.matches(yl)}function yd(e){return e.matches(yu)}let yf=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},yh=e=>e&&"window"in e&&e.window===e?e:yf(e).defaultView||window;function ym(e){if(function(){if(null==yg){yg=!1;try{document.createElement("div").focus({get preventScroll(){return yg=!0,!0}})}catch{}}return yg}())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 yg=null;function y_(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function yy(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function yb(e){let t=(0,fg.useRef)({isFocused:!1,observer:null});_K(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=_Y(t=>{null==e||e(t)});return(0,fg.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(y_(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 yv=!1;function yA(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 y$(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 yw(e){let t=null;return()=>(null==t&&(t=e()),t)}let yk=yw(function(){return y$(/^Mac/i)}),yx=yw(function(){return y$(/^iPhone/i)}),yC=yw(function(){return y$(/^iPad/i)||yk()&&navigator.maxTouchPoints>1}),yE=yw(function(){return yx()||yC()});yw(function(){return yk()||yE()});let yD=yw(function(){return yA(/AppleWebKit/i)&&!yS()}),yS=yw(function(){return yA(/Chrome/i)}),yz=yw(function(){return yA(/Android/i)}),yB=yw(function(){return yA(/Firefox/i)}),yM=new Map,yO=new Set;function yT(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=yM.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),yM.delete(n.target)),0===yM.size)){for(let e of yO)e();yO.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=yM.get(n.target);r||(r=new Set,yM.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function yP(e){requestAnimationFrame(()=>{for(let[e]of yM)"isConnected"in e&&!e.isConnected&&yM.delete(e);0===yM.size?e():yO.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?yT():document.addEventListener("DOMContentLoaded",yT));let yI="default",yN="",yF=new WeakMap;function yj(e){if(yE())"disabled"===yI&&(yI="restoring",setTimeout(()=>{yP(()=>{if("restoring"===yI){let t=yf(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=yN||""),yN="",yI="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&yF.has(e)){let t=yF.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),yF.delete(e)}}let yR=fg.createContext({register:()=>{}});function yL(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function yV(e,t,n){var r=yL(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 yW(e,t){_K(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yG(){let e=(0,fg.useRef)(new Map),t=(0,fg.useCallback)((t,n,r,a)=>{let o=(null==a?void 0:a.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:a}),t.addEventListener(n,o,a)},[]),n=(0,fg.useCallback)((t,n,r,a)=>{var o;let i=(null==(o=e.current.get(r))?void 0:o.fn)||r;t.removeEventListener(n,i,a),e.current.delete(r)},[]),r=(0,fg.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,fg.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}yR.displayName="PressResponderContext";function yH(e,t){return!!t&&!!e&&e.contains(t)}function yU(e){return e.target}function yq(e,t,n=!0){var r,a;let{metaKey:o,ctrlKey:i,altKey:s,shiftKey:c}=t;yB()&&(null==(a=window.event)||null==(r=a.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(yk()?o=!0:i=!0);let l=yD()&&yk()&&!yC()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:s,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:s,shiftKey:c,bubbles:!0,cancelable:!0});yq.isOpening=n,ym(e),e.dispatchEvent(l),yq.isOpening=!1}function yK(e){return 0===e.mozInputSource&&!!e.isTrusted||(yz()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}yq.isOpening=!1;var yY=n(28316),yZ=new WeakMap;class yJ{continuePropagation(){yV(this,yZ,!1)}get shouldStopPropagation(){var e;return e=yL(this,yZ,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var a;gI(this,yZ,{writable:!0,value:void 0}),yV(this,yZ,!0);let o=null!=(a=null==r?void 0:r.target)?a:n.currentTarget,i=null==o?void 0:o.getBoundingClientRect(),s,c=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),i&&(null!=l&&null!=u?(s=l-i.left,c=u-i.top):(s=i.width/2,c=i.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=c}}let yX=Symbol("linkClicked"),yQ="react-aria-pressable-style",y0="data-react-aria-pressable";function y1(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,fg.useContext)(yR);if(t){let{register:n,...r}=t;e=_1(r,e),n()}return yW(t,e.ref),e}(e),[h,m]=(0,fg.useState)(!1),g=(0,fg.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=yG(),v=_Y((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new yJ("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,m(!0),o}),A=_Y((e,r,o=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let c=!0;if(a){let t=new yJ("pressend",r,e);a(t),c=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&o&&!s){let n=new yJ("press",r,e);t(n),c&&(c=n.shouldStopPropagation)}return i.isTriggeringEvent=!1,c}),$=_Y((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new yJ("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=_Y(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(y4(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),p||yj(t.target),t.disposables))n();t.disposables=[]}}),k=_Y(e=>{u&&w(e)}),x=_Y(e=>{null==i||i(e)}),C=_Y((e,t)=>{if(i){let n=new MouseEvent("click",e);yy(n,t),i(y_(n))}}),E=(0,fg.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(y3(t.nativeEvent,t.currentTarget)&&yH(t.currentTarget,yU(t.nativeEvent))){var r;y5(yU(t.nativeEvent),t.key)&&t.preventDefault();let a=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",a=v(t,"keyboard");let r=t.currentTarget;y(yf(t.currentTarget),"keyup",_q(t=>{y3(t,r)&&!t.repeat&&yH(r,yU(t))&&e.target&&$(y4(e.target,t),"keyboard")},n),!0)}a&&t.stopPropagation(),t.metaKey&&yk()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||yH(t.currentTarget,yU(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!yq.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||yK(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),a=A(t,"virtual");x(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",a=$(y4(t.currentTarget,t),r),o=A(y4(t.currentTarget,t),r,!0);n=a&&o,e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,a;if(e.isPressed&&e.target&&y3(t,e.target)){y5(yU(t),t.key)&&t.preventDefault();let n=yU(t),a=yH(e.target,yU(t));A(y4(e.target,t),"keyboard",a),a&&C(t,e.target),b(),"Enter"!==t.key&&y2(e.target)&&yH(e.target,n)&&!t[yX]&&(t[yX]=!0,yq(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==(a=e.target)||a.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{var a;if(0!==t.button||!yH(t.currentTarget,yU(t.nativeEvent)))return;if(a=t.nativeEvent,!yz()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=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(yE()){if("default"===yI){let t=yf(e);yN=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}yI="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";yF.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=v(t,e.pointerType);let a=yU(t.nativeEvent);"releasePointerCapture"in a&&a.releasePointerCapture(t.pointerId),y(yf(t.currentTarget),"pointerup",n,!1),y(yf(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(yH(t.currentTarget,yU(t.nativeEvent))&&0===t.button){if(l){let n=function(e){for(;e&&!yp(e);)e=e.parentElement;let t=yh(e),n=t.document.activeElement;if(!n||n===e)return;yv=!0;let r=!1,a=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},o=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,ym(n),c()))},i=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,ym(n),c()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),yv=!1,r=!1},l=requestAnimationFrame(c);return c}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{yH(t.currentTarget,yU(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(y4(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(y4(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(yH(e.target,yU(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(ym(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=>{yH(e.currentTarget,yU(e.nativeEvent))&&w(e)}}return t},[y,s,l,b,p,w,k,A,v,$,x,C]);return(0,fg.useEffect)(()=>{if(!d)return;let e=yf(d.current);if(!e||!e.head||e.getElementById(yQ))return;let t=e.createElement("style");t.id=yQ,t.textContent=`
|
|
32
|
+
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}function h9(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}let me=h9();function mt(e,t){if(me){if("string"==typeof t)if(t.startsWith("http"))return ma(e,t);else try{let n=JSON.parse(t);if(mo(n))return ma(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 ma(e,t.toString());else if(mo(t))return ma(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 mn(e){me&&localStorage.removeItem(h0+e)}function mr(){if(me)for(let e of Object.keys(localStorage))e.startsWith(h0)&&localStorage.removeItem(e)}function ma(e,t){localStorage.setItem(h0+e,JSON.stringify(t))}function mo(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 mi(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&mo(t))}var ms={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 mc(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<ms.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>ms.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>ms.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<ms.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<ms.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<ms.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>ms.SMALL_DESKTOP_MAX)}var ml=!1;function mu(){ml||(window.addEventListener("resize",mc),mc(),ml=!0)}var mp=n(16709),md=n.n(mp),mf=n(46062),mh=n.n(mf),mm=n(44036),mg=n.n(mm),m_=n(96793),my=n.n(m_),mb=n(17892),mv=n.n(mb),mA=n(11173),m$=n.n(mA),mw=n(42464),mk=n.n(mw),mx=n(6370),mC={};mC.styleTagTransform=mk(),mC.setAttributes=mv(),mC.insert=my().bind(null,"head"),mC.domAPI=mg(),mC.insertStyleElement=m$(),mh()(mx.Z,mC);let mE=mx.Z&&mx.Z.locals?mx.Z.locals:void 0;function mD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mS(e){var t,n=e.title,r=e.children,a="tablet"===hM();return f_().createElement("div",{className:md()((mD(t={},mE.tabletHeader,a),mD(t,mE.desktopHeader,!a),t))},f_().createElement("h4",null,n),r)}var mz=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],mB={primaryColor:{_type:tk.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nf.oneOf(mz)]},secondaryColor:{_type:tk.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nf.oneOf(mz)]}},mM={"Brand color #1":{_default:"#005d5d",_type:tk.String},"Brand color #2":{_default:"#004144",_type:tk.String},"Brand color #3":{_default:"#007d79",_type:tk.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tk.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tk.UUID}}},implementationName:{_type:tk.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tk.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:tk.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:[nf.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:tk.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:tk.String}},diagnosisTags:mB},mO=n(72530),mT={};mT.styleTagTransform=mk(),mT.setAttributes=mv(),mT.insert=my().bind(null,"head"),mT.domAPI=mg(),mT.insertStyleElement=m$(),mh()(mO.Z,mT);let mP=mO.Z&&mO.Z.locals?mO.Z.locals:void 0;function mI(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 mN(e){var t,n,r,a=e.menuTitle,o=e.children,i=(t=f_().useState(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(o.push(n.value),o.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw r}}return o}}(t,2)||function(e,t){if(e){if("string"==typeof e)return mI(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 mI(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=i[0],c=i[1],l=hN(function(){return c(!1)},s),u="tablet"===hM(),p=(0,fg.useCallback)(function(){return c(function(e){return!e})},[]);return f_().createElement("div",{"data-overflow-menu":!0,className:md()("cds--overflow-menu",mP.container),ref:l},f_().createElement("button",{className:md()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":s},mP.overflowMenuButton),"aria-haspopup":"true","aria-expanded":s,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:p},a),f_().createElement("div",{className:md()("cds--overflow-menu-options","cds--overflow-menu--flip",mP.menu,(n={},r=mP.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"},f_().createElement("ul",{className:md()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":u})},o),f_().createElement("span",null)))}var mF=n(62836),mj=n(20708),mR=n(23148),mL={};mL.styleTagTransform=mk(),mL.setAttributes=mv(),mL.insert=my().bind(null,"head"),mL.domAPI=mg(),mL.insertStyleElement=m$(),mh()(mR.Z,mL);let mV=mR.Z&&mR.Z.locals?mR.Z.locals:void 0;var mW=function(e){var t=e.path,n=e.title,r=e.basePath,a=e.icon,o=(0,fX.useTranslation)().t,i=(0,mF.useLocation)(),s=(0,fg.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)}),a=(null!=(e=i.pathname)?e:"").split("/").slice(-1*r.length).map(function(e){return decodeURIComponent(e)});return I(r,a)},[i.pathname,t]);return f_().createElement("div",{key:t},f_().createElement(mj.ConfigurableLink,{className:md()("cds--side-nav__link",{"active-left-nav-link":s}),to:"".concat(r,"/").concat(encodeURIComponent(t))},f_().createElement("span",{className:mV.menu},f_().createElement(mj.MaybeIcon,{icon:a,className:mV.icon,size:16}),f_().createElement("span",null,o(n)))))};function mG(e){return function(t){var n=t.basePath;return f_().createElement(mF.BrowserRouter,null,f_().createElement(mW,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 mH(e,t){return e-t*Math.floor(e/t)}function mU(e,t,n,r){let a=(t=mK(e,t))-1,o=-2;return n<=2?o=0:mq(t)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*n-362)/12+o+r)}function mq(e){return e%4==0&&(e%100!=0||e%400==0)}function mK(e,t){return"BC"===e?1-t:t}function mY(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let mZ={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 mJ{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=mH(t,146097),a=Math.floor(r/36524),o=mH(r,36524),i=Math.floor(o/1461),s=Math.floor(mH(o,1461)/365),[c,l]=mY(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),u=e-mU(c,l,1,1),p=2;e<mU(c,l,3,1)?p=0:mq(l)&&(p=1);let d=Math.floor(((u+p)*12+373)/367),f=e-mU(c,l,d,1)+1;return new gj(c,l,d,f)}toJulianDay(e){return mU(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return mZ[mq(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return mq(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 mX={"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 mQ(e,t){return t=gg(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function m0(e,t){return m1(e.calendar,t.calendar)&&mQ(e,t)}function m1(e,t){var n,r,a,o;return null!=(o=null!=(a=null==(n=e.isEqual)?void 0:n.call(e,t))?a:null==(r=t.isEqual)?void 0:r.call(t,e))?o:e.identifier===t.identifier}let m2={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function m3(e,t,n){let r,a=Math.ceil(e.calendar.toJulianDay(e)+1-(n?m2[n]:(r=function(e){if(Intl.Locale){let t=gr.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&gr.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&mX[r]||0))%7;return a<0&&(a+=7),a}function m4(e){return gf(Date.now(),e)}function m5(e){return gh(m4(e))}function m6(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function m8(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let m7=null;function m9(){return null==m7&&(m7=new Intl.DateTimeFormat().resolvedOptions().timeZone),m7}function ge(e){return e.subtract({days:e.day-1})}function gt(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function gn(e,t,n){let r=m3(e,t,n);return e.subtract({days:r})}let gr=new Map;function ga(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function go(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function gi(e){return gs(mK((e=gg(e,new mJ)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gs(e,t,n,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,t-1,n),s.getTime()}function gc(e,t){if("UTC"===t)return 0;if(e>0&&t===m9())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=gu(e,t);return gs(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let gl=new Map;function gu(e,t){let n=gl.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"}),gl.set(t,n));let r=n.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function gp(e,t,n="compatible"){var r,a,o;let i=gm(e);if("UTC"===t)return gi(i);if(t===m9()&&"compatible"===n){i=gg(i,new mJ);let e=new Date,t=mK(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=gi(i),c=gc(s-864e5,t),l=gc(s+864e5,t),u=(r=i,((a=s-c)==(o=s-l)?[a]:[a,o]).filter(e=>{var n;let a;return n=r,a=gu(e,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.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-c,s-l);case"compatible":case"later":return Math.max(s-c,s-l);case"reject":throw RangeError("No such absolute time found")}}function gd(e,t,n="compatible"){return new Date(gp(e,t,n))}function gf(e,t){let n=gc(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new gH(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function gh(e){return new gj(e.calendar,e.era,e.year,e.month,e.day)}function gm(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new gW(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function gg(e,t){if(m1(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,gA(r),r}function g_(e,t){let n=e.copy(),r="hour"in n?gE(n,t):0;gy(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,gb(n),gv(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,gb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gb(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let a=n.calendar.getYearsInEra(n);if(n.year>a){var o,i;let e=null==(o=(i=n.calendar).isInverseEra)?void 0:o.call(i,n);n.year=a,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 gy(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function gb(e){for(;e.month<1;)gy(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gy(e,1)}function gv(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 gA(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gv(e)}function g$(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function gw(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),gA(n),n}function gk(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),gx(n),n}function gx(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 gC(e,t){let n=e%t;return n<0&&(n+=t),n}function gE(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=gC(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gC(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gC(e.minute,60),n=Math.floor(e.hour/24),e.hour=gC(e.hour,24),n}function gD(e,t){let n=e.copy();return gE(n,t),n}function gS(e,t,n,r){let a=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=gB(o,n,0,t.length-1,null==r?void 0:r.round),a.era=t[o],gA(a);break}case"year":var o,i;(null==(o=(i=a.calendar).isInverseEra)?void 0:o.call(i,a))&&(n=-n),a.year=gB(e.year,n,-1/0,9999,null==r?void 0:r.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=gB(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":a.day=gB(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(a),gA(a),a}function gz(e,t,n,r){let a=e.copy();switch(t){case"hour":{let t=e.hour,o=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;o=12*!!e,i=e?23:11}a.hour=gB(t,n,o,i,null==r?void 0:r.round);break}case"minute":a.minute=gB(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":a.second=gB(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":a.millisecond=gB(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return a}function gB(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function gM(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?gp(g_(gm(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gi(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),gg(gf(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gO(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 gT(e){let t,n=gg(e,new mJ);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 gP(e){return`${gT(e)}T${gO(e)}`}function gI(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function gN(e){let t,n="object"==typeof e[0]?e.shift():new mJ;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 gF=new WeakMap;class gj{copy(){return this.era?new gj(this.calendar,this.era,this.year,this.month,this.day):new gj(this.calendar,this.year,this.month,this.day)}add(e){return g_(this,e)}subtract(e){return g_(this,g$(e))}set(e){return gw(this,e)}cycle(e,t,n){return gS(this,e,t,n)}toDate(e){return gd(this,e)}toString(){return gT(this)}compare(e){return m6(this,e)}constructor(...e){gI(this,gF,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,gA(this)}}var gR=new WeakMap;class gL{copy(){return new gL(this.hour,this.minute,this.second,this.millisecond)}add(e){return gD(this,e)}subtract(e){return gD(this,g$(e))}set(e){return gk(this,e)}cycle(e,t,n){return gz(this,e,t,n)}toString(){return gO(this)}compare(e){return m8(this)-m8(e)}constructor(e=0,t=0,n=0,r=0){gI(this,gR,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,gx(this)}}var gV=new WeakMap;class gW{copy(){return this.era?new gW(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gW(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return g_(this,e)}subtract(e){return g_(this,g$(e))}set(e){return gw(gk(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return gS(this,e,t,n);default:return gz(this,e,t,n)}}toDate(e,t){return gd(this,e,t)}toString(){return gP(this)}compare(e){let t=m6(this,e);if(0===t){var n;return n=gm(e),m8(this)-m8(n)}return t}constructor(...e){gI(this,gV,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gA(this)}}var gG=new WeakMap;class gH{copy(){return this.era?new gH(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new gH(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gM(this,e)}subtract(e){return gM(this,g$(e))}set(e,t){let n,r;return 0===(r=gk(gw(n=gm(this),e),e)).compare(n)?this:gg(gf(gp(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,a=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,a=n?23:11}let o=gm(e),i=gg(gk(o,{hour:t}),new mJ),s=[gp(i,e.timeZone,"earlier"),gp(i,e.timeZone,"later")].filter(t=>gf(t,e.timeZone).day===i.day)[0],c=gg(gk(o,{hour:a}),new mJ),l=[gp(c,e.timeZone,"earlier"),gp(c,e.timeZone,"later")].filter(t=>gf(t,e.timeZone).day===c.day).pop(),u=gi(e)-e.offset,p=Math.floor(u/36e5),d=u%36e5;return gg(gf(u=36e5*gB(p,n,Math.floor(s/36e5),Math.floor(l/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gz(e,t,n,r);case"era":case"year":case"month":case"day":return gg(gf(gp(gS(gm(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){return new Date(gi(this)-this.offset)}toString(){var e;let t,n,r;return`${gP(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 gH){var r,a;return e.timeZone===t?e:(r=e,a=t,gg(gf(gi(r)-r.offset,a),r.calendar))}return gf(gp(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){gI(this,gG,{writable:!0,value:void 0});let[t,n,r,a,o]=gN(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gA(this)}}class gU extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e);return new gj(this,mK(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gq(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(gq(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function gq(e){let[t,n]=mY(e.year+-543);return new gj(t,n,e.month,e.day)}function gK(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function gY(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-gK(e,n,1,1))/30),a=t+1-gK(e,n,r,1);return[n,r,a]}function gZ(e){return Math.floor(e%4/3)}function gJ(e,t){return t%13!=0?30:gZ(e)+5}class gX{fromJulianDay(e){let[t,n,r]=gY(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new gj(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),gK(1723856,t,e.month,e.day)}getDaysInMonth(e){return gJ(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+gZ(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class gQ extends gX{fromJulianDay(e){let[t,n,r]=gY(1723856,e);return new gj(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class g0 extends gX{fromJulianDay(e){let[t,n,r]=gY(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new gj(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gK(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gJ(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 g1=765433;function g2(e){return 7>mH(7*e+1,19)}function g3(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>mH(3*(n+1),7)&&(n+=1),n}function g4(e){let t,n;return g3(e)+(t=g3(e-1),n=g3(e),g3(e+1)-n==356?2:+(n-t==382))}function g5(e){return g4(e+1)-g4(e)}function g6(e,t){if(t>=6&&!g2(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=g5(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*!!g2(e):30}class g8{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/g1*19+234)/235)+1,r=g4(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=g4(--n)));let o=1,i=0;for(;i<a;)i+=g6(n,o),o++;let s=a-(i-=g6(n,--o));return new gj(this,n,o,s)}toJulianDay(e){let t=g4(e.year);for(let n=1;n<e.month;n++)t+=g6(e.year,n);return t+e.day+347997}getDaysInMonth(e){return g6(e.year,e.month)}getMonthsInYear(e){return g2(e.year)?13:12}getDaysInYear(e){return g5(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(g2(t.year)&&!g2(e.year)&&t.month>6?e.month--:!g2(t.year)&&g2(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class g7 extends mJ{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-mU(a.era,a.year,1,1);if(i<80?(o--,i+=(t=mq(a.year-1)?31:30)+155+90+10):(t=mq(a.year)?31:30,i-=80),i<t)n=1,r=i+1;else{let e=i-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 gj(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=mY(e.year+78);return(mq(a)?(t=31,n=mU(r,a,3,21)):(t=30,n=mU(r,a,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&&mq(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 g9(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function _e(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+g9(t,r,1,1)))/29.5)+1),o=n-g9(t,r,a,1)+1;return new gj(e,r,a,o)}function _t(e){return(14+11*e)%30<11}class _n{fromJulianDay(e){return _e(this,1948440,e)}toJulianDay(e){return g9(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&_t(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return _t(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class _r extends _n{fromJulianDay(e){return _e(this,1948439,e)}toJulianDay(e){return g9(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function _a(e){return 460322+c[e-1300]}function _o(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function _i(e,t){let n=_a(e);for(let r=1;r<t;r++)n+=_o(e,r);return n}function _s(e){return c[e+1-1300]-c[e-1300]}class _c extends _n{fromJulianDay(e){let t=e-1948440,n=_a(1300),r=_a(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-_a(++e)+1;let a=_s(e);if(r===a){n=12;break}if(r<a){let t=_o(e,n);for(n=1;r>t;)r-=t,t=_o(e,++n);break}}return new gj(this,e,n,t-_i(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+_i(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):_o(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):_s(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=_o(t,n)}}}}let _l=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],_u=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_p=[1867,1911,1925,1988,2018],_d=["meiji","taisho","showa","heisei","reiwa"];function _f(e){let t=_l.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?_l.length-1:0===t?0:t-1}function _h(e){let t=_p[_d.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gj(e.year+t,e.month,e.day)}class _m extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e),n=_f(t);return new gj(this,_d[n],t.year-_p[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(_h(e))}balanceDate(e){let t=_h(e),n=_f(t);_d[n]!==e.era&&(e.era=_d[n],e.year=t.year-_p[n]),this.constrainDate(e)}constrainDate(e){let t=_d.indexOf(e.era),n=_u[t];if(null!=n){let[r,a,o]=n,i=r-_p[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=_l[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return _d}getYearsInEra(e){let t=_d.indexOf(e.era),n=_l[t],r=_l[t+1];if(null==r)return 9999-n[0]+1;let a=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(_h(e))}getMinimumMonthInYear(e){let t=_g(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=_g(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function _g(e){if(1===e.year)return _l[_d.indexOf(e.era)]}let __=[0,31,62,93,124,155,186,216,246,276,306,336];class _y{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)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-__[a]+1;return new gj(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=__[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>mH(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function _b(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function _v(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class _A extends mJ{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=_v(mK(t.era,t.year));return new gj(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(_$(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=_v(_b(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(_$(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function _$(e){let[t,n]=mY(_b(e));return new gj(t,n,e.month,e.day)}function _w(e){switch(e){case"buddhist":return new gU;case"ethiopic":return new gX;case"ethioaa":return new gQ;case"coptic":return new g0;case"hebrew":return new g8;case"indian":return new g7;case"islamic-civil":return new _n;case"islamic-tbla":return new _r;case"islamic-umalqura":return new _c;case"japanese":return new _m;case"persian":return new _y;case"roc":return new _A;default:return new mJ}}let _k=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),_x=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function _C(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 _k.has(t.script)}let t=e.split("-")[0];return _x.has(t)}let _E={prefix:String(Math.round(1e10*Math.random())),current:0},_D=fg.createContext(_E),_S=fg.createContext(!1);"undefined"!=typeof window&&window.document&&window.document.createElement;let _z=new WeakMap,_B="function"==typeof fg.useId?function(e){let t=fg.useId(),[n]=(0,fg.useState)(_P()),r=n?"react-aria":`react-aria${_E.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,fg.useContext)(_D),n=function(e=!1){let t=(0,fg.useContext)(_D),n=(0,fg.useRef)(null);if(null===n.current&&!e){var r,a;let e=null==(a=fg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=a.ReactCurrentOwner)?void 0:r.current;if(e){let n=_z.get(e);null==n?_z.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,_z.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function _M(){return!1}function _O(){return!0}function _T(e){return()=>{}}function _P(){return"function"==typeof fg.useSyncExternalStore?fg.useSyncExternalStore(_T,_M,_O):(0,fg.useContext)(_S)}let _I=Symbol.for("react-aria.i18n.locale");function _N(){let e="undefined"!=typeof window&&window[_I]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:_C(e)?"rtl":"ltr"}}let _F=_N(),_j=new Set;function _R(){for(let e of(_F=_N(),_j))e(_F)}function _L(){let e=_P(),[t,n]=(0,fg.useState)(_F);return((0,fg.useEffect)(()=>(0===_j.size&&window.addEventListener("languagechange",_R),_j.add(n),()=>{_j.delete(n),0===_j.size&&window.removeEventListener("languagechange",_R)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let _V=fg.createContext(null);function _W(e){let{locale:t,children:n}=e,r=_L(),a=fg.useMemo(()=>t?{locale:t,direction:_C(t)?"rtl":"ltr"}:r,[r,t]);return fg.createElement(_V.Provider,{value:a},n)}function _G(){let e=_L();return(0,fg.useContext)(_V)||e}function _H(e){let t=(0,fg.useRef)(null),n=(0,fg.useRef)(void 0),r=(0,fg.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,fg.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 _U(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _q(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let _K="undefined"!=typeof document?fg.useLayoutEffect:()=>{};function _Y(e){let t=(0,fg.useRef)(null);return _K(()=>{t.current=e},[e]),(0,fg.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let _Z=!!("undefined"!=typeof window&&window.document&&window.document.createElement),_J=new Map;function _X(e){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(null),a=_B(t),o=(0,fg.useRef)(null);if(l&&l.register(o,a),_Z){let e=_J.get(a);e&&!e.includes(r)?e.push(r):_J.set(a,[r])}return _K(()=>()=>{l&&l.unregister(o),_J.delete(a)},[a]),(0,fg.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function _Q(e=[]){let t=_X(),[n,r]=function(e){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(null),a=_Y(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?a():n(e.value)});_K(()=>{r.current&&a()});let o=_Y(e=>{r.current=e(t),a()});return[t,o]}(t),a=(0,fg.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return _K(a,[t,a,...e]),n}"undefined"!=typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{_J.delete(e)}));let _0=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=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]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r};function _1(...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],a=r[e];"function"==typeof n&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=_q(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=_0(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=_J.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=_J.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):t[e]=void 0!==a?a:n}}return t}let _2=Symbol("default");function _3({values:e,children:t}){for(let[n,r]of e)t=fg.createElement(n.Provider,{value:r},t);return t}function _4(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,fg.useMemo)(()=>{let e,c,l;return e="function"==typeof t?t({...s,defaultClassName:a}):t,c="function"==typeof n?n({...s,defaultStyle:i||{}}):n,l="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:c||i?{...i,...c}:void 0,children:null!=l?l:o,"data-rac":""}},[t,n,r,a,o,i,s])}function _5(e,t){let n=(0,fg.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||_2;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 _6(e,t,n){let{ref:r,...a}=_5(n,e.slot)||{},o=_H((0,fg.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=_U(e,t);return n||(n="function"==typeof r),r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():_U(e[n],null)})}}})(t,r),[t,r])),i=_1(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function _8(e=!0){let[t,n]=(0,fg.useState)(e),r=(0,fg.useRef)(!1),a=(0,fg.useCallback)(e=>{r.current=!0,n(!!e)},[]);return _K(()=>{r.current||n(!1)},[]),[a,t]}function _7(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let _9=(0,fg.createContext)(null),ye=null;function yt(e,t="assertive",n=7e3){ye?ye.announce(e,t,n):(ye=new yn,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?ye.announce(e,t,n):setTimeout(()=>{(null==ye?void 0:ye.isAttached())&&(null==ye||ye.announce(e,t,n))},100))}class yn{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,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.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 yr=new Set(["id"]),ya=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yo=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yi=/^(data-.*)$/;function ys(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yr.has(t)||n&&ya.has(t)||r&&yo.has(t)||(null==a?void 0:a.has(t))||yi.test(t))&&(o[t]=e[t]);return o}let yc=["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"])'],yl=yc.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yc.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yu=yc.join(':not([hidden]):not([tabindex="-1"]),');function yp(e){return e.matches(yl)}function yd(e){return e.matches(yu)}let yf=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},yh=e=>e&&"window"in e&&e.window===e?e:yf(e).defaultView||window;function ym(e){if(function(){if(null==yg){yg=!1;try{document.createElement("div").focus({get preventScroll(){return yg=!0,!0}})}catch{}}return yg}())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 yg=null;function y_(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function yy(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function yb(e){let t=(0,fg.useRef)({isFocused:!1,observer:null});_K(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=_Y(t=>{null==e||e(t)});return(0,fg.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(y_(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 yv=!1;function yA(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 y$(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 yw(e){let t=null;return()=>(null==t&&(t=e()),t)}let yk=yw(function(){return y$(/^Mac/i)}),yx=yw(function(){return y$(/^iPhone/i)}),yC=yw(function(){return y$(/^iPad/i)||yk()&&navigator.maxTouchPoints>1}),yE=yw(function(){return yx()||yC()});yw(function(){return yk()||yE()});let yD=yw(function(){return yA(/AppleWebKit/i)&&!yS()}),yS=yw(function(){return yA(/Chrome/i)}),yz=yw(function(){return yA(/Android/i)}),yB=yw(function(){return yA(/Firefox/i)}),yM=new Map,yO=new Set;function yT(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=yM.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),yM.delete(n.target)),0===yM.size)){for(let e of yO)e();yO.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=yM.get(n.target);r||(r=new Set,yM.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function yP(e){requestAnimationFrame(()=>{for(let[e]of yM)"isConnected"in e&&!e.isConnected&&yM.delete(e);0===yM.size?e():yO.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?yT():document.addEventListener("DOMContentLoaded",yT));let yI="default",yN="",yF=new WeakMap;function yj(e){if(yE())"disabled"===yI&&(yI="restoring",setTimeout(()=>{yP(()=>{if("restoring"===yI){let t=yf(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=yN||""),yN="",yI="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&yF.has(e)){let t=yF.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),yF.delete(e)}}let yR=fg.createContext({register:()=>{}});function yL(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function yV(e,t,n){var r=yL(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 yW(e,t){_K(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yG(){let e=(0,fg.useRef)(new Map),t=(0,fg.useCallback)((t,n,r,a)=>{let o=(null==a?void 0:a.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:a}),t.addEventListener(n,o,a)},[]),n=(0,fg.useCallback)((t,n,r,a)=>{var o;let i=(null==(o=e.current.get(r))?void 0:o.fn)||r;t.removeEventListener(n,i,a),e.current.delete(r)},[]),r=(0,fg.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,fg.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}yR.displayName="PressResponderContext";function yH(e,t){return!!t&&!!e&&e.contains(t)}function yU(e){return e.target}function yq(e,t,n=!0){var r,a;let{metaKey:o,ctrlKey:i,altKey:s,shiftKey:c}=t;yB()&&(null==(a=window.event)||null==(r=a.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(yk()?o=!0:i=!0);let l=yD()&&yk()&&!yC()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:s,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:s,shiftKey:c,bubbles:!0,cancelable:!0});yq.isOpening=n,ym(e),e.dispatchEvent(l),yq.isOpening=!1}function yK(e){return 0===e.mozInputSource&&!!e.isTrusted||(yz()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}yq.isOpening=!1;var yY=n(28316),yZ=new WeakMap;class yJ{continuePropagation(){yV(this,yZ,!1)}get shouldStopPropagation(){var e;return e=yL(this,yZ,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var a;gI(this,yZ,{writable:!0,value:void 0}),yV(this,yZ,!0);let o=null!=(a=null==r?void 0:r.target)?a:n.currentTarget,i=null==o?void 0:o.getBoundingClientRect(),s,c=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),i&&(null!=l&&null!=u?(s=l-i.left,c=u-i.top):(s=i.width/2,c=i.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=c}}let yX=Symbol("linkClicked"),yQ="react-aria-pressable-style",y0="data-react-aria-pressable";function y1(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:d,...f}=function(e){let t=(0,fg.useContext)(yR);if(t){let{register:n,...r}=t;e=_1(r,e),n()}return yW(t,e.ref),e}(e),[h,m]=(0,fg.useState)(!1),g=(0,fg.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=yG(),v=_Y((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new yJ("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,m(!0),o}),A=_Y((e,r,o=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let c=!0;if(a){let t=new yJ("pressend",r,e);a(t),c=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&o&&!s){let n=new yJ("press",r,e);t(n),c&&(c=n.shouldStopPropagation)}return i.isTriggeringEvent=!1,c}),$=_Y((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new yJ("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=_Y(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&A(y4(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),p||yj(t.target),t.disposables))n();t.disposables=[]}}),k=_Y(e=>{u&&w(e)}),x=_Y(e=>{null==i||i(e)}),C=_Y((e,t)=>{if(i){let n=new MouseEvent("click",e);yy(n,t),i(y_(n))}}),E=(0,fg.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(y3(t.nativeEvent,t.currentTarget)&&yH(t.currentTarget,yU(t.nativeEvent))){var r;y5(yU(t.nativeEvent),t.key)&&t.preventDefault();let a=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",a=v(t,"keyboard");let r=t.currentTarget;y(yf(t.currentTarget),"keyup",_q(t=>{y3(t,r)&&!t.repeat&&yH(r,yU(t))&&e.target&&$(y4(e.target,t),"keyboard")},n),!0)}a&&t.stopPropagation(),t.metaKey&&yk()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||yH(t.currentTarget,yU(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!yq.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||yK(t.nativeEvent))){let e=v(t,"virtual"),r=$(t,"virtual"),a=A(t,"virtual");x(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",a=$(y4(t.currentTarget,t),r),o=A(y4(t.currentTarget,t),r,!0);n=a&&o,e.isOverTarget=!1,x(t),w(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,a;if(e.isPressed&&e.target&&y3(t,e.target)){y5(yU(t),t.key)&&t.preventDefault();let n=yU(t),a=yH(e.target,yU(t));A(y4(e.target,t),"keyboard",a),a&&C(t,e.target),b(),"Enter"!==t.key&&y2(e.target)&&yH(e.target,n)&&!t[yX]&&(t[yX]=!0,yq(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==(a=e.target)||a.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{var a;if(0!==t.button||!yH(t.currentTarget,yU(t.nativeEvent)))return;if(a=t.nativeEvent,!yz()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=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(yE()){if("default"===yI){let t=yf(e);yN=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}yI="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";yF.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=v(t,e.pointerType);let a=yU(t.nativeEvent);"releasePointerCapture"in a&&a.releasePointerCapture(t.pointerId),y(yf(t.currentTarget),"pointerup",n,!1),y(yf(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(yH(t.currentTarget,yU(t.nativeEvent))&&0===t.button){if(l){let n=function(e){for(;e&&!yp(e);)e=e.parentElement;let t=yh(e),n=t.document.activeElement;if(!n||n===e)return;yv=!0;let r=!1,a=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},o=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,ym(n),c()))},i=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,ym(n),c()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),yv=!1,r=!1},l=requestAnimationFrame(c);return c}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{yH(t.currentTarget,yU(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(y4(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,A(y4(e.target,t),e.pointerType,!1),k(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(yH(e.target,yU(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?w(t):(ym(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=>{yH(e.currentTarget,yU(e.nativeEvent))&&w(e)}}return t},[y,s,l,b,p,w,k,A,v,$,x,C]);return(0,fg.useEffect)(()=>{if(!d)return;let e=yf(d.current);if(!e||!e.head||e.getElementById(yQ))return;let t=e.createElement("style");t.id=yQ,t.textContent=`
|
|
33
33
|
@layer {
|
|
34
34
|
[${y0}] {
|
|
35
35
|
touch-action: pan-x pan-y pinch-zoom;
|