@openmrs/esm-cohort-builder-app 4.0.7-pre.1495 → 4.0.7-pre.1499

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/110.js CHANGED
@@ -1,4 +1,4 @@
1
- (globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["110"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,p=a.second||0,f=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=a(e).local();return p.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,r,n,o){var a=g(n),i=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=f(o[1]),fill:s=p(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=f(o),i=p(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=f(a=c(this.hash,t)),e=p(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=f(a=c(this.hash,r)),t=p(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=f(n=c(this.hash,39-t)),e=p(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=f(a=c(this.hash,t+1)),e=p(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=f(a=c(this.hash,t+1)),e=p(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,p=t,f=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^p&(f^m),l=0x5a827999):u<40?(s=p^f^m,l=0x6ed9eba1):u<60?(s=p&f|m&(p|f),l=0x8f1bbcdc):(s=p^f^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=f,f=p<<30|p>>>2,p=d,d=g}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,p=0;function f(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:f()}):"*"===e?c.push({type:"wildcard",index:d++,value:f()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[p++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[p];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++p];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,f,e.originalPath))}let h=`^(?:${m.join("|")})`;return p&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:f}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=k(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>C(e,t)).join(" ")),C=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,p)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[f,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},5077(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>fp,evaluateAsNumber:()=>lN,getImportMapOverrideMap:()=>sO,StockManagementPictogram:()=>D6,ChemistryIcon:()=>p3,BabyIcon:()=>pG,DashboardExtension:()=>mp,openmrsComponentDecorator:()=>cZ,tryRegisterExtension:()=>pr,pictogramIds:()=>Dj,ActivityIcon:()=>pV,compile:()=>lI,removeRouteMapOverride:()=>s6,TableBatchActions:()=>pb,getAsyncLifecycle:()=>cq,subscribeOpenmrsEvent:()=>ls,PasswordIcon:()=>fI,Assessment2Pictogram:()=>DM,CloseIcon:()=>p7,setupRouteMapOverrides:()=>s8,getWorkspaceGroupRegistration:()=>u2,registerWorkspace:()=>uX,useFeatureFlag:()=>db,reset:()=>uW,LabOrderIcon:()=>fx,VisitMode:()=>lf,useLocations:()=>dB,getLifecycle:()=>cY,formatDatetime:()=>Eq,getVisitsForPatient:()=>lE,formatPartialDate:()=>EK,CustomOverflowMenu:()=>pk,LocationIcon:()=>f_,GroupIcon:()=>fm,createUseStore:()=>cv,VisitStatus:()=>lm,getSessionLocation:()=>su,getCurrentImportMap:()=>sV,usePatient:()=>dG,useRenderableExtensions:()=>dY,getOpenedWindowIndexByWorkspace:()=>u5,setLeftNav:()=>uz,clearHistory:()=>iX,clearConfigErrors:()=>ot,formatTime:()=>EY,isDevEnabled:()=>sf,closeWorkspaceGroup2:()=>Sn,getCurrentRouteMap:()=>s0,ConfigurableLink:()=>cd,sessionStore:()=>i8,subscribeSnackbarShown:()=>_,getLoggedInUser:()=>sl,GenderMaleIcon:()=>fc,getExtensionSlotConfigFromStore:()=>ny,evaluateAsNumberAsync:()=>lj,getImportMapDefaultMap:()=>sC,unregisterExtensionRendering:()=>uu,implementerToolsConfigStore:()=>nT,Type:()=>nn,InPatientPictogram:()=>DG,cleanupObsoleteFeatureFlags:()=>l3,getAttachmentsUrl:()=>lr,showSnackbar:()=>_u,PatientBannerActionsMenu:()=>Dk,PatientSearchPictogram:()=>DX,DocumentAttachmentIcon:()=>fn,Snackbar:()=>_o,CardiologyPictogram:()=>DF,ImageMedicalIcon:()=>fy,ActionableNotificationComponent:()=>x1,DiagnosisTags:()=>xR,iconIds:()=>pB,PatientsPictogram:()=>DQ,interpolateUrl:()=>iH,setupHistory:()=>iY,subscribeToastShown:()=>D,detachAll:()=>uL,convertToLocaleCalendar:()=>EJ,DocumentIcon:()=>fr,configInternalStore:()=>nd,ActionMenuButton2:()=>Sb,setupDynamicOfflineDataHandler:()=>SH,makeUrl:()=>i6,oneOf:()=>ol,selectPreferredName:()=>Dm,launchWorkspaceGroup:()=>function e(t,r){let n=u2(t),{state:o,onWorkspaceGroupLaunch:a,workspaceGroupCleanup:i,workspaceToLaunch:s}=r,l=function(){return _O}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?_y(n?.name,()=>{e(t,r)}):_j(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:i}})),_L(t,o),a?.(),s&&_b(s.name,s.additionalProps??{})},MobileCheckIcon:()=>fR,createErrorHandler:()=>C,parseDate:()=>EB,getAttachmentByUuid:()=>le,LeftNavMenu:()=>xI,getExtensionRegistration:()=>uA,ShoppingCartAddItemIcon:()=>mu,ReferralOrderIcon:()=>fU,ReportIcon:()=>fH,dispatchToastShown:()=>w,getImportMapNextPageMap:()=>sP,registerExtension:()=>u$,setupOfflineSync:()=>SW,DownloadIcon:()=>fo,useConnectivity:()=>SY,provide:()=>nH,ShoppingCartArrowDownIcon:()=>fJ,featureFlagsStore:()=>l2,promptBeforeClosing:()=>_x,jsep:()=>lD,GeriatricsPictogram:()=>Dz,SearchIcon:()=>fG,reportError:()=>k,slugify:()=>sL,isOmrsDateToday:()=>EM,getExtensionStore:()=>uc,BloodBankPictogram:()=>DL,TriagePictogram:()=>D9,Workspace2:()=>Sf,refetchCurrentUser:()=>sa,CheckmarkOutlineIcon:()=>p4,registerExtensionSlot:()=>uU,AllergiesIcon:()=>ma,ArrowDownIcon:()=>pW,useOpenmrsInfinite:()=>dP,getExtensionConfigFromExtensionSlotStore:()=>nE,OpenmrsDatePicker:()=>xP,getExtensionConfigFromStore:()=>nw,getDynamicOfflineDataEntries:()=>Sz,getLocaleDisplayName:()=>Er,messageOmrsServiceWorker:()=>SG,navigate:()=>iK,launchWorkspace2:()=>So,getGroupByWindowName:()=>u6,CustomOverflowMenuItem:()=>pC,isUrl:()=>os,CaretDownIcon:()=>pq,ArrowLeftIcon:()=>pH,FacilityPictogram:()=>DH,ViewOffIcon:()=>mr,updateInternalExtensionStore:()=>un,dispatchActionableNotificationShown:()=>v,resetRouteMapOverrides:()=>s5,formatDurationBetween:()=>E6,defaultVisitCustomRepresentation:()=>lh,getBreadcrumbsFor:()=>oy,useOpenmrsPagination:()=>dE,Pagination:()=>Du,CheckmarkFilledIcon:()=>p2,clearCurrentUser:()=>si,showModal:()=>xq,ChevronUpIcon:()=>p8,saveVisit:()=>lb,useAttachments:()=>dn,Pictogram:()=>_r,useExtensionSlot:()=>c_,ChevronDownIcon:()=>p6,OpenmrsDateRangePicker:()=>xO,deleteAttachmentPermanently:()=>lo,getVisitTypes:()=>lp,OverflowMenuHorizontalIcon:()=>fA,EventScheduleIcon:()=>fs,getSessionStore:()=>sn,ActionMenu:()=>_6,ProcedureOrderIcon:()=>fB,preloadImport:()=>sB,registerWorkspaceWindows2:()=>u8,useOnVisible:()=>dU,setSessionLocation:()=>sc,userHasAccess:()=>ss,ChartAverageIcon:()=>p0,getFeatureFlag:()=>l6,UserAvatarIcon:()=>f8,renderExtension:()=>cs,useFhirInfinite:()=>dj,toVisitTypeObject:()=>lc,useSession:()=>dq,EmergencyDepartmentPictogram:()=>DW,Notification:()=>xQ,dispatchSnackbarShown:()=>b,navigateAndLaunchWorkspace:()=>_w,formatDate:()=>EG,workspace2StoreActions:()=>Ss,SwitcherIcon:()=>fY,esmStyleGuideSchema:()=>pg,getImportMapDisabledOverrides:()=>sR,useAssignedExtensionIds:()=>dt,CaretRightIcon:()=>pX,evaluateAsType:()=>lA,PageHeader:()=>Ds,TranslateIcon:()=>f3,setUserProperties:()=>sd,MovementIcon:()=>fj,renderInlineNotifications:()=>x8,subscribePrecacheStaticDependencies:()=>SZ,PaymentsDeskPictogram:()=>D0,usePrimaryIdentifierCode:()=>dZ,useLayoutType:()=>d$,getCurrentUser:()=>sr,XrayPictogram:()=>D8,CaretUpIcon:()=>pQ,renderActionableNotifications:()=>De,OpenmrsAppContext:()=>c5,setupModals:()=>xY,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(SM(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;SM(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>U,recordConfigDerivationError:()=>nO,useAbortController:()=>c8,Extension:()=>cp,getFhirServerPaginationHandlers:()=>dS,useConnectedExtensions:()=>du,registerApp:()=>po,HospitalBedIcon:()=>fg,useExtensionInternalStore:()=>dg,configExtensionStore:()=>nf,getSynchronizationItems:()=>SK,getExtensionSlotsConfigStore:()=>nh,registerExtensionRendering:()=>ul,RenderIfValueIsTruthy:()=>c9,registerFeatureFlag:()=>l4,useFhirFetchAll:()=>dN,restBaseUrl:()=>i2,CalendarHeatMapIcon:()=>pZ,getWorkspaceRegistration:()=>u1,isImportMapOverrideDisabled:()=>sT,resetConfigSystem:()=>or,getExtensionInternalStore:()=>ut,registerGlobalStore:()=>B,evaluateAsBoolean:()=>lR,PatientBannerPatientInfo:()=>D_,addRouteMapOverride:()=>s3,getDefaultCalendar:()=>EH,SettingsIcon:()=>fZ,DrugOrderIcon:()=>fa,ProgramsIcon:()=>fV,useAssignedExtensions:()=>cD,CloseFilledIcon:()=>fe,canAccessStorage:()=>SI,registerDefaultCalendar:()=>EW,TreeViewAltIcon:()=>f5,OverflowMenuVerticalIcon:()=>f$,clearConfigDerivationError:()=>nR,getConfigStore:()=>nm,registerWorkspaceGroup:()=>uQ,InformationSquareIcon:()=>fw,EmptyCard:()=>xj,ChevronLeftIcon:()=>p5,RadiologyIcon:()=>ml,useCandidateExtensions:()=>dr,renderToasts:()=>_m,isDesktop:()=>dI,integrateBreakpoints:()=>pu,RegistrationPictogram:()=>D4,CardHeader:()=>pf,getExtensionRegistrationFrom:()=>uj,InformationIcon:()=>fv,TrashCanIcon:()=>f6,useShallowStableValue:()=>cf,useOpenmrsSWR:()=>dW,Assessment1Pictogram:()=>DI,finishRegisteringAllApps:()=>pa,importDynamic:()=>sF,useFhirPagination:()=>d_,useVisitContextStore:()=>d3,ArrowUpIcon:()=>pK,showActionableNotification:()=>Dt,useForceUpdate:()=>dw,useVisit:()=>d6,updateWorkspaceWindowState:()=>_T,PatientBannerPatientIdentifiers:()=>Dw,WorkspaceNotification:()=>_Y,TransferPictogram:()=>D5,usePagination:()=>dH,Breakpoint:()=>pi,PatientBannerToggleContactDetailsButton:()=>Sw,CloseOutlineIcon:()=>ft,ObstetricsPictogram:()=>DJ,parseDateInput:()=>EQ,getConfig:()=>nK,attach:()=>uI,getLocale:()=>En,ActionMenuButton:()=>_W,isUrlWithTemplateParameters:()=>oi,useEmrConfiguration:()=>dm,useLeftNav:()=>dM,ToolsIcon:()=>f4,ErrorState:()=>xA,detach:()=>uM,setCurrentVisit:()=>lv,ConditionsIcon:()=>ms,SaveIcon:()=>fK,useWorkspaces:()=>_A,resetWorkspaceStore:()=>_M,useConfig:()=>dl,validator:()=>no,CalendarIcon:()=>pY,getHistory:()=>iq,StickyNoteAddIcon:()=>fX,useWorkspace2Store:()=>Sl,getPatientName:()=>Dc,getVisitStore:()=>ly,getCoreTranslation:()=>iW,registerModuleWithConfigSystem:()=>nB,registerModuleLoad:()=>nV,getBreadcrumbs:()=>om,extractVariableNames:()=>lQ,translateFrom:()=>iU,useStoreWithActions:()=>cy,EditIcon:()=>fi,getCandidateExtensions:()=>uV,shallowEqual:()=>O,subscribeNotificationShown:()=>E,MaximizeIcon:()=>fk,promptForClosingWorkspaces:()=>Si,WarningIcon:()=>mo,closeAllWorkspaces:()=>_j,fhirBaseUrl:()=>i4,matchLocale:()=>S$,registerBreadcrumb:()=>op,usePatientPhoto:()=>DO,EventsIcon:()=>fl,createGlobalStore:()=>F,workspaceStore:()=>_O,subscribeToFeatureFlag:()=>l5,useExtensionStore:()=>dv,closeWorkspace:()=>_k,createAttachment:()=>ln,useLeftNavStore:()=>dL,TableIcon:()=>f1,Icon:()=>md,InformationFilledIcon:()=>fb,getCurrentPageMap:()=>sk,LaboratoryPictogram:()=>DZ,temporaryConfigStore:()=>np,getPromptBeforeClosingFcn:()=>_D,toDateObjectStrict:()=>EL,defineConfigSchema:()=>nF,filterBreadcrumbs:()=>og,invalidateImplementerToolsConfig:()=>nC,PatientBannerContactDetails:()=>Sk,getAssignedExtensions:()=>uB,PatientPhoto:()=>DN,MaterialOrderIcon:()=>fS,MicroscopeIcon:()=>fO,visitTypesUrl:()=>ld,scheduleRecomputation:()=>uh,PharmacyPictogram:()=>D1,AttachmentIcon:()=>mi,MoneyIcon:()=>fT,getAttachments:()=>lt,getWorkspaceGroupStore:()=>_L,PageHeaderContent:()=>Dl,MedicationIcon:()=>fC,PrinterIcon:()=>fF,PatientListsPictogram:()=>_e,useAppContext:()=>c7,isOpenmrsRoutes:()=>sH,AppointmentsAltPictogram:()=>D$,GenericOrderTypeIcon:()=>ff,batchExtensionUpdates:()=>uf,useExtensionSlotStore:()=>cE,ViewIcon:()=>mn,formattedName:()=>Df,sessionEndpoint:()=>i3,duration:()=>E4,resetImportMapOverrides:()=>sA,TableOfContentsIcon:()=>f0,CaretLeftIcon:()=>pJ,getTranslationOverrides:()=>nG,isVersionSatisfied:()=>SB,EmptyCardIllustration:()=>xN,PenIcon:()=>fL,getWorkspaceStore:()=>_R,validators:()=>ou,setupImportMapOverrides:()=>sM,showToast:()=>_h,useDefineAppContext:()=>c6,getGlobalStore:()=>V,useOnClickOutside:()=>dV,getWindowByWorkspaceName:()=>u3,ArrowRightIcon:()=>pz,loadLifeCycles:()=>d7,registerBreadcrumbs:()=>of,MotherIcon:()=>fN,fetchCurrentPatient:()=>la,Toast:()=>_c,MessageQueueIcon:()=>fP,TwoFactorAuthenticationIcon:()=>f9,Pharmacy2Pictogram:()=>D2,goBackInHistory:()=>iJ,GroupAccessIcon:()=>fh,getExtensionRenderingsStore:()=>ur,setImplementerToolsConfigRecomputer:()=>nk,getAsyncExtensionLifecycle:()=>cX,setupApiModule:()=>sh,renderLoadingSpinner:()=>SC,WorkspaceContainer:()=>_5,showNotification:()=>x7,getModalRegistration:()=>uY,ListCheckedIcon:()=>fD,ResponsiveWrapper:()=>_n,GynaecologyPictogram:()=>DK,ShoppingCartIcon:()=>fq,getRouteMapNextPageMap:()=>s2,MetadataExportPictogram:()=>Dq,updateVisit:()=>lw,backendDependencies:()=>sm,MaybePictogram:()=>_t,createParcelMounter:()=>ca,openmrsFetch:()=>i5,useStore:()=>cg,isOpenmrsAppRoutes:()=>sW,HomePictogram:()=>D7,DentistryPictogram:()=>DV,ServiceQueuesPictogram:()=>D3,toLanguageTag:()=>Et,launchWorkspace:()=>_b,setFeatureFlag:()=>l9,DigitalTrustPictogram:()=>DU,NumericObservation:()=>Da,attachmentUrl:()=>s7,interpolateString:()=>iz,inRange:()=>oa,useExtensionSlotMeta:()=>dy,AppointmentsPictogram:()=>DA,renderSnackbars:()=>_l,getRegisteredWorkspace2Names:()=>Sc,toLocationObject:()=>ll,ChartLineIcon:()=>p1,UserHasAccess:()=>dJ,evaluateAsBooleanAsync:()=>lT,changeWorkspaceContext:()=>_C,createDashboard:()=>mf,getLocations:()=>lu,useExtensionContext:()=>dh,canCloseWorkspaceWithoutPrompting:()=>_g,getExtensionsConfigStore:()=>nv,getRouteMapDefaultMap:()=>s1,age:()=>Dg,isOmrsDateStrict:()=>EI,registerWorkspaceGroups2:()=>u9,usePaginationInfo:()=>dz,evaluateAsync:()=>lO,useOpenmrsFetchAll:()=>dR,removeImportMapOverride:()=>sj,showWorkspacePrompts:()=>_$,useVisitTypes:()=>d9,ageAsDuration:()=>Dh,getExtensionNameFromId:()=>uN,renderParcel:()=>co,useWorkspace2Context:()=>Su,ResetIcon:()=>fz,RenewIcon:()=>fW,subscribeActionableNotificationShown:()=>x,ErrorCard:()=>x$,GenderFemaleIcon:()=>fu,enableImportMapOverride:()=>s$,retry:()=>SV,ComponentContext:()=>cc,ExtensionSlot:()=>ck,unsetLeftNav:()=>uK,addImportMapOverride:()=>sN,MaybeIcon:()=>mc,useCustomOverflowMenu:()=>pS,PedestrianFamilyIcon:()=>fM,cancelPrompt:()=>__,CtScanPictogram:()=>DB,dispatchNotificationShown:()=>y,leftNavStore:()=>uH,OpenmrsFetchError:()=>i9,UserFollowIcon:()=>f7,launchWorkspaceGroup2:()=>Sr,ChevronRightIcon:()=>p9,UserXrayIcon:()=>me,GenderOtherIcon:()=>fd,formatDuration:()=>EX,toOmrsIsoString:()=>EF,Labs2Pictogram:()=>DY,workspace2Store:()=>u4,setUserLanguage:()=>so,useBodyScrollLock:()=>da,getExtensionConfig:()=>nb,SyringeIcon:()=>fQ,LocationPicker:()=>xM,useDebounce:()=>dc,TimeIcon:()=>f2,getExtensionSlotConfig:()=>ng,AddIcon:()=>pU,getRouteMapOverrideMap:()=>s4,processConfig:()=>nZ,InventoryManagementIcon:()=>fE,registerWorkspaces2:()=>u7,UserIcon:()=>mt,formatPatientName:()=>Dp,fireOpenmrsEvent:()=>li,registerModal:()=>uZ,registerTranslationNamespace:()=>nU,displayName:()=>Dd,evaluate:()=>lP,defineExtensionConfigSchema:()=>nW,renderWorkspaceWindowsAndMenu:()=>Sj,getSyncLifecycle:()=>cJ,evaluateAsTypeAsync:()=>l$});let f="openmrs:notification-shown",m="openmrs:actionable-notification-shown",h="openmrs:toast-shown",g="openmrs:snack-bar-shown";function y(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function E(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function k(e){let t=P(e);setTimeout(()=>{throw t})}function C(){let e=Error();return t=>{let r=P(t);r.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_cohort_builder_app=globalThis.webpackChunk_openmrs_esm_cohort_builder_app||[]).push([["110"],{7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,a={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=o?r.utc():r();Object.keys(t).forEach(function(e){var r;a["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=a.day||(a.year||a.month>=0?1:i.date()),l=a.year||i.year(),u=a.month>=0?a.month:a.year||a.day?0:i.month(),c=a.hour||0,d=a.minute||0,p=a.second||0,f=a.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},a=n.parse;n.parse=function(e){e.date=o.bind(this)(e),a.bind(this)(e)};var i=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),a=this;return o.forEach(function(r){a=e.bind(a)(t[r]*n,r)}),a};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,a){var i=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},i.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(n,o){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],a=o[0],i=60*o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(n)))return this;var i=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=i,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=a(e).local();return p.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),a=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,a,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(a=t[r])&&(d&&a&&(n(a)||(i=Array.isArray(a)))?(i?(i=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,a)):void 0!==a&&(l[r]=a));return l}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var a=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=a.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},2467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,a=e.b,i=Math.max(n/=255,o/=255,a/=255),s=Math.min(n,o,a),l=(i+s)/2;if(i===s)t=r=0;else{var u=i-s;switch(r=l>.5?u/(2-i-s):u/(i+s),i){case n:t=(o-a)/u+6*(o<a);break;case o:t=(a-n)/u+2;break;case a:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,a=e.h,i=e.s,s=e.l;if(0===i)r=n=o=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;r=t(u,l,a+1/3),n=t(u,l,a),o=t(u,l,a-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),a=r(6743),i=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var m=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||a(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,r,n,o){var a=g(n),i=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(a,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=f(o[1]),fill:s=p(o[1])},e.polyline(a,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(a,l).transform({translate:[t+n,r],scale:[1,1]})}function v(e,t,r,n,o){var a=f(o),i=p(o),s=g(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:i};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}m.prototype.toSvg=function(){return this.svg.toString()},m.prototype.toString=function(){return this.toSvg()},m.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},m.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},m.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},m.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},m.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},m.prototype.geoHexagons=function(){var e,t,r,n,o,a,i,s,l,m=d(c(this.hash,0),0,15,8,60),h=m*Math.sqrt(3),g=2*m,y=(s=m/2,[0,l=Math.sin(60*Math.PI/180)*m,s,0,s+m,0,2*m,l,s+m,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*m),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(a=0;a<6;a++)o=c(this.hash,t),e=a%2==0?i*h:i*h+h/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]}),0===a&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,e-h/2]}),0===i&&(e=a%2==0?6*h:6*h+h/2,this.svg.polyline(y,n).transform({translate:[a*m*1.5-g/2,e-h/2]})),0===a&&0===i&&this.svg.polyline(y,n).transform({translate:[6*m*1.5-g/2,5*h+h/2]}),t++},m.prototype.geoSineWaves=function(){var e,t,r,n,o,a,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=f(a=c(this.hash,t)),e=p(a),i=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},m.prototype.geoChevrons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),m=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[a*s,i*l*.66-l/2]}).polyline(m).end(),0===i&&this.svg.group(n).transform({translate:[a*s,6*l*.66-l/2]}).polyline(m).end(),t+=1},m.prototype.geoPlusSigns=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,10,25),m=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(i=0;i<6;i++)n=f(a=c(this.hash,r)),t=p(a),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===i&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,s*m-s*l-m/2]}).rect(g).end(),0===s&&this.svg.group(o).transform({translate:[i*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(o).transform({translate:[4*m-i*l+e*l-l,4*m-s*l-m/2]}).rect(g).end(),r++},m.prototype.geoXes=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),e=a%2==0?i*u-.5*u:i*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[a*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=a%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[a*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(n).transform({translate:[a*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},m.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*i,a*i,i,r),0===o&&this.svg.circle(6*i,a*i,i,r),0===a&&this.svg.circle(o*i,6*i,i,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i,r),e++},m.prototype.geoOctogons=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,i=0;i<6;i++)for(a=0;a<6;a++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[a*s,i*s]}),r+=1},m.prototype.geoSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*i,a*i,i,i,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},m.prototype.geoConcentricCircles=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,a=0;a<6;a++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=f(n=c(this.hash,39-t)),e=p(n),this.svg.circle(o*i+o*s+(i+s)/2,a*i+a*s+(i+s)/2,i/4,{fill:e,"fill-opacity":r}),t+=1},m.prototype.geoOverlappingRings=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*i,a*i,i-s/2,r),0===o&&this.svg.circle(6*i,a*i,i-s/2,r),0===a&&this.svg.circle(o*i,6*i,i-s/2,r),0===o&&0===a&&this.svg.circle(6*i,6*i,i-s/2,r),e+=1},m.prototype.geoTriangles=function(){var e,t,r,n,o,a,i,s,l=d(c(this.hash,0),0,15,15,80),m=l/2*Math.sqrt(3),h=[s=l/2,0,l,m,0,m,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*m),e=0,i=0;i<6;i++)for(a=0;a<6;a++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=i%2==0?180*(a%2==0):180*(a%2!=0),this.svg.polyline(h,n).transform({translate:[a*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[6*l*.5-l/2,m*i],rotate:[r,l/2,m/2]}),e+=1},m.prototype.geoDiamonds=function(){var e,t,r,n,o,a,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),m=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(a=0;a<6;a++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*i-l/2]}),0===a&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[a*s-s/2+e,l/2*6-l/2]}),0===a&&0===i&&this.svg.polyline(m,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},m.prototype.geoNestedSquares=function(){var e,t,r,n,o,a,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,a=0;a<6;a++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2,a*s+a*i*2+i/2,s,s,r),t=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":i+"px"},this.svg.rect(o*s+o*i*2+i/2+2*i,a*s+a*i*2+i/2+2*i,3*i,3*i,r),e+=1},m.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?y(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},m.prototype.geoPlaid=function(){var e,t,r,n,o,a,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,r=f(a=c(this.hash,t+1)),e=p(a),n=a+5,this.svg.rect(0,i,"100%",n,{opacity:r,fill:e}),i+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=f(a=c(this.hash,t+1)),e=p(a),o=a+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},m.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),a=o*Math.sqrt(3),i=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),m=3*o+2*s,h=2*a+2*o;for(this.svg.setWidth(m),this.svg.setHeight(h),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(m-o/2,-o/2,o,o,r),this.svg.rect(-o/2,h-o/2,o,o,r),this.svg.rect(m-o/2,h-o/2,o,o,r);break;case 1:this.svg.rect(i/2+s,a/2,o,o,r);break;case 2:this.svg.rect(-o/2,h/2-o/2,o,o,r),this.svg.rect(m-o/2,h/2-o/2,o,o,r);break;case 3:this.svg.rect(i/2+s,1.5*a+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,h- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[m-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[m-o/2,h+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[m/2+o/2,a/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,a/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[m/2+o/2,h-a/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[m-m/2-o/2,h-a/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,h/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[m-o/2,h/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-m+o/2,h/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+h/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-h+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-m+o/2,-h+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,a=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=e,p=t,f=r,m=n,h=o;for(u=0;u<80;u++){u<20?(s=m^p&(f^m),l=0x5a827999):u<40?(s=p^f^m,l=0x6ed9eba1):u<60?(s=p&f|m&(p|f),l=0x8f1bbcdc):(s=p^f^m,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|a[u]);h=m,m=f,f=p<<30|p>>>2,p=d,d=g}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+m|0,o=o+h|0,i=0;u<16;u++)a[u]=0}function c(e){a[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var a=24;a>=0;a-=8)c(l>>a);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function a(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=a,a.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},a.prototype.end=function(){return this.context.pop(),this},a.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},a.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},a.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},a.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},a.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},a.prototype.toString=function(){return this.svg.toString()},a.prototype.rect=function(e,t,r,a,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:a},i)),this},a.prototype.circle=function(e,t,r,a){var i=o("circle");return this.currentContext().appendChild(i),this.setAttributes(i,n({cx:e,cy:t,r:r},a)),this},a.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},a.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var a=o("polyline");return this.currentContext().appendChild(a),this.setAttributes(a,n({points:e},t)),this},a.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},6541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],m=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,u=[...e],c=[],d=0,p=0;function f(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=a[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:f()}):"*"===e?c.push({type:"wildcard",index:d++,value:f()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[p++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[p];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++p];n.push({type:"text",value:i(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let a of e(o.tokens,0,n.slice()))yield*e(t,r+1,a);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))m.push(function(e,t,r,n){let o="",a="",s=!0;for(let d of e){if("text"===d.type){o+=i(d.value),a+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!a)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":a).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),a="",s=!1;continue}}return o}(t,u,f,e.originalPath))}let h=`^(?:${m.join("|")})`;return p&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:f}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(1779);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let a=r(968),{safeRe:i,t:s}=r(9718),l=r(2111),u=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=a.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(o,R(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],m));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>b(r,t)&&e.set.some(e=>b(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let a=new(r(8794)),i=r(968),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=_(e,t)),l("tildes",e=x(e,t)),l("xrange",e=k(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,a)=>{let i;return l("tilde",e,t,r,n,o,a),E(r)?i="":E(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(l("replaceTilde pr",a),i=`>=${r}.${n}.${o}-${a} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,l("tilde return",i),i})},_=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,a,i)=>{let s;return l("caret",e,t,r,o,a,i),E(r)?s="":E(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(a)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===r?"0"===o?`>=${r}.${o}.${a}-${i} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a}-${i} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${a}${n} <${r}.${o}.${+a+1}-0`:`>=${r}.${o}.${a}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${a} <${+r+1}.0.0-0`),l("caret return",s),s})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>C(e,t)).join(" ")),C=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,a,i,s)=>{l("xRange",e,r,n,o,a,i,s);let u=E(o),c=u||E(a),d=c||E(i);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(a=0),i=0,">"===n?(n=">=",c?(o=+o+1,a=0):a=+a+1,i=0):"<="===n&&(n="<",c?o=+o+1:a=+a+1),"<"===n&&(s="-0"),r=`${n+o}.${a}.${i}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),O=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),R=e=>(t,r,n,o,a,i,s,l,u,c,d,p)=>(r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(a)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:a}=r(6874),{safeRe:i,t:s}=r(9718),l=r(968),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),a=r(5580),i=r(4089),s=r(7059),l=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},6874(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},1123(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},968(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=r(6874),i=r(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[f,o]],h=(e,t,r)=>{let n=(e=>{for(let[t,r]of m)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;i(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},5077(e,t,r){"use strict";let n,o,a,i,s,l,u,c,d,p;r.r(t),r.d(t,{GenderUnknownIcon:()=>fy,evaluateAsNumber:()=>lM,getImportMapOverrideMap:()=>sA,StockManagementPictogram:()=>_e,ChemistryIcon:()=>p7,BabyIcon:()=>pX,DashboardExtension:()=>my,openmrsComponentDecorator:()=>cQ,tryRegisterExtension:()=>ps,pictogramIds:()=>DL,ActivityIcon:()=>pK,compile:()=>lV,removeRouteMapOverride:()=>le,TableBatchActions:()=>p_,getAsyncLifecycle:()=>c1,subscribeOpenmrsEvent:()=>lp,PasswordIcon:()=>fV,Assessment2Pictogram:()=>DU,CloseIcon:()=>fo,setupRouteMapOverrides:()=>ln,getWorkspaceGroupRegistration:()=>u9,registerWorkspace:()=>u4,useFeatureFlag:()=>d_,reset:()=>uZ,LabOrderIcon:()=>fC,VisitMode:()=>lv,useLocations:()=>dz,getLifecycle:()=>c0,formatDatetime:()=>E1,getVisitsForPatient:()=>lk,formatPartialDate:()=>EJ,CustomOverflowMenu:()=>pT,LocationIcon:()=>fO,GroupIcon:()=>fb,createUseStore:()=>cD,VisitStatus:()=>lb,getSessionLocation:()=>su,getCurrentImportMap:()=>sK,usePatient:()=>dX,useRenderableExtensions:()=>d0,getOpenedWindowIndexByWorkspace:()=>ct,setLeftNav:()=>uq,clearHistory:()=>iX,clearConfigErrors:()=>ot,formatTime:()=>E0,isDevEnabled:()=>sv,closeWorkspaceGroup2:()=>Sl,getCurrentRouteMap:()=>s6,ConfigurableLink:()=>cg,sessionStore:()=>i8,setSessionLocale:()=>sd,subscribeSnackbarShown:()=>_,getLoggedInUser:()=>sl,GenderMaleIcon:()=>fh,getExtensionSlotConfigFromStore:()=>ny,evaluateAsNumberAsync:()=>lL,getImportMapDefaultMap:()=>sN,unregisterExtensionRendering:()=>um,implementerToolsConfigStore:()=>nT,Type:()=>nn,InPatientPictogram:()=>DX,cleanupObsoleteFeatureFlags:()=>l7,getAttachmentsUrl:()=>ls,showSnackbar:()=>_m,PatientBannerActionsMenu:()=>DT,PatientSearchPictogram:()=>D4,DocumentAttachmentIcon:()=>fl,Snackbar:()=>_u,CardiologyPictogram:()=>DH,ImageMedicalIcon:()=>fx,ActionableNotificationComponent:()=>x5,DiagnosisTags:()=>x$,iconIds:()=>pz,PatientsPictogram:()=>D3,interpolateUrl:()=>iH,setupHistory:()=>iY,subscribeToastShown:()=>D,detachAll:()=>uW,convertToLocaleCalendar:()=>E2,DocumentIcon:()=>fs,configInternalStore:()=>nd,ActionMenuButton2:()=>S_,setupDynamicOfflineDataHandler:()=>SY,makeUrl:()=>i6,oneOf:()=>ol,selectPreferredName:()=>Db,launchWorkspaceGroup:()=>function e(t,r){let n=u9(t),{state:o,onWorkspaceGroupLaunch:a,workspaceGroupCleanup:i,workspaceToLaunch:s}=r,l=function(){return _A}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?_x(n?.name,()=>{e(t,r)}):_L(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:i}})),_W(t,o),a?.(),s&&__(s.name,s.additionalProps??{})},MobileCheckIcon:()=>f$,createErrorHandler:()=>C,parseDate:()=>Ez,getAttachmentByUuid:()=>la,LeftNavMenu:()=>xV,getExtensionRegistration:()=>uF,ShoppingCartAddItemIcon:()=>mm,ReferralOrderIcon:()=>fG,ReportIcon:()=>fY,dispatchToastShown:()=>w,getImportMapNextPageMap:()=>sj,registerExtension:()=>uB,setupOfflineSync:()=>SZ,DownloadIcon:()=>fu,useConnectivity:()=>S0,provide:()=>nH,ShoppingCartArrowDownIcon:()=>f2,featureFlagsStore:()=>l9,promptBeforeClosing:()=>_C,jsep:()=>lP,GeriatricsPictogram:()=>Dq,SearchIcon:()=>fX,reportError:()=>k,slugify:()=>sW,isOmrsDateToday:()=>EU,getExtensionStore:()=>uh,BloodBankPictogram:()=>DW,TriagePictogram:()=>_r,Workspace2:()=>Sv,refetchCurrentUser:()=>sa,CheckmarkOutlineIcon:()=>p8,registerExtensionSlot:()=>uG,AllergiesIcon:()=>mc,ArrowDownIcon:()=>pZ,useOpenmrsInfinite:()=>dj,getExtensionConfigFromExtensionSlotStore:()=>nE,OpenmrsDatePicker:()=>xj,getExtensionConfigFromStore:()=>nw,getDynamicOfflineDataEntries:()=>Sq,getLocaleDisplayName:()=>Es,messageOmrsServiceWorker:()=>SX,navigate:()=>iK,launchWorkspace2:()=>Su,getGroupByWindowName:()=>ce,CustomOverflowMenuItem:()=>pN,isUrl:()=>os,CaretDownIcon:()=>p1,ArrowLeftIcon:()=>pY,FacilityPictogram:()=>DY,ViewOffIcon:()=>ms,updateInternalExtensionStore:()=>ul,dispatchActionableNotificationShown:()=>v,resetRouteMapOverrides:()=>lt,formatDurationBetween:()=>xe,defaultVisitCustomRepresentation:()=>lw,getBreadcrumbsFor:()=>oy,useOpenmrsPagination:()=>dk,Pagination:()=>Dm,CheckmarkFilledIcon:()=>p9,clearCurrentUser:()=>si,showModal:()=>x1,ChevronUpIcon:()=>fn,saveVisit:()=>l_,useAttachments:()=>du,Pictogram:()=>_s,useExtensionSlot:()=>cO,ChevronDownIcon:()=>fe,OpenmrsDateRangePicker:()=>xA,deleteAttachmentPermanently:()=>lu,getVisitTypes:()=>ly,OverflowMenuHorizontalIcon:()=>fF,EventScheduleIcon:()=>fp,getSessionStore:()=>sn,ActionMenu:()=>Se,ProcedureOrderIcon:()=>fz,preloadImport:()=>sz,registerWorkspaceWindows2:()=>cn,useOnVisible:()=>dG,setSessionLocation:()=>sc,userHasAccess:()=>ss,ChartAverageIcon:()=>p6,getFeatureFlag:()=>ue,UserAvatarIcon:()=>mn,renderExtension:()=>cp,useFhirInfinite:()=>dL,toVisitTypeObject:()=>lh,useSession:()=>d1,EmergencyDepartmentPictogram:()=>DZ,Notification:()=>x3,dispatchSnackbarShown:()=>b,navigateAndLaunchWorkspace:()=>_S,formatDate:()=>EX,workspace2StoreActions:()=>Sp,SwitcherIcon:()=>f0,esmStyleGuideSchema:()=>pE,getImportMapDisabledOverrides:()=>s$,useAssignedExtensionIds:()=>ds,CaretRightIcon:()=>p4,evaluateAsType:()=>lF,PageHeader:()=>Dp,TranslateIcon:()=>f7,setUserProperties:()=>sp,MovementIcon:()=>fL,renderInlineNotifications:()=>Dn,subscribePrecacheStaticDependencies:()=>SQ,PaymentsDeskPictogram:()=>D6,usePrimaryIdentifierCode:()=>dQ,useLayoutType:()=>dB,getCurrentUser:()=>sr,XrayPictogram:()=>_n,CaretUpIcon:()=>p3,renderActionableNotifications:()=>Da,OpenmrsAppContext:()=>dt,setupModals:()=>x0,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(SU(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;SU(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>U,recordConfigDerivationError:()=>nO,useAbortController:()=>dn,Extension:()=>cy,getFhirServerPaginationHandlers:()=>dR,useConnectedExtensions:()=>dm,registerApp:()=>pu,HospitalBedIcon:()=>fE,useExtensionInternalStore:()=>dE,configExtensionStore:()=>nf,getSynchronizationItems:()=>SJ,getExtensionSlotsConfigStore:()=>nh,registerExtensionRendering:()=>uf,RenderIfValueIsTruthy:()=>dr,registerFeatureFlag:()=>l8,useFhirFetchAll:()=>dM,restBaseUrl:()=>i2,CalendarHeatMapIcon:()=>pQ,getWorkspaceRegistration:()=>u5,isImportMapOverrideDisabled:()=>sI,resetConfigSystem:()=>or,getExtensionInternalStore:()=>ui,registerGlobalStore:()=>B,evaluateAsBoolean:()=>l$,PatientBannerPatientInfo:()=>DO,addRouteMapOverride:()=>s7,getDefaultCalendar:()=>EY,SettingsIcon:()=>fQ,DrugOrderIcon:()=>fc,ProgramsIcon:()=>fK,useAssignedExtensions:()=>cP,CloseFilledIcon:()=>fa,canAccessStorage:()=>SV,registerDefaultCalendar:()=>EZ,TreeViewAltIcon:()=>mt,OverflowMenuVerticalIcon:()=>fB,clearConfigDerivationError:()=>nR,getConfigStore:()=>nm,registerWorkspaceGroup:()=>u3,InformationSquareIcon:()=>fS,EmptyCard:()=>xL,ChevronLeftIcon:()=>ft,RadiologyIcon:()=>mf,useCandidateExtensions:()=>dl,renderToasts:()=>_b,isDesktop:()=>dV,integrateBreakpoints:()=>pm,RegistrationPictogram:()=>D8,CardHeader:()=>pv,getExtensionRegistrationFrom:()=>uL,InformationIcon:()=>fD,TrashCanIcon:()=>me,useShallowStableValue:()=>cv,useOpenmrsSWR:()=>dZ,Assessment1Pictogram:()=>DV,finishRegisteringAllApps:()=>pc,importDynamic:()=>sH,useFhirPagination:()=>dO,useVisitContextStore:()=>d7,ArrowUpIcon:()=>pJ,showActionableNotification:()=>Di,useForceUpdate:()=>dS,useVisit:()=>pe,updateWorkspaceWindowState:()=>_I,PatientBannerPatientIdentifiers:()=>DS,WorkspaceNotification:()=>_0,TransferPictogram:()=>_t,usePagination:()=>dY,Breakpoint:()=>pd,PatientBannerToggleContactDetailsButton:()=>SS,CloseOutlineIcon:()=>fi,ObstetricsPictogram:()=>D2,parseDateInput:()=>E3,getConfig:()=>nK,attach:()=>uV,getLocale:()=>El,ActionMenuButton:()=>_Z,isUrlWithTemplateParameters:()=>oi,useEmrConfiguration:()=>db,useLeftNav:()=>dU,ToolsIcon:()=>f8,ErrorState:()=>xF,detach:()=>uU,setCurrentVisit:()=>lD,ConditionsIcon:()=>mp,SaveIcon:()=>fJ,useWorkspaces:()=>_F,resetWorkspaceStore:()=>_U,useConfig:()=>df,validator:()=>no,CalendarIcon:()=>p0,getHistory:()=>iq,StickyNoteAddIcon:()=>f4,useWorkspace2Store:()=>Sf,getPatientName:()=>Dh,getVisitStore:()=>lx,getCoreTranslation:()=>iW,registerModuleWithConfigSystem:()=>nB,registerModuleLoad:()=>nV,getBreadcrumbs:()=>om,extractVariableNames:()=>l3,translateFrom:()=>iU,useStoreWithActions:()=>cx,EditIcon:()=>fd,getCandidateExtensions:()=>uK,shallowEqual:()=>O,subscribeNotificationShown:()=>E,MaximizeIcon:()=>fT,promptForClosingWorkspaces:()=>Sd,WarningIcon:()=>mu,closeAllWorkspaces:()=>_L,fhirBaseUrl:()=>i4,matchLocale:()=>SB,registerBreadcrumb:()=>op,usePatientPhoto:()=>DA,EventsIcon:()=>ff,createGlobalStore:()=>F,workspaceStore:()=>_A,subscribeToFeatureFlag:()=>ut,useExtensionStore:()=>dD,closeWorkspace:()=>_T,createAttachment:()=>ll,useLeftNavStore:()=>dW,TableIcon:()=>f5,Icon:()=>mg,InformationFilledIcon:()=>f_,getCurrentPageMap:()=>sT,LaboratoryPictogram:()=>DQ,temporaryConfigStore:()=>np,getPromptBeforeClosingFcn:()=>_P,toDateObjectStrict:()=>EW,defineConfigSchema:()=>nF,filterBreadcrumbs:()=>og,invalidateImplementerToolsConfig:()=>nC,PatientBannerContactDetails:()=>ST,getAssignedExtensions:()=>uz,PatientPhoto:()=>DM,MaterialOrderIcon:()=>fR,MicroscopeIcon:()=>fA,visitTypesUrl:()=>lg,scheduleRecomputation:()=>uw,PharmacyPictogram:()=>D5,AttachmentIcon:()=>md,MoneyIcon:()=>fI,getAttachments:()=>li,getWorkspaceGroupStore:()=>_W,PageHeaderContent:()=>Df,MedicationIcon:()=>fN,PrinterIcon:()=>fH,PatientListsPictogram:()=>_a,useAppContext:()=>da,isOpenmrsRoutes:()=>sY,AppointmentsAltPictogram:()=>DB,GenericOrderTypeIcon:()=>fv,batchExtensionUpdates:()=>uv,useExtensionSlotStore:()=>ck,ViewIcon:()=>ml,formattedName:()=>Dv,sessionEndpoint:()=>i3,duration:()=>E8,resetImportMapOverrides:()=>sF,TableOfContentsIcon:()=>f6,CaretLeftIcon:()=>p2,getTranslationOverrides:()=>nG,isVersionSatisfied:()=>Sz,EmptyCardIllustration:()=>xM,PenIcon:()=>fW,getWorkspaceStore:()=>_$,validators:()=>ou,setupImportMapOverrides:()=>sU,showToast:()=>_w,useDefineAppContext:()=>de,verifyTotpCode:()=>sf,getGlobalStore:()=>V,useOnClickOutside:()=>dK,getWindowByWorkspaceName:()=>u7,ArrowRightIcon:()=>pq,loadLifeCycles:()=>po,registerBreadcrumbs:()=>of,MotherIcon:()=>fM,fetchCurrentPatient:()=>lc,Toast:()=>_h,MessageQueueIcon:()=>fj,TwoFactorAuthenticationIcon:()=>mr,Pharmacy2Pictogram:()=>D9,goBackInHistory:()=>iJ,GroupAccessIcon:()=>fw,getExtensionRenderingsStore:()=>us,setImplementerToolsConfigRecomputer:()=>nk,getAsyncExtensionLifecycle:()=>c4,setupApiModule:()=>sw,renderLoadingSpinner:()=>SN,WorkspaceContainer:()=>St,showNotification:()=>Do,getModalRegistration:()=>u0,ListCheckedIcon:()=>fP,ResponsiveWrapper:()=>_l,GynaecologyPictogram:()=>DJ,ShoppingCartIcon:()=>f1,getRouteMapNextPageMap:()=>s9,MetadataExportPictogram:()=>D1,updateVisit:()=>lS,backendDependencies:()=>sb,MaybePictogram:()=>_i,createParcelMounter:()=>cc,openmrsFetch:()=>i5,useStore:()=>cE,isOpenmrsAppRoutes:()=>sZ,HomePictogram:()=>_o,DentistryPictogram:()=>DK,ServiceQueuesPictogram:()=>D7,toLanguageTag:()=>Ei,launchWorkspace:()=>__,setFeatureFlag:()=>ur,DigitalTrustPictogram:()=>DG,NumericObservation:()=>Dc,attachmentUrl:()=>lo,interpolateString:()=>iz,inRange:()=>oa,useExtensionSlotMeta:()=>dx,AppointmentsPictogram:()=>DF,renderSnackbars:()=>_f,getRegisteredWorkspace2Names:()=>Sh,logout:()=>sm,toLocationObject:()=>lf,ChartLineIcon:()=>p5,UserHasAccess:()=>d2,evaluateAsBooleanAsync:()=>lI,changeWorkspaceContext:()=>_N,createDashboard:()=>mv,getLocations:()=>lm,useExtensionContext:()=>dw,canCloseWorkspaceWithoutPrompting:()=>_E,getExtensionsConfigStore:()=>nv,getRouteMapDefaultMap:()=>s5,age:()=>DE,isOmrsDateStrict:()=>EV,registerWorkspaceGroups2:()=>cr,usePaginationInfo:()=>dq,evaluateAsync:()=>lA,useOpenmrsFetchAll:()=>d$,removeImportMapOverride:()=>sL,showWorkspacePrompts:()=>_B,useVisitTypes:()=>pr,ageAsDuration:()=>Dw,getExtensionNameFromId:()=>uM,renderParcel:()=>cu,useWorkspace2Context:()=>Sm,ResetIcon:()=>fq,RenewIcon:()=>fZ,subscribeActionableNotificationShown:()=>x,ErrorCard:()=>xB,GenderFemaleIcon:()=>fm,enableImportMapOverride:()=>sB,retry:()=>SK,ComponentContext:()=>ch,ExtensionSlot:()=>cT,unsetLeftNav:()=>uJ,addImportMapOverride:()=>sM,MaybeIcon:()=>mh,useCustomOverflowMenu:()=>pR,PedestrianFamilyIcon:()=>fU,cancelPrompt:()=>_O,CtScanPictogram:()=>Dz,dispatchNotificationShown:()=>y,leftNavStore:()=>uY,OpenmrsFetchError:()=>i9,UserFollowIcon:()=>mo,launchWorkspaceGroup2:()=>Ss,ChevronRightIcon:()=>fr,UserXrayIcon:()=>ma,GenderOtherIcon:()=>fg,formatDuration:()=>E4,toOmrsIsoString:()=>EH,Labs2Pictogram:()=>D0,workspace2Store:()=>u8,setUserLanguage:()=>so,useBodyScrollLock:()=>dc,getExtensionConfig:()=>nb,SyringeIcon:()=>f3,LocationPicker:()=>xU,useDebounce:()=>dh,TimeIcon:()=>f9,getExtensionSlotConfig:()=>ng,AddIcon:()=>pG,getRouteMapOverrideMap:()=>s8,processConfig:()=>nZ,InventoryManagementIcon:()=>fk,registerWorkspaces2:()=>co,UserIcon:()=>mi,formatPatientName:()=>Dy,fireOpenmrsEvent:()=>ld,registerModal:()=>uQ,registerTranslationNamespace:()=>nU,displayName:()=>Dg,evaluate:()=>lj,defineExtensionConfigSchema:()=>nW,renderWorkspaceWindowsAndMenu:()=>SL,getSyncLifecycle:()=>c2,evaluateAsTypeAsync:()=>lB});let f="openmrs:notification-shown",m="openmrs:actionable-notification-shown",h="openmrs:toast-shown",g="openmrs:snack-bar-shown";function y(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function E(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function x(e){let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function k(e){let t=P(e);setTimeout(()=>{throw t})}function C(){let e=Error();return t=>{let r=P(t);r.stack+=`
2
2
  Async stacktrace:
3
3
  ${e.stack}`,k(t)}}function P(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function O(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function R(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(n=r.getItem(e))?n:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e,t,r,n,o){return console.error("Unexpected error: ",o??e),w({description:S(o??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),w({description:S(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let T=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>T(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>T(t)(e)}}},N=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},i=t=e(n,o,a);return a},j=e=>e?N(e):N;function A(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let $={},I=Symbol.for("openmrs.esm-state.instanceCount"),M=globalThis,L=(M[I]??0)+1;function F(e,t,r="none"){let n=$[e];if(n)return n.active?A()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=W(e,t,r);return $[e]={value:n,active:!0},n}}function B(e,t){let r=$[e];return r?(r.active?A()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):($[e]={value:t,active:!0},t)}function V(e,t,r="none"){let n=$[e];if(!n){let n=W(e,t??{},r);return $[e]={value:n,active:!1},n}return n.value}function U(...e){let[t,r,n]=e,o=void 0===n?r:n,a=void 0===n?e=>e:r,i=a(t.getState());return o(i),t.subscribe(e=>{let t=a(e);O(i,t)||(i=t,o(t))})}function W(e,t,r){return"sessionStorage"===r?j()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let a,i,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=T(s.serialize),p=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},f=o.setState;o.setState=(e,t)=>{f(e,t),p()};let m=e((...e)=>{r(...e),p()},n,o),h=()=>{var e;if(!a)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return T(a.getItem.bind(a))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(i=s.merge(e,null!=(t=n())?t:m),!0),p()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},h(),i||m};return(r,n,o)=>{let a,i={storage:R(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=i.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=i.partialize({...n()});return c.setItem(i.name,{state:e,version:i.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>f;let m=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=n())?e:f))||void 0;return T(c.getItem.bind(c))(i.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];else{if(i.migrate)return[!0,i.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(a=i.merge(s,null!=(t=n())?t:f),!0),o)return d()}).then(()=>{null==o||o(a,void 0),a=n(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||m(),a||f}})(()=>t,{name:e,storage:R(()=>sessionStorage)})):j()(()=>t)}M[I]=L,L>1&&!A()&&console.error(`Detected ${L} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=$)},1e3);let H=function(e){return void 0===e};var z,K,G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea=r(8348);let ei=function(e,t){return function(r){return e(t(r))}};var es=ei(Object.getPrototypeOf,Object),el=r(3098),eu=Object.prototype,ec=Function.prototype.toString,ed=eu.hasOwnProperty,ep=ec.call(Object);let ef=function(e){if(!(0,el.A)(e)||"[object Object]"!=(0,ea.A)(e))return!1;var t=es(e);if(null===t)return!0;var r=ed.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ec.call(r)==ep},em=function(e,t){return e===t||e!=e&&t!=t},eh=function(e,t){for(var r=e.length;r--;)if(em(e[r][0],t))return r;return -1};var eg=Array.prototype.splice;function ey(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ey.prototype.clear=function(){this.__data__=[],this.size=0},ey.prototype.delete=function(e){var t=this.__data__,r=eh(t,e);return!(r<0)&&(r==t.length-1?t.pop():eg.call(t,r,1),--this.size,!0)},ey.prototype.get=function(e){var t=this.__data__,r=eh(t,e);return r<0?void 0:t[r][1]},ey.prototype.has=function(e){return eh(this.__data__,e)>-1},ey.prototype.set=function(e,t){var r=this.__data__,n=eh(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ev=r(3149);let eb=function(e){if(!(0,ev.A)(e))return!1;var t=(0,ea.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var ew=r(1917),eE=ew.A["__core-js_shared__"],ex=(z=/[^.]+$/.exec(eE&&eE.keys&&eE.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",eD=Function.prototype.toString;let e_=function(e){if(null!=e){try{return eD.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var eS=/^\[object .+?Constructor\]$/,ek=Object.prototype,eC=Function.prototype.toString,eP=ek.hasOwnProperty,eO=RegExp("^"+eC.call(eP).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eR=function(e){return!!(0,ev.A)(e)&&(!ex||!(ex in e))&&(eb(e)?eO:eS).test(e_(e))},eT=function(e,t){var r=null==e?void 0:e[t];return eR(r)?r:void 0};var eN=eT(ew.A,"Map"),ej=eT(Object,"create"),eA=Object.prototype.hasOwnProperty,e$=Object.prototype.hasOwnProperty;function eI(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}eI.prototype.clear=function(){this.__data__=ej?ej(null):{},this.size=0},eI.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eI.prototype.get=function(e){var t=this.__data__;if(ej){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return eA.call(t,e)?t[e]:void 0},eI.prototype.has=function(e){var t=this.__data__;return ej?void 0!==t[e]:e$.call(t,e)},eI.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ej&&void 0===t?"__lodash_hash_undefined__":t,this};let eM=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eL=function(e,t){var r=e.__data__;return eM(t)?r["string"==typeof t?"string":"hash"]:r.map};function eF(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eB(e){var t=this.__data__=new ey(e);this.size=t.size}eF.prototype.clear=function(){this.size=0,this.__data__={hash:new eI,map:new(eN||ey),string:new eI}},eF.prototype.delete=function(e){var t=eL(this,e).delete(e);return this.size-=!!t,t},eF.prototype.get=function(e){return eL(this,e).get(e)},eF.prototype.has=function(e){return eL(this,e).has(e)},eF.prototype.set=function(e,t){var r=eL(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eB.prototype.clear=function(){this.__data__=new ey,this.size=0},eB.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eB.prototype.get=function(e){return this.__data__.get(e)},eB.prototype.has=function(e){return this.__data__.has(e)},eB.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ey){var n=r.__data__;if(!eN||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eF(n)}return r.set(e,t),this.size=r.size,this};var eV=function(){try{var e=eT(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eU=function(e,t,r){"__proto__"==t&&eV?eV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},eW=function(e,t,r){(void 0===r||em(e[t],r))&&(void 0!==r||t in e)||eU(e,t,r)},eH=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};var ez="object"==typeof exports&&exports&&!exports.nodeType&&exports,eK=ez&&"object"==typeof module&&module&&!module.nodeType&&module,eG=eK&&eK.exports===ez?ew.A.Buffer:void 0,eZ=eG?eG.allocUnsafe:void 0;let eY=function(e,t){if(t)return e.slice();var r=e.length,n=eZ?eZ(r):new e.constructor(r);return e.copy(n),n};var eq=ew.A.Uint8Array;let eJ=function(e){var t=new e.constructor(e.byteLength);return new eq(t).set(new eq(e)),t},eX=function(e,t){var r=t?eJ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},eQ=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e0=Object.create,e1=function(){function e(){}return function(t){if(!(0,ev.A)(t))return{};if(e0)return e0(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e2=Object.prototype;let e4=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e2)},e3=function(e){return"function"!=typeof e.constructor||e4(e)?{}:e1(es(e))},e6=function(e){return(0,el.A)(e)&&"[object Arguments]"==(0,ea.A)(e)};var e5=Object.prototype,e9=e5.hasOwnProperty,e8=e5.propertyIsEnumerable,e7=e6(function(){return arguments}())?e6:function(e){return(0,el.A)(e)&&e9.call(e,"callee")&&!e8.call(e,"callee")},te=Array.isArray;let tt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tr=function(e){return null!=e&&tt(e.length)&&!eb(e)};var tn="object"==typeof exports&&exports&&!exports.nodeType&&exports,to=tn&&"object"==typeof module&&module&&!module.nodeType&&module,ta=to&&to.exports===tn?ew.A.Buffer:void 0;let ti=(ta?ta.isBuffer:void 0)||function(){return!1};var ts={};ts["[object Float32Array]"]=ts["[object Float64Array]"]=ts["[object Int8Array]"]=ts["[object Int16Array]"]=ts["[object Int32Array]"]=ts["[object Uint8Array]"]=ts["[object Uint8ClampedArray]"]=ts["[object Uint16Array]"]=ts["[object Uint32Array]"]=!0,ts["[object Arguments]"]=ts["[object Array]"]=ts["[object ArrayBuffer]"]=ts["[object Boolean]"]=ts["[object DataView]"]=ts["[object Date]"]=ts["[object Error]"]=ts["[object Function]"]=ts["[object Map]"]=ts["[object Number]"]=ts["[object Object]"]=ts["[object RegExp]"]=ts["[object Set]"]=ts["[object String]"]=ts["[object WeakMap]"]=!1;let tl=function(e){return function(t){return e(t)}};var tu=r(2136),tc="object"==typeof exports&&exports&&!exports.nodeType&&exports,td=tc&&"object"==typeof module&&module&&!module.nodeType&&module,tp=td&&td.exports===tc&&tu.A.process,tf=function(){try{var e=td&&td.require&&td.require("util").types;if(e)return e;return tp&&tp.binding&&tp.binding("util")}catch(e){}}(),tm=tf&&tf.isTypedArray,th=tm?tl(tm):function(e){return(0,el.A)(e)&&tt(e.length)&&!!ts[(0,ea.A)(e)]};let tg=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var ty=Object.prototype.hasOwnProperty;let tv=function(e,t,r){var n=e[t];ty.call(e,t)&&em(n,r)&&(void 0!==r||t in e)||eU(e,t,r)},tb=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?eU(r,s,l):tv(r,s,l)}return r},tw=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tE=/^(?:0|[1-9]\d*)$/;let tx=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tE.test(e))&&e>-1&&e%1==0&&e<t};var tD=Object.prototype.hasOwnProperty;let t_=function(e,t){var r=te(e),n=!r&&e7(e),o=!r&&!n&&ti(e),a=!r&&!n&&!o&&th(e),i=r||n||o||a,s=i?tw(e.length,String):[],l=s.length;for(var u in e)(t||tD.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tx(u,l)))&&s.push(u);return s},tS=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tk=Object.prototype.hasOwnProperty;let tC=function(e){if(!(0,ev.A)(e))return tS(e);var t=e4(e),r=[];for(var n in e)"constructor"==n&&(t||!tk.call(e,n))||r.push(n);return r},tP=function(e){return tr(e)?t_(e,!0):tC(e)},tO=function(e,t,r,n,o,a,i){var s=tg(e,r),l=tg(t,r),u=i.get(l);if(u)return void eW(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var p=te(l),f=!p&&ti(l),m=!p&&!f&&th(l);(c=l,p||f||m)?te(s)?c=s:(0,el.A)(s)&&tr(s)?c=eQ(s):f?(d=!1,c=eY(l,!0)):m?(d=!1,c=eX(l,!0)):c=[]:ef(l)||e7(l)?(c=s,e7(s))?c=tb(s,tP(s)):(!(0,ev.A)(s)||eb(s))&&(c=e3(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),eW(e,r,c)},tR=function e(t,r,n,o,a){t!==r&&eH(r,function(i,s){if(a||(a=new eB),(0,ev.A)(i))tO(t,r,s,n,e,o,a);else{var l=o?o(tg(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),eW(t,s,l)}},tP)},tT=function(e){return e},tN=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var tj=Math.max;let tA=function(e,t,r){return t=tj(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=tj(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),tN(e,this,s)}};var t$=Date.now,tI=(K=eV?function(e,t){return eV(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tT,G=0,Z=0,function(){var e=t$(),t=16-(e-Z);if(Z=e,t>0){if(++G>=800)return arguments[0]}else G=0;return K.apply(void 0,arguments)});let tM=function(e,t,r){if(!(0,ev.A)(r))return!1;var n=typeof t;return("number"==n?!!(tr(r)&&tx(t,r.length)):"string"==n&&t in r)&&em(r[t],e)},tL=function(e){var t;return tI(tA(t=function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&tM(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t},void 0,tT),t+"")};var tF=tL(function(e,t,r,n){tR(e,t,r,n)});function tB(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eF;++t<r;)this.add(e[t])}tB.prototype.add=tB.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tB.prototype.has=function(e){return this.__data__.has(e)};let tV=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},tU=function(e,t,r,n,o,a){var i=1&r,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&r?new tB:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!tV(t,function(e,t){if(!f.has(t)&&(m===e||o(m,e,r,n,a)))return f.push(t)})){p=!1;break}}else if(!(m===h||o(m,h,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p};var tW=r(241);let tH=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tz=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tK=tW.A?tW.A.prototype:void 0,tG=tK?tK.valueOf:void 0;let tZ=function(e,t,r,n,o,a,i){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new eq(e),new eq(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return em(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tH;case"[object Set]":var l=1&n;if(s||(s=tz),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tU(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tG)return tG.call(e)==tG.call(t)}return!1},tY=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tq=function(e,t,r){var n=t(e);return te(e)?n:tY(n,r(e))},tJ=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a},tX=function(){return[]};var tQ=Object.prototype.propertyIsEnumerable,t0=Object.getOwnPropertySymbols,t1=t0?function(e){return null==e?[]:tJ(t0(e=Object(e)),function(t){return tQ.call(e,t)})}:tX,t2=ei(Object.keys,Object),t4=Object.prototype.hasOwnProperty;let t3=function(e){if(!e4(e))return t2(e);var t=[];for(var r in Object(e))t4.call(e,r)&&"constructor"!=r&&t.push(r);return t},t6=function(e){return tr(e)?t_(e):t3(e)},t5=function(e){return tq(e,t6,t1)};var t9=Object.prototype.hasOwnProperty;let t8=function(e,t,r,n,o,a){var i=1&r,s=t5(e),l=s.length;if(l!=t5(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t9.call(t,c)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=i;++u<l;){var h=e[c=s[u]],g=t[c];if(n)var y=i?n(g,h,c,t,e,a):n(h,g,c,e,t,a);if(!(void 0===y?h===g||o(h,g,r,n,a):y)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(f=!1)}return a.delete(e),a.delete(t),f};var t7=eT(ew.A,"DataView"),re=eT(ew.A,"Promise"),rt=eT(ew.A,"Set"),rr=eT(ew.A,"WeakMap"),rn="[object Map]",ro="[object Promise]",ra="[object Set]",ri="[object WeakMap]",rs="[object DataView]",rl=e_(t7),ru=e_(eN),rc=e_(re),rd=e_(rt),rp=e_(rr),rf=ea.A;(t7&&rf(new t7(new ArrayBuffer(1)))!=rs||eN&&rf(new eN)!=rn||re&&rf(re.resolve())!=ro||rt&&rf(new rt)!=ra||rr&&rf(new rr)!=ri)&&(rf=function(e){var t=(0,ea.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?e_(r):"";if(n)switch(n){case rl:return rs;case ru:return rn;case rc:return ro;case rd:return ra;case rp:return ri}return t});let rm=rf;var rh="[object Arguments]",rg="[object Array]",ry="[object Object]",rv=Object.prototype.hasOwnProperty;let rb=function(e,t,r,n,o,a){var i=te(e),s=te(t),l=i?rg:rm(e),u=s?rg:rm(t);l=l==rh?ry:l,u=u==rh?ry:u;var c=l==ry,d=u==ry,p=l==u;if(p&&ti(e)){if(!ti(t))return!1;i=!0,c=!1}if(p&&!c)return a||(a=new eB),i||th(e)?tU(e,t,r,n,o,a):tZ(e,t,l,r,n,o,a);if(!(1&r)){var f=c&&rv.call(e,"__wrapped__"),m=d&&rv.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,g=m?t.value():t;return a||(a=new eB),o(h,g,r,n,a)}}return!!p&&(a||(a=new eB),t8(e,t,r,n,o,a))},rw=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,el.A)(t)||(0,el.A)(r))?rb(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rE=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},rx=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var rD=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tY(t,t1(e)),e=es(e);return t}:tX;let r_=function(e){return tq(e,tP,rD)};var rS=Object.prototype.hasOwnProperty;let rk=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rS.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rC=function(e,t){var r=t?eJ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rP=/\w*$/;let rO=function(e){var t=new e.constructor(e.source,rP.exec(e));return t.lastIndex=e.lastIndex,t};var rR=tW.A?tW.A.prototype:void 0,rT=rR?rR.valueOf:void 0;let rN=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eJ(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rC(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return eX(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rO(e);case"[object Symbol]":return rT?Object(rT.call(e)):{}}};var rj=tf&&tf.isMap,rA=rj?tl(rj):function(e){return(0,el.A)(e)&&"[object Map]"==rm(e)},r$=tf&&tf.isSet,rI=r$?tl(r$):function(e){return(0,el.A)(e)&&"[object Set]"==rm(e)},rM="[object Arguments]",rL="[object Function]",rF="[object Object]",rB={};rB[rM]=rB["[object Array]"]=rB["[object ArrayBuffer]"]=rB["[object DataView]"]=rB["[object Boolean]"]=rB["[object Date]"]=rB["[object Float32Array]"]=rB["[object Float64Array]"]=rB["[object Int8Array]"]=rB["[object Int16Array]"]=rB["[object Int32Array]"]=rB["[object Map]"]=rB["[object Number]"]=rB[rF]=rB["[object RegExp]"]=rB["[object Set]"]=rB["[object String]"]=rB["[object Symbol]"]=rB["[object Uint8Array]"]=rB["[object Uint8ClampedArray]"]=rB["[object Uint16Array]"]=rB["[object Uint32Array]"]=!0,rB["[object Error]"]=rB[rL]=rB["[object WeakMap]"]=!1;let rV=function e(t,r,n,o,a,i){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=a?n(t,o,a,i):n(t)),void 0!==s)return s;if(!(0,ev.A)(t))return t;var d=te(t);if(d){if(s=rk(t),!l)return eQ(t,s)}else{var p,f,m,h,g=rm(t),y=g==rL||"[object GeneratorFunction]"==g;if(ti(t))return eY(t,l);if(g==rF||g==rM||y&&!a){if(s=u||y?{}:e3(t),!l)return u?(f=(p=s)&&tb(t,tP(t),p),tb(t,rD(t),f)):(h=(m=s)&&tb(t,t6(t),m),tb(t,t1(t),h))}else{if(!rB[g])return a?t:{};s=rN(t,g,l)}}i||(i=new eB);var v=i.get(t);if(v)return v;i.set(t,s),rI(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):rA(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?r_:t5:u?tP:t6,w=d?void 0:b(t);return rx(w||t,function(o,a){w&&(o=t[a=o]),tv(s,a,e(o,r,n,a,t,i))}),s};var rU=r(1882),rW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rH=/^\w*$/;let rz=function(e,t){if(te(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rU.A)(e))||rH.test(e)||!rW.test(e)||null!=t&&e in Object(t)};function rK(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(rK.Cache||eF),r}rK.Cache=eF;var rG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rZ=/\\(\\)?/g,rY=(q=(Y=rK(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rG,function(e,r,n,o){t.push(n?o.replace(rZ,"$1"):r||e)}),t},function(e){return 500===q.size&&q.clear(),e})).cache,Y),rq=1/0,rJ=tW.A?tW.A.prototype:void 0,rX=rJ?rJ.toString:void 0;let rQ=function e(t){if("string"==typeof t)return t;if(te(t))return rE(t,e)+"";if((0,rU.A)(t))return rX?rX.call(t):"";var r=t+"";return"0"==r&&1/t==-rq?"-0":r},r0=function(e){return null==e?"":rQ(e)},r1=function(e,t){return te(e)?e:rz(e,t)?[e]:rY(r0(e))},r2=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r4=1/0;let r3=function(e){if("string"==typeof e||(0,rU.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r4?"-0":t},r6=function(e,t){t=r1(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r3(t[r++])];return r&&r==n?e:void 0},r5=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a},r9=function(e,t){var r,n;return t=r1(t,e),r=e,null==(e=(n=t).length<2?r:r6(r,r5(n,0,-1)))||delete e[r3(r2(t))]},r8=function(e){return ef(e)?void 0:e};var r7=tW.A?tW.A.isConcatSpreadable:void 0;let ne=function(e){return te(e)||e7(e)||!!(r7&&e&&e[r7])},nt=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=ne),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tY(a,l):o||(a[a.length]=l)}return a};var nr=tI(tA(J=function(e,t){var r={};if(null==e)return r;var n=!1;t=rE(t,function(t){return t=r1(t,e),n||(n=t.length>1),t}),tb(e,r_(e),r),n&&(r=rV(r,7,r8));for(var o=t.length;o--;)r9(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nt(e,1):[]}),J+""),nn=((X={}).Array="Array",X.Boolean="Boolean",X.ConceptUuid="ConceptUuid",X.Number="Number",X.Object="Object",X.String="String",X.UUID="UUID",X.PersonAttributeTypeUuid="PersonAttributeTypeUuid",X.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",X);function no(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let na=no(e=>Array.isArray(e),"must be an array"),ni=no(e=>"boolean"==typeof e,"must be a boolean"),ns=no(e=>"number"==typeof e,"must be a number"),nl=no(e=>"string"==typeof e,"must be a string"),nu=no(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nc=no(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string"),nd=F("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),np=F("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});np.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nf=F("config-store-of-extension-state",{mountedExtensions:[]});function nm(e){return V(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function nh(){return V("config-extension-slots",{slots:{}})}function ng(e){return ny(nh().getState(),e)}function ny(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nv(){return V("config-extensions",{configs:{}})}function nb(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let r=nv(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),a=n(r);O(o,a)||e(o,a)})}}function nw(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nE(e,t,r){return e.configure?.[r]??null}let nx=j()(()=>({config:{}})),nD=0,n_=!0,nS=!1;function nk(e){n=e}function nC(){n_=!0,nD>0&&nP()}function nP(){if(n_&&n&&!nS){nS=!0,n_=!1;try{n()}catch(e){n_=!0,nO(e),console.error("Failed to derive the implementer tools config",e)}finally{nS=!1}}}function nO(e){nx.setState({derivationError:e instanceof Error?e.message:String(e)})}function nR(){nx.getState().derivationError&&nx.setState({derivationError:void 0})}let nT=B("config-implementer-tools",{...nx,getState:()=>(0===nD&&nP(),nx.getState()),setState:(...e)=>(n_=!1,nx.setState(...e)),subscribe(e){nD++,nP();let t=nx.subscribe(e),r=!1;return()=>{!r&&(r=!0,nD--),t()}}});function nN(e,t){if(Array.isArray(t))return t}function nj(e,t){return tF({},e,t,nN)}let nA=[];function n$(){let e=nd.getState(),t=np.getState(),r=nf.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nm(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nL.get(r);if(s&&s.schema===a&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=i?function(e,t,r){let n=t.schemas[e],o=n0(e,nX(t,r));n2(n,o,e);let a=n5(n,o);return n4(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=n5(oo,n0(e,nX(t,r)));return n4(oo,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nL.set(r,{schema:a,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&rw(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n1(nX(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,a=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));a.length&&oe(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||oe(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||oe(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||oe(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!n8(e.configure)&&oe(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let a={},i={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))a[t]=r,r.configure&&(i[t]??(i[t]=[])).push(r.configure);for(let[e,t]of Object.entries(i)){let r=1===t.length?t[0]:n1(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=nh(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rw(e.config,a)?n[t]=e:(n[t]={loaded:!0,config:a},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=nv(),a=o.getState().configs,i={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,a,i){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=nY.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===a.config)return c.config;let d=l?s:t,p=nX(o,a),f=i?.configure?.[n]??{},m=n0(e,p),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n1([n0(d,p),f,h]),y=l??o.schemas[t];n2(y,g,d);let v=n5(y,g);return n4(y,v,d),delete v.extensionSlots,nY.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=a[o.slotName]?.[o.extensionId],c=u?.loaded&&rw(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),i[o.slotName]||(i[o.slotName]={}),i[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(i)){let r=a[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(i[e]=r)}s||(s=Object.keys(a).length!==Object.keys(i).length||Object.values(a).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:i})}(e,r,t,n),nC()}function nI(){n=()=>{var e,t;let r,n;return e=nd.getState(),t=np.getState(),r=nT.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=nJ.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:n8(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rV(n,5));nJ.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let a={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),i=n.map(([,e])=>e),s=nq.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===i[t])){a[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nj(l,function e(t,r){return n8(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),nq.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rw(r.config,n.config)||nT.setState(n))},n$(),nA.push(nd.subscribe(nM),np.subscribe(nM),nf.subscribe(nM))}function nM(){nR();try{n$()}catch(e){nO(e),console.error("Failed to recompute the configuration",e)}}nI();let nL=new Map;function nF(e,t){nQ(e,t);let r=nj(t,oo);nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nB(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:oo}}))}function nV(e){nd.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nU(e){nd.setState(t=>({...t,schemas:{...t.schemas,[e]:on}}))}function nW(e,t){nQ(e,t);let r=nj(t,oo);nd.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),nd.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nH(e,t="provided"){nd.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nz(e,t,r){return new Promise(n=>{let o,a=!1;function i(e){!a&&t(e)&&(a=!0,n(r(e)),o?.())}i(e.getState()),a||(o=e.subscribe(i))})}function nK(e){return nz(nm(e),e=>!!(e.loaded&&e.config),e=>nr(e.config,["Display conditions","Translation overrides"]))}function nG(e,t,r){let n=[nz(nm(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(nz(nb(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function nZ(e,t,r){n2(e,t,r);let n=n5(e,t);return n4(e,n,r),n}let nY=new Map,nq=new Map,nJ=new Map;function nX(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function nQ(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let a=r+(r&&".")+o,i=t[o];if("Display conditions"===a&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===a&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!n8(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||nQ(e,i,a);let s=i._elements;if(n9(s)&&nQ(e,s,a+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${n}.
4
4
 
@@ -9,24 +9,24 @@ If you're the maintainer: the allowed types are ${Object.values(nn).join(", ")}.
9
9
  If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![nn.Array,nn.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${a}'. ${n}.
10
10
 
11
11
  If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function n0(e,t){return n1(t.map(({[e]:t})=>t).filter(e=>!!e))}function n1(e){return e.reduce((e,t)=>tF(e,t,nN),{})}function n2(e,t,r=""){for(let n of Object.keys(t)){let o=t[n],a=r+"."+n,i=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&oe(a,`Unknown config key '${a}' provided. Ignoring.`);continue}(function e(t,r,n){n3(n,t._type,r),n8(r)?t._type===nn.Object?function(t,r,n){if(t._elements)for(let o of Object.keys(r)){let a=r[o];e(t._elements,a,`${n}.${o}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||n2(t,r,n):t._type===nn.Array&&function(t,r,n){if(n3(n,nn.Array,r)){if(n9(t._elements))for(let o=0;o<r.length;o++)e(t._elements,r[o],`${n}[${o}]`);for(let e=0;e<r.length;e++)n3(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(i,o,a)}}function n4(e,t,r=""){if(e){if(t!==e._default&&n6(r,e._validators,t),n8(t))for(let n of Object.keys(t)){let o=t[n],a=r+"."+n,i=e[n];e._type===nn.Object&&e._elements?n4(e._elements,o,a):n4(i,o,a)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)n4(e._elements,t[n],`${r}[${n}]`)}}function n3(e,t,r){return!t||n6(e,[{Array:na,Boolean:ni,ConceptUuid:nc,Number:ns,Object:nu,String:nl,UUID:nc,PersonAttributeTypeUuid:nc,PatientIdentifierTypeUuid:nc}[t]],r)}function n6(e,t,r){let n=!0;if(t)try{for(let o of t){let t=o(r);if("string"==typeof t){let o="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;oe(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
- ${t}`)}return n}let n5=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&n9(e)){if(o._type===nn.Array&&Array.isArray(n)){let o=n.map(t=>n5(e,t));r[t]=o}else if(o._type===nn.Object)for(let t of Object.keys(n))n[t]=n5(e,n[t])}}else if(n8(o)){let e=n??{};n8(e)&&(r[t]=n5(o,e))}}return r};function n9(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function n8(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let n7=new Set;function oe(e,t){let r=`${e}:::${t}`;n7||(n7=new Set),n7.has(r)||(console.error(t),n7.add(r))}function ot(e){e?n7.forEach(t=>{t.startsWith(e)&&n7.delete(t)}):n7.clear()}function or(){nA.forEach(e=>e()),nA.length=0,nL.clear(),nY.clear(),nJ.clear(),nq.clear(),nI()}let on={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:nn.Object,_default:{},_validators:[no(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},oo={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:nn.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:nn.String,_default:void 0}},...on},oa=(e,t)=>no(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),oi=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return no(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},os=oi([]),ol=e=>no(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),ou={inRange:oa,isUrl:os,isUrlWithTemplateParameters:oi,oneOf:ol};var oc=r(8067);let od=F("breadcrumbs",[]);function op(e){return of([e])}function of(e){let t=[...om(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,oc.pathToRegexp)(e.matcher).regexp:(0,oc.pathToRegexp)(e.path).regexp,settings:e}))];od.setState(t,!0)}function om(){return od.getState()}function oh(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=oh(e,r.join("/"));if(t)return t}}(e,t)}function og(e,t){if(e.length>0){let r=oh(e,t);if(r){let t=[r],n=oh(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=oh(e,n.settings.parent);return t.reverse()}}return[]}function oy(e){return og(om(),e)}var ov=Object.freeze({__proto__:null,get start(){return aU},get ensureJQuerySupport(){return ay},get setBootstrapMaxTime(){return o8},get setMountMaxTime(){return o7},get setUnmountMaxTime(){return ae},get setUnloadMaxTime(){return at},get registerApplication(){return aP},get unregisterApplication(){return aR},get getMountedApps(){return a_},get getAppStatus(){return ak},get unloadApplication(){return aT},get checkActivityFunctions(){return aO},get getAppNames(){return aS},get pathToActiveWhen(){return aA},get navigateToUrl(){return al},get patchHistoryApi(){return am},get triggerAppChange(){return aL},get addErrorHandler(){return oD},get removeErrorHandler(){return o_},get mountRootParcel(){return o4},get NOT_LOADED(){return oC},get LOADING_SOURCE_CODE(){return oP},get NOT_BOOTSTRAPPED(){return oO},get BOOTSTRAPPING(){return oR},get NOT_MOUNTED(){return oT},get MOUNTING(){return oN},get UPDATING(){return oA},get LOAD_ERROR(){return oM},get MOUNTED(){return oj},get UNLOADING(){return oI},get UNMOUNTING(){return o$},get SKIP_BECAUSE_BROKEN(){return oL}}),ob=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,ow=!function(){try{var e=new ob("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:ob;let oE=[];function ox(e,t,r){let n=ok(e,t,r);oE.length?oE.forEach(e=>e(n)):setTimeout(()=>{throw n})}function oD(e){if("function"!=typeof e)throw Error(oS(28,!1));oE.push(e)}function o_(e){if("function"!=typeof e)throw Error(oS(29,!1));let t=!1;return oE=oE.filter(r=>{let n=r===e;return t=t||n,!n}),t}function oS(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function ok(e,t,r){let n,o=`${oW(t)} '${oV(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(oS(30,!1,t.status,oV(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=oV(t),t.status=r,n}let oC="NOT_LOADED",oP="LOADING_SOURCE_CODE",oO="NOT_BOOTSTRAPPED",oR="BOOTSTRAPPING",oT="NOT_MOUNTED",oN="MOUNTING",oj="MOUNTED",oA="UPDATING",o$="UNMOUNTING",oI="UNLOADING",oM="LOAD_ERROR",oL="SKIP_BECAUSE_BROKEN";function oF(e){return e.status===oj}function oB(e){try{return e.activeWhen(window.location)}catch(t){return ox(t,e,oL),!1}}function oV(e){return e.name}function oU(e){return!!e.unmountThisParcel}function oW(e){return oU(e)?"parcel":"application"}function oH(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function oz(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function oK(e){return e&&("function"==typeof e||Array.isArray(e)&&!oz(e,e=>"function"!=typeof e))}function oG(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=oW(e),o=oV(e);return function(e){return r.reduce((r,a,i)=>r.then(()=>{let r=a(e);return oZ(r)?r:Promise.reject(oS(15,!1,n,o,t,i))}),Promise.resolve())}}function oZ(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let oY=[];function oq(e,t){return Promise.resolve().then(()=>e.status!==oO?e:(e.status=oR,e.bootstrap?ar(e,"bootstrap").then(r).catch(r=>{if(t)throw ok(r,e,oL);return ox(r,e,oL),e}):Promise.resolve().then(r)));function r(){return e.status=oT,e}}function oJ(e,t){return Promise.resolve().then(()=>{if(e.status!==oj)return e;return e.status=o$,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw ok(r,e,oL);ox(r,e,oL)})).then(()=>e);function r(){return ar(e,"unmount").then(()=>{e.status=oT},r=>{if(t)throw ok(r,e,oL);ox(r,e,oL)})}})}let oX=!1,oQ=!1;function o0(e,t){return Promise.resolve().then(()=>e.status!==oT?e:(oX||(window.dispatchEvent(new ow("single-spa:before-first-mount")),oX=!0),e.status=oN,ar(e,"mount").then(()=>(e.status=oj,oQ||(window.dispatchEvent(new ow("single-spa:first-mount")),oQ=!0),e)).catch(r=>{return e.status=oj,oJ(e,!0).then(n,n);function n(){if(t)throw ok(r,e,oL);return ox(r,e,oL),e}})))}let o1=0,o2={parcels:{}};function o4(){return o3.apply(o2,arguments)}function o3(e,t){let r,n,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(oS(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(oS(3,!1,typeof e.name));let i=o1++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(oS(4,!1,s,typeof t));if(!t.domElement)throw Error(oS(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?oP:oO,customProps:t,parentName:oV(a),unmountThisParcel:()=>f.then(()=>{if(c.status!==oj)throw Error(oS(6,!1,s,c.status));return oJ(c,!0)}).then(e=>(c.parentName&&delete a.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=oL,o(e),e})};a.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(oS(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(oS(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!oK(e.bootstrap))throw Error(oS(9,!1,s));if(!oK(e.mount))throw Error(oS(10,!1,s));if(!oK(e.unmount))throw Error(oS(11,!1,s));if(e.update&&!oK(e.update))throw Error(oS(12,!1,s));let t=oG(e,"bootstrap"),n=oG(e,"mount"),o=oG(e,"unmount");c.status=oO,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=an(e.timeouts),e.update&&(c.update=oG(e,"update"),r.update=function(e){return c.customProps=e,o6(Promise.resolve().then(()=>{if(c.status!==oj)throw Error(oS(32,!1,oV(c)));return c.status=oA,ar(c,"update").then(()=>(c.status=oj,c)).catch(e=>{throw ok(e,c,oL)})}))})})).then(()=>oq(c,!0)),f=p.then(()=>o0(c,!0)),m=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>o6(Promise.resolve().then(()=>{if(c.status!==oT)throw Error(oS(13,!1,s,c.status));return a.parcels[i]=c,o0(c)})),unmount:()=>o6(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:o6(d),bootstrapPromise:o6(p),mountPromise:o6(f),unmountPromise:o6(m)}}function o6(e){return e.then(()=>null)}function o5(e){let t=oV(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(oS(40,!1),t,r));let n=oH({},r,{name:t,mountParcel:o3.bind(e),singleSpa:ov});return oU(e)&&(n.unmountSelf=e.unmountThisParcel),n}let o9={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function o8(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(16,!1));o9.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function o7(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(17,!1));o9.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ae(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(18,!1));o9.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function at(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(19,!1));o9.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ar(e,t){let r=e.timeouts[t],n=r.warningMillis,o=oW(e);return new Promise((a,i)=>{let s=!1,l=!1;e[t](o5(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=oS(31,!1,t,o,oV(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function an(e){let t={};for(let r in o9)t[r]=oH({},o9[r],e&&e[r]||{});return t}function ao(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oC&&e.status!==oM?e:(e.status=oP,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(o5(e));if(!oZ(n))throw r=!0,Error(oS(33,!1,oV(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!oK(t.bootstrap)&&(n=35),oK(t.mount)||(n=36),oK(t.unmount)||(n=37);let o=oW(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(oS(n,!1,o,oV(e),r),t),ox(void 0,e,oL),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=oH({},e.devtools.overlays,t.devtools.overlays)),e.status=oO,e.bootstrap=oG(t,"bootstrap"),e.mount=oG(t,"mount"),e.unmount=oG(t,"unmount"),e.unload=oG(t,"unload"),e.timeouts=an(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=oL:(n=oM,e.loadErrorTime=(new Date).getTime()),ox(t,e,n),e}))})}let aa="u">typeof window,ai={hashchange:[],popstate:[]},as=["hashchange","popstate"];function al(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(oS(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=ah(window.location.href),n=ah(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function au(e){if(e){let t=e[0].type;as.indexOf(t)>=0&&ai[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function ac(){aF([],arguments)}function ad(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),a=window.location.href;return o&&r===a||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let ap=null,af=!1;function am(e){if(af)throw Error(oS(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,af=!0,ap=window.history.replaceState,window.addEventListener("hashchange",ac),window.addEventListener("popstate",ac);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&as.indexOf(e)>=0)||oz(ai[e],e=>e===r))return t.apply(this,arguments);ai[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&as.indexOf(e)>=0&&(ai[e]=ai[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ad(window.history.pushState,"pushState"),window.history.replaceState=ad(ap,"replaceState")}function ah(e){let t=document.createElement("a");return t.href=e,t}aa&&(window.singleSpaNavigate?console.warn(oS(41,!1)):window.singleSpaNavigate=al);let ag=!1;function ay(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ag){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return av.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return av.call(this,r,window.removeEventListener,e,t,arguments)},ag=!0}}function av(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{as.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let ab={};function aw(e){return Promise.resolve().then(()=>{let t=ab[oV(e)];if(!t)return e;if(e.status===oC)return aE(e,t),e;if(e.status===oI)return t.promise.then(()=>e);if(e.status!==oT&&e.status!==oM)return e;let r=e.status===oM?Promise.resolve():ar(e,"unload");return e.status=oI,r.then(()=>(aE(e,t),e)).catch(r=>(delete ab[oV(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,ox(r,e,oL),t.reject(r),e))})}function aE(e,t){delete ab[oV(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oC,t.resolve()}function ax(e,t,r,n){ab[oV(e)]={app:e,resolve:r,reject:n},Object.defineProperty(ab[oV(e)],"promise",{get:t})}let aD=[];function a_(){return aD.filter(oF).map(oV)}function aS(){return aD.map(oV)}function ak(e){let t=oz(aD,t=>oV(t)===e);return t?t.status:null}let aC=!1;function aP(e,t,r,n){var o,a;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(oS(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(oS(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(oS(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(oS(24,!1));if(!aj(e.customProps))throw Error(oS(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(oS(20,!1));if(!t)throw Error(oS(23,!1));if("function"!=typeof r)throw Error(oS(24,!1));if(!aj(n))throw Error(oS(22,!1))}(e,t,r,n),i.name=e,i.loadApp=t,i.activeWhen=r,i.customProps=n),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(a=i.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:aA(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(aV||aC||(aC=!0,setTimeout(()=>{aV||console.warn(oS(1,!1))},5e3)),-1!==aS().indexOf(l.name))throw Error(oS(21,!1,l.name));aD.push(oH({loadErrorTime:null,status:oC,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),aa&&(ay(),aF())}function aO(e=window.location){return aD.filter(t=>t.activeWhen(e)).map(oV)}function aR(e){if(0===aD.filter(t=>oV(t)===e).length)throw Error(oS(25,!1,e));return(aa?aT(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=aD.map(oV).indexOf(e);aD.splice(t,1)})}function aT(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(oS(26,!1));let r=oz(aD,t=>oV(t)===e);if(!r)throw Error(oS(27,!1,e));let n=ab[oV(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{ax(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,aN(r,n.resolve,n.reject)):e=new Promise((t,n)=>{ax(r,()=>e,t,n),aN(r,t,n)}),e}}function aN(e,t,r){Promise.resolve().then(()=>{if(oz(aO(),t=>t===oV(e)))return aL()}).then(()=>oJ(e).then(aw).then(()=>{t(),setTimeout(()=>{aF()})})).catch(r)}function aj(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function aA(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&a(t)}return a(e.length),RegExp(o,"i");function a(a){let i=e.slice(r,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":i,a===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let a$=!1,aI=[],aM=aa&&window.location.href;function aL(){return aF()}function aF(e=[],t,r=!1){let n,o,a,i,s;if(a$)return new Promise((e,r)=>{aI.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],a=[],i=[],s=(new Date).getTime(),aD.forEach(e=>{let t=e.status!==oL&&oB(e);switch(e.status){case oM:t&&s-e.loadErrorTime>=200&&a.push(e);break;case oC:case oP:t&&a.push(e);break;case oO:case oT:!t&&ab[oV(e)]?n.push(e):t&&i.push(e);break;case oj:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:a,appsToMount:i}),p,f=[],m=aM,h=aM=window.location.href;return aV?(a$=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(f).then(r=>{if(r.some(e=>e))return ap.call(window.history,history.state,"",m.substring(location.origin.length)),aM=location.href,a$=!1,aF(e,t,!0);let n=l.map(aw),o=Promise.all(u.map(oJ).map(e=>e.then(aw)).concat(n));o.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let a=c.map(e=>ao(e).then(e=>aB(e,o))),i=d.filter(e=>0>c.indexOf(e)).map(e=>aB(e,o));return o.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(a.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(ao)).then(v).then(()=>[]).catch(e=>{throw v(),e}).finally(()=>{})));function g(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(oS(42,!1))),console.warn(e),!1)))}function y(){let t=a_();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(a$=!1,aI.length>0){let e=aI;aI=[],aF(e)}return t}function v(){r||(e.forEach(e=>{au(e.eventArguments)}),au(t))}function b(e=!1,r){let n={},o={[oj]:[],[oT]:[],[oC]:[],[oL]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,oj)}),l.forEach(e=>{i(e,oC)}),u.forEach(e=>{i(e,oT)})):p.forEach(e=>{i(e)});let a={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:m,newUrl:h}};return r&&oH(a.detail,r),a;function i(e,t){let r=oV(e);t=t||ak(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new ow(`single-spa:${e}`,t))}}function aB(e,t){return oB(e)?oq(e).then(e=>t.then(()=>oB(e)?o0(e):e)):t.then(()=>e)}let aV=!1;function aU(e){aV=!0,aa&&(am(e),aF())}aa&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...aD]},reroute:aF,NOT_LOADED:oC,toLoadPromise:ao,toBootstrapPromise:oq,unregisterApplication:aR,getProfilerData:function(){return oY}});let aW={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var aH=r(2284),az=r(3029),aK=r(2901);function aG(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var aZ=r(3662);function aY(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,aZ.A)(e,t)}function aq(e,t){if(t&&("object"==(0,aH.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return aG(e)}function aJ(e){return(aJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aX=r(4467),aQ=r(6369),a0=r(3612),a1=r(6562);function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var a3={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},a6=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,az.A)(this,e),this.init(t,r)}return(0,aK.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||a3,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a4(a4({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),a5=function(){function e(){(0,az.A)(this,e),this.observers={}}return(0,aK.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function a9(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function a8(e){return null==e?"":""+e}function a7(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=n(a.shift());!e[i]&&r&&(e[i]=new r),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return o()?{}:{obj:e,k:n(a.shift())}}function ie(e,t,r){var n=a7(e,t,Object);n.obj[n.k]=r}function it(e,t){var r=a7(e,t),n=r.obj,o=r.k;if(n)return n[o]}function ir(e,t,r){var n=it(e,r);return void 0!==n?n:it(t,r)}function io(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ia={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ii(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return ia[e]}):e}var is="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,il=[" ",",","?","!",";"];function iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ic(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var id=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,az.A)(this,n),t=r.call(this),is&&a5.call(aG(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,aK.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,i=[e,t];r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split("."));var s=it(this.data,i);return s||!a||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),a=t,i=0;i<o.length;++i){if(!a||"string"==typeof a[o[i]]&&i+1<o.length)return;if(void 0===a[o[i]]){for(var s=2,l=o.slice(i,i+s).join(n),u=a[l];void 0===u&&o.length>i+s;)s++,u=a[l=o.slice(i,i+s).join(n)];if(void 0===u)return;if(null===u)return null;if(r.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=o.slice(i+s).join(n);if(c)return e(u,c,n);return}a=a[o[i]]}return a}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var i=[e,t];r&&(i=i.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),ie(this.data,i,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=r,r=t,t=i[1]),this.addNamespaces(t);var s=it(this.data,i)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=ic(ic({},s),r),ie(this.data,i,s),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?ic(ic({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(a5),ip={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,r,n,o))}),t}};function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?im(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ig={},iy=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e){var t,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,az.A)(this,n),a=r.call(this),is&&a5.call(aG(a)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=aG(a),t.forEach(function(t){e[t]&&(o[t]=e[t])}),a.options=i,void 0===a.options.keySeparator&&(a.options.keySeparator="."),a.logger=a6.create("translator"),a}return(0,aK.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=r&&e.indexOf(r)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=il.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(r);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}(e,r,n);if(a&&!i){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,aH.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var f=t.nsSeparator||this.options.nsSeparator;return a?(m.res="".concat(c).concat(f).concat(l),m):"".concat(c).concat(f).concat(l)}return a?(m.res=l,m):l}var m=this.resolve(e,t),h=m&&m.res,g=m&&m.usedKey||l,y=m&&m.exactUsedKey||l,v=Object.prototype.toString.apply(h),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&E&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(v)&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,ih(ih({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(m.res=x,m):x}if(i){var D="[object Array]"===v,_=D?[]:{},S=D?y:g;for(var k in h)if(Object.prototype.hasOwnProperty.call(h,k)){var C="".concat(S).concat(i).concat(k);_[k]=this.translate(C,ih(ih({},t),{joinArrays:!1,ns:u})),_[k]===C&&(_[k]=h[k])}h=_}}else if(w&&"string"==typeof b&&"[object Array]"===v)(h=h.join(b))&&(h=this.extendTranslation(h,e,t,r));else{var P=!1,O=!1,R=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),N=R?this.pluralResolver.getSuffix(d,t.count,t):"",j=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(h)&&T&&(P=!0,h=j),this.isValidLookup(h)||(O=!0,h=l);var A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:h,$=T&&j!==h&&this.options.updateMissing;if(O||P||$){if(this.logger.log($?"updateKey":"missingKey",d,c,l,$?j:h),i){var I=this.resolve(l,ih(ih({},t),{},{keySeparator:!1}));I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)M.push(L[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var B=function(e,r,n){var a=T&&n!==h?n:A;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,a,$,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,a,$,t),o.emit("missingKey",e,c,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){B([e],l+r,t["defaultValue".concat(r)]||j)})}):B(M,l,j))}h=this.extendTranslation(h,e,t,m,r),O&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(l)),(O||P)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,P?h:void 0):this.options.parseMissingKeyHandler(h))}return a?(m.res=h,m):h}},{key:"extendTranslation",value:function(e,t,r,n,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,ih(ih({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(ih(ih({},r),{interpolation:ih(ih({},this.options.interpolation),r.interpolation)}));var i,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);i=l&&l.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=ih(ih({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);i<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return o&&o[0]===n[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):a.translate.apply(a,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=ip.handle(p,e,t,this.options&&this.options.postProcessPassResolved?ih({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,a,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!i.isValidLookup(t)){var l=i.extractFromKey(e,s),u=l.key;r=u;var c=l.namespaces;i.options.fallbackNS&&(c=c.concat(i.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,p=d&&!s.ordinal&&0===s.count&&i.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);c.forEach(function(e){i.isValidLookup(t)||(a=e,!ig["".concat(m[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(ig["".concat(m[0],"-").concat(e)]=!0,i.logger.warn('key "'.concat(r,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(function(r){if(!i.isValidLookup(t)){o=r;var a,l=[u];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(l,u,r,e,s);else{d&&(c=i.pluralResolver.getSuffix(r,s.count,s));var c,m="".concat(i.options.pluralSeparator,"zero");if(d&&(l.push(u+c),p&&l.push(u+m)),f){var h="".concat(u).concat(i.options.contextSeparator).concat(s.context);l.push(h),d&&(l.push(h+c),p&&l.push(h+m))}}for(;a=l.pop();)i.isValidLookup(t)||(n=a,t=i.getResource(r,e,a,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(a5);function iv(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ib=function(){function e(t){(0,az.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=a6.create("languageUtils")}return(0,aK.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iv(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iv(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=iv(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],a=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&a(r.formatLanguageCode(e))}),o}}]),e}(),iw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iE={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},ix=["v1","v2","v3"],iD={zero:0,one:1,two:2,few:3,many:4,other:5},i_=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,az.A)(this,e),this.languageUtils=t,this.options=n,this.logger=a6.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},iw.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iE[e.fc]}})}),r)}return(0,aK.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return iD[e]-iD[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!ix.includes(this.options.compatibilityJSON)}}]),e}();function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ik(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iC=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,az.A)(this,e),this.logger=a6.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,aK.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ii,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?io(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?io(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?io(t.nestingPrefix):t.nestingPrefixEscaped||io("$t("),this.nestingSuffix=t.nestingSuffix?io(t.nestingSuffix):t.nestingSuffixEscaped||io(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,a,i,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=ir(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,ik(ik(ik({},n),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),u=a.join(s.formatSeparator).trim();return s.format(ir(t,l,i),u,r,ik(ik(ik({},n),t),{},{interpolationkey:i}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach(function(t){for(i=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(a=c(r)))if("function"==typeof d){var l=d(e,o,n);a="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))a="";else if(p){a=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=a8(a));var u=t.safeValue(a);if(e=e.replace(o[0],u),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++i>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=ik({},a);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=ik(ik({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),l=c,u=!0}if((n=t(s.call(this,r[1].trim(),i),i))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=a8(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=l.reduce(function(e,t){return o.format(e,t,a.lng,ik(ik({},a),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function iP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iR(e){var t={};return function(r,n,o){var a=n+JSON.stringify(o),i=t[a];return i||(i=e(n,o),t[a]=i),i(r)}}var iT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,az.A)(this,e),this.logger=a6.create("formatter"),this.options=t,this.formats={number:iR(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:iR(function(e,t){var r=new Intl.NumberFormat(e,iO(iO({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:iR(function(e,t){var r=new Intl.DateTimeFormat(e,iO({},t));return function(e){return r.format(e)}}),relativetime:iR(function(e,t){var r=new Intl.RelativeTimeFormat(e,iO({},t));return function(e){return r.format(e,t.range||"day")}}),list:iR(function(e,t){var r=new Intl.ListFormat(e,iO({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,aK.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=iR(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var a=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,aQ.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,a0.A)(t)||(0,a1.A)()),o=n[0],a=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=a),"false"===a&&(r[o.trim()]=!1),"true"===a&&(r[o.trim()]=!0),isNaN(a)||(r[o.trim()]=parseInt(a,10))}})}return{formatName:t,formatOptions:r}}(t),i=a.formatName,s=a.formatOptions;if(o.formats[i]){var l=e;try{var u=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=u.locale||u.lng||n.locale||n.lng||r;l=o.formats[i](e,c,iO(iO(iO({},s),n),u))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(i)),e},e)}}]),e}();function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ij(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iN(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iA=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e,t,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,az.A)(this,n),a=r.call(this),is&&a5.call(aG(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=a6.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=i.maxParallelReads||10,a.readingCalls=0,a.maxRetries=i.maxRetries>=0?i.maxRetries:5,a.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,i.backend,i),a}return(0,aK.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,a={},i={},s={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===i[s]&&(i[s]=!0):(o.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],a=n[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r),this.state[e]=t?-1:2;var i={};this.queue.forEach(function(r){var n,s,l,u;n=r.loaded,(l=(s=a7(n,[o],Object)).obj)[u=s.k]=l[u]||[],l[u].push(a),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){i[e]||(i[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===i[e][t]&&(i[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:i}):(this.readingCalls++,this.backend[r](e,t,function(s,l){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*a,i)},a):i(s,l)})):i(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,n,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],a=n[1];this.read(o,a,"read",void 0,void 0,function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,n,i)})}},{key:"saveMissing",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ij(ij({},a),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(a5);function i$(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function iI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iI(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iL(){}var iF=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if((0,az.A)(this,n),t=r.call(this),is&&a5.call(aG(t)),t.options=i$(o),t.services={},t.logger=a6,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=aG(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),a&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,a),aq(t,aG(t));setTimeout(function(){t.init(o,a)},0)}return t}return(0,aK.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,aH.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,aH.A)(e[2])||"object"===(0,aH.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=iM(iM(iM({},n),this.options),i$(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=iM(iM({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?a6.init(o(this.modules.logger),this.options):a6.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"u">typeof Intl&&(a=iT);var a,i=new ib(this.options);this.store=new id(this.options.resources,this.options);var s=this.services;s.logger=a6,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new i_(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(a),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new iC(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new iA(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new iy(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=iL),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var u=a9(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iL,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var a=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return i(e)}),this.options.preload&&this.options.preload.forEach(function(e){return i(e)}),this.services.backendConnector.load(a,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=a9();return e||(e=this.languages),t||(t=this.options.ns),r||(r=iL),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ip.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=a9();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},a=function(e,a){a?(o(a),r.translator.changeLanguage(a),r.isLanguageChangingTo=void 0,r.emit("languageChanged",a),r.logger.log("languageChanged",a)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},i=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,aH.A)(o)){for(var a,i=arguments.length,s=Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];a=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else a=iM({},o);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",c=a.keyPrefix?"".concat(a.keyPrefix).concat(u).concat(t):t;return n.t(c,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,i);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!o||i(a,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=a9();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=a9();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iL,o=iM(iM(iM({},this.options),t),{isClone:!0}),a=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=iM({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new iy(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];a.emit.apply(a,[e].concat(r))}),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(a5);(0,aX.A)(iF,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iF(e,t)});var iB=iF.createInstance();iB.createInstance=iF.createInstance,iB.createInstance,iB.init,iB.loadResources,iB.reloadResources,iB.use,iB.changeLanguage,iB.getFixedT,iB.t,iB.exists,iB.setDefaultNamespace,iB.hasLoadedNamespace,iB.loadNamespaces,iB.loadLanguages;let iV=iB.default||iB;function iU(e,t,r,n){return iV.t(t,{ns:e,defaultValue:r,...n})}function iW(e,t,r){return aW[e]?iU("core",e,t??aW[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iH(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iz(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function iz(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function iK({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iH(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(iW("navigateNonHttp"));n.startsWith(r)?al(n):window.location.assign(n)}iV.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iG="openmrs:history";function iZ(e){let t=JSON.parse(sessionStorage.getItem(iG)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iG,JSON.stringify(t))}function iY(){0===JSON.parse(sessionStorage.getItem(iG)??"[]").length&&document.referrer&&iZ(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=iq();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iG,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?iJ({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iZ(window.location.href)})}function iq(){return JSON.parse(sessionStorage.getItem(iG)??"[]")}function iJ({toUrl:e}){let t=iq(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);iK({to:t[r]}),sessionStorage.setItem(iG,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function iX(){sessionStorage.removeItem(iG)}let iQ="${openmrsSpaBase}/login",i0={redirectAuthFailure:{enabled:{_type:nn.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:nn.String,_default:iQ,_validators:[ou.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:nn.Array,_default:[401],_elements:{_type:nn.Number,_validators:[ou.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:nn.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:nn.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function i1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i2="/ws/rest/v1",i4="/ws/fhir2/R4",i3=`${i2}/session`;function i6(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function i5(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=i6(e);t.headers||(t.headers={}),ef(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;let n=!1;try{let e=new URL(r,window.location.href),t=new URL(i6(i2),window.location.href),o=e.pathname.replace(/\/{2,}/g,"/"),a=t.pathname.replace(/\/{2,}/g,"/");n=e.origin===t.origin&&(o===a||o.startsWith(`${a}/`))}catch{}if(n){let e=!1;for(let[r,n]of Object.entries(t.headers))"disable-www-authenticate"===r.toLowerCase()&&(void 0===n?delete t.headers[r]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(i4)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let o=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:n}=await nK("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(n&&t&&(r===i6(i3)||204===e.status)&&iK({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return r===i6(i3)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(iX(),iK({to:t.url||e.headers.get("location")||iQ}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let n=t;try{n=JSON.parse(t)}catch(e){}throw new i9(r,e,n,o)},t=>{throw new i9(r,e,null,o)})})}class i9 extends Error{constructor(e,t,r,n){super(),i1(this,"response",void 0),i1(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
12
+ ${t}`)}return n}let n5=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&n9(e)){if(o._type===nn.Array&&Array.isArray(n)){let o=n.map(t=>n5(e,t));r[t]=o}else if(o._type===nn.Object)for(let t of Object.keys(n))n[t]=n5(e,n[t])}}else if(n8(o)){let e=n??{};n8(e)&&(r[t]=n5(o,e))}}return r};function n9(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function n8(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let n7=new Set;function oe(e,t){let r=`${e}:::${t}`;n7||(n7=new Set),n7.has(r)||(console.error(t),n7.add(r))}function ot(e){e?n7.forEach(t=>{t.startsWith(e)&&n7.delete(t)}):n7.clear()}function or(){nA.forEach(e=>e()),nA.length=0,nL.clear(),nY.clear(),nJ.clear(),nq.clear(),nI()}let on={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:nn.Object,_default:{},_validators:[no(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},oo={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:nn.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:nn.String,_default:void 0}},...on},oa=(e,t)=>no(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),oi=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return no(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},os=oi([]),ol=e=>no(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),ou={inRange:oa,isUrl:os,isUrlWithTemplateParameters:oi,oneOf:ol};var oc=r(8067);let od=F("breadcrumbs",[]);function op(e){return of([e])}function of(e){let t=[...om(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,oc.pathToRegexp)(e.matcher).regexp:(0,oc.pathToRegexp)(e.path).regexp,settings:e}))];od.setState(t,!0)}function om(){return od.getState()}function oh(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=oh(e,r.join("/"));if(t)return t}}(e,t)}function og(e,t){if(e.length>0){let r=oh(e,t);if(r){let t=[r],n=oh(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=oh(e,n.settings.parent);return t.reverse()}}return[]}function oy(e){return og(om(),e)}var ov=Object.freeze({__proto__:null,get start(){return aU},get ensureJQuerySupport(){return ay},get setBootstrapMaxTime(){return o8},get setMountMaxTime(){return o7},get setUnmountMaxTime(){return ae},get setUnloadMaxTime(){return at},get registerApplication(){return aP},get unregisterApplication(){return aR},get getMountedApps(){return a_},get getAppStatus(){return ak},get unloadApplication(){return aT},get checkActivityFunctions(){return aO},get getAppNames(){return aS},get pathToActiveWhen(){return aA},get navigateToUrl(){return al},get patchHistoryApi(){return am},get triggerAppChange(){return aL},get addErrorHandler(){return oD},get removeErrorHandler(){return o_},get mountRootParcel(){return o4},get NOT_LOADED(){return oC},get LOADING_SOURCE_CODE(){return oP},get NOT_BOOTSTRAPPED(){return oO},get BOOTSTRAPPING(){return oR},get NOT_MOUNTED(){return oT},get MOUNTING(){return oN},get UPDATING(){return oA},get LOAD_ERROR(){return oM},get MOUNTED(){return oj},get UNLOADING(){return oI},get UNMOUNTING(){return o$},get SKIP_BECAUSE_BROKEN(){return oL}}),ob=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,ow=!function(){try{var e=new ob("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:ob;let oE=[];function ox(e,t,r){let n=ok(e,t,r);oE.length?oE.forEach(e=>e(n)):setTimeout(()=>{throw n})}function oD(e){if("function"!=typeof e)throw Error(oS(28,!1));oE.push(e)}function o_(e){if("function"!=typeof e)throw Error(oS(29,!1));let t=!1;return oE=oE.filter(r=>{let n=r===e;return t=t||n,!n}),t}function oS(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function ok(e,t,r){let n,o=`${oW(t)} '${oV(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(oS(30,!1,t.status,oV(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=oV(t),t.status=r,n}let oC="NOT_LOADED",oP="LOADING_SOURCE_CODE",oO="NOT_BOOTSTRAPPED",oR="BOOTSTRAPPING",oT="NOT_MOUNTED",oN="MOUNTING",oj="MOUNTED",oA="UPDATING",o$="UNMOUNTING",oI="UNLOADING",oM="LOAD_ERROR",oL="SKIP_BECAUSE_BROKEN";function oF(e){return e.status===oj}function oB(e){try{return e.activeWhen(window.location)}catch(t){return ox(t,e,oL),!1}}function oV(e){return e.name}function oU(e){return!!e.unmountThisParcel}function oW(e){return oU(e)?"parcel":"application"}function oH(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function oz(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function oK(e){return e&&("function"==typeof e||Array.isArray(e)&&!oz(e,e=>"function"!=typeof e))}function oG(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=oW(e),o=oV(e);return function(e){return r.reduce((r,a,i)=>r.then(()=>{let r=a(e);return oZ(r)?r:Promise.reject(oS(15,!1,n,o,t,i))}),Promise.resolve())}}function oZ(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let oY=[];function oq(e,t){return Promise.resolve().then(()=>e.status!==oO?e:(e.status=oR,e.bootstrap?ar(e,"bootstrap").then(r).catch(r=>{if(t)throw ok(r,e,oL);return ox(r,e,oL),e}):Promise.resolve().then(r)));function r(){return e.status=oT,e}}function oJ(e,t){return Promise.resolve().then(()=>{if(e.status!==oj)return e;return e.status=o$,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw ok(r,e,oL);ox(r,e,oL)})).then(()=>e);function r(){return ar(e,"unmount").then(()=>{e.status=oT},r=>{if(t)throw ok(r,e,oL);ox(r,e,oL)})}})}let oX=!1,oQ=!1;function o0(e,t){return Promise.resolve().then(()=>e.status!==oT?e:(oX||(window.dispatchEvent(new ow("single-spa:before-first-mount")),oX=!0),e.status=oN,ar(e,"mount").then(()=>(e.status=oj,oQ||(window.dispatchEvent(new ow("single-spa:first-mount")),oQ=!0),e)).catch(r=>{return e.status=oj,oJ(e,!0).then(n,n);function n(){if(t)throw ok(r,e,oL);return ox(r,e,oL),e}})))}let o1=0,o2={parcels:{}};function o4(){return o3.apply(o2,arguments)}function o3(e,t){let r,n,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(oS(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(oS(3,!1,typeof e.name));let i=o1++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(oS(4,!1,s,typeof t));if(!t.domElement)throw Error(oS(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?oP:oO,customProps:t,parentName:oV(a),unmountThisParcel:()=>f.then(()=>{if(c.status!==oj)throw Error(oS(6,!1,s,c.status));return oJ(c,!0)}).then(e=>(c.parentName&&delete a.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=oL,o(e),e})};a.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(oS(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(oS(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!oK(e.bootstrap))throw Error(oS(9,!1,s));if(!oK(e.mount))throw Error(oS(10,!1,s));if(!oK(e.unmount))throw Error(oS(11,!1,s));if(e.update&&!oK(e.update))throw Error(oS(12,!1,s));let t=oG(e,"bootstrap"),n=oG(e,"mount"),o=oG(e,"unmount");c.status=oO,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=an(e.timeouts),e.update&&(c.update=oG(e,"update"),r.update=function(e){return c.customProps=e,o6(Promise.resolve().then(()=>{if(c.status!==oj)throw Error(oS(32,!1,oV(c)));return c.status=oA,ar(c,"update").then(()=>(c.status=oj,c)).catch(e=>{throw ok(e,c,oL)})}))})})).then(()=>oq(c,!0)),f=p.then(()=>o0(c,!0)),m=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>o6(Promise.resolve().then(()=>{if(c.status!==oT)throw Error(oS(13,!1,s,c.status));return a.parcels[i]=c,o0(c)})),unmount:()=>o6(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:o6(d),bootstrapPromise:o6(p),mountPromise:o6(f),unmountPromise:o6(m)}}function o6(e){return e.then(()=>null)}function o5(e){let t=oV(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(oS(40,!1),t,r));let n=oH({},r,{name:t,mountParcel:o3.bind(e),singleSpa:ov});return oU(e)&&(n.unmountSelf=e.unmountThisParcel),n}let o9={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function o8(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(16,!1));o9.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function o7(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(17,!1));o9.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ae(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(18,!1));o9.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function at(e,t,r){if("number"!=typeof e||e<=0)throw Error(oS(19,!1));o9.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ar(e,t){let r=e.timeouts[t],n=r.warningMillis,o=oW(e);return new Promise((a,i)=>{let s=!1,l=!1;e[t](o5(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=oS(31,!1,t,o,oV(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function an(e){let t={};for(let r in o9)t[r]=oH({},o9[r],e&&e[r]||{});return t}function ao(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oC&&e.status!==oM?e:(e.status=oP,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(o5(e));if(!oZ(n))throw r=!0,Error(oS(33,!1,oV(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!oK(t.bootstrap)&&(n=35),oK(t.mount)||(n=36),oK(t.unmount)||(n=37);let o=oW(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(oS(n,!1,o,oV(e),r),t),ox(void 0,e,oL),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=oH({},e.devtools.overlays,t.devtools.overlays)),e.status=oO,e.bootstrap=oG(t,"bootstrap"),e.mount=oG(t,"mount"),e.unmount=oG(t,"unmount"),e.unload=oG(t,"unload"),e.timeouts=an(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=oL:(n=oM,e.loadErrorTime=(new Date).getTime()),ox(t,e,n),e}))})}let aa="u">typeof window,ai={hashchange:[],popstate:[]},as=["hashchange","popstate"];function al(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(oS(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=ah(window.location.href),n=ah(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function au(e){if(e){let t=e[0].type;as.indexOf(t)>=0&&ai[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function ac(){aF([],arguments)}function ad(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),a=window.location.href;return o&&r===a||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let ap=null,af=!1;function am(e){if(af)throw Error(oS(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,af=!0,ap=window.history.replaceState,window.addEventListener("hashchange",ac),window.addEventListener("popstate",ac);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&as.indexOf(e)>=0)||oz(ai[e],e=>e===r))return t.apply(this,arguments);ai[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&as.indexOf(e)>=0&&(ai[e]=ai[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ad(window.history.pushState,"pushState"),window.history.replaceState=ad(ap,"replaceState")}function ah(e){let t=document.createElement("a");return t.href=e,t}aa&&(window.singleSpaNavigate?console.warn(oS(41,!1)):window.singleSpaNavigate=al);let ag=!1;function ay(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ag){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return av.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return av.call(this,r,window.removeEventListener,e,t,arguments)},ag=!0}}function av(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{as.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let ab={};function aw(e){return Promise.resolve().then(()=>{let t=ab[oV(e)];if(!t)return e;if(e.status===oC)return aE(e,t),e;if(e.status===oI)return t.promise.then(()=>e);if(e.status!==oT&&e.status!==oM)return e;let r=e.status===oM?Promise.resolve():ar(e,"unload");return e.status=oI,r.then(()=>(aE(e,t),e)).catch(r=>(delete ab[oV(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,ox(r,e,oL),t.reject(r),e))})}function aE(e,t){delete ab[oV(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oC,t.resolve()}function ax(e,t,r,n){ab[oV(e)]={app:e,resolve:r,reject:n},Object.defineProperty(ab[oV(e)],"promise",{get:t})}let aD=[];function a_(){return aD.filter(oF).map(oV)}function aS(){return aD.map(oV)}function ak(e){let t=oz(aD,t=>oV(t)===e);return t?t.status:null}let aC=!1;function aP(e,t,r,n){var o,a;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(oS(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(oS(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(oS(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(oS(24,!1));if(!aj(e.customProps))throw Error(oS(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(oS(20,!1));if(!t)throw Error(oS(23,!1));if("function"!=typeof r)throw Error(oS(24,!1));if(!aj(n))throw Error(oS(22,!1))}(e,t,r,n),i.name=e,i.loadApp=t,i.activeWhen=r,i.customProps=n),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(a=i.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:aA(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(aV||aC||(aC=!0,setTimeout(()=>{aV||console.warn(oS(1,!1))},5e3)),-1!==aS().indexOf(l.name))throw Error(oS(21,!1,l.name));aD.push(oH({loadErrorTime:null,status:oC,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),aa&&(ay(),aF())}function aO(e=window.location){return aD.filter(t=>t.activeWhen(e)).map(oV)}function aR(e){if(0===aD.filter(t=>oV(t)===e).length)throw Error(oS(25,!1,e));return(aa?aT(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=aD.map(oV).indexOf(e);aD.splice(t,1)})}function aT(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(oS(26,!1));let r=oz(aD,t=>oV(t)===e);if(!r)throw Error(oS(27,!1,e));let n=ab[oV(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{ax(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,aN(r,n.resolve,n.reject)):e=new Promise((t,n)=>{ax(r,()=>e,t,n),aN(r,t,n)}),e}}function aN(e,t,r){Promise.resolve().then(()=>{if(oz(aO(),t=>t===oV(e)))return aL()}).then(()=>oJ(e).then(aw).then(()=>{t(),setTimeout(()=>{aF()})})).catch(r)}function aj(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function aA(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&a(t)}return a(e.length),RegExp(o,"i");function a(a){let i=e.slice(r,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":i,a===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=a}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let a$=!1,aI=[],aM=aa&&window.location.href;function aL(){return aF()}function aF(e=[],t,r=!1){let n,o,a,i,s;if(a$)return new Promise((e,r)=>{aI.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],a=[],i=[],s=(new Date).getTime(),aD.forEach(e=>{let t=e.status!==oL&&oB(e);switch(e.status){case oM:t&&s-e.loadErrorTime>=200&&a.push(e);break;case oC:case oP:t&&a.push(e);break;case oO:case oT:!t&&ab[oV(e)]?n.push(e):t&&i.push(e);break;case oj:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:a,appsToMount:i}),p,f=[],m=aM,h=aM=window.location.href;return aV?(a$=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(f).then(r=>{if(r.some(e=>e))return ap.call(window.history,history.state,"",m.substring(location.origin.length)),aM=location.href,a$=!1,aF(e,t,!0);let n=l.map(aw),o=Promise.all(u.map(oJ).map(e=>e.then(aw)).concat(n));o.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let a=c.map(e=>ao(e).then(e=>aB(e,o))),i=d.filter(e=>0>c.indexOf(e)).map(e=>aB(e,o));return o.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(a.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(ao)).then(v).then(()=>[]).catch(e=>{throw v(),e}).finally(()=>{})));function g(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(oS(42,!1))),console.warn(e),!1)))}function y(){let t=a_();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(a$=!1,aI.length>0){let e=aI;aI=[],aF(e)}return t}function v(){r||(e.forEach(e=>{au(e.eventArguments)}),au(t))}function b(e=!1,r){let n={},o={[oj]:[],[oT]:[],[oC]:[],[oL]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,oj)}),l.forEach(e=>{i(e,oC)}),u.forEach(e=>{i(e,oT)})):p.forEach(e=>{i(e)});let a={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:m,newUrl:h}};return r&&oH(a.detail,r),a;function i(e,t){let r=oV(e);t=t||ak(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new ow(`single-spa:${e}`,t))}}function aB(e,t){return oB(e)?oq(e).then(e=>t.then(()=>oB(e)?o0(e):e)):t.then(()=>e)}let aV=!1;function aU(e){aV=!0,aa&&(am(e),aF())}aa&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...aD]},reroute:aF,NOT_LOADED:oC,toLoadPromise:ao,toBootstrapPromise:oq,unregisterApplication:aR,getProfilerData:function(){return oY}});let aW={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var aH=r(2284),az=r(3029),aK=r(2901);function aG(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var aZ=r(3662);function aY(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,aZ.A)(e,t)}function aq(e,t){if(t&&("object"==(0,aH.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return aG(e)}function aJ(e){return(aJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aX=r(4467),aQ=r(6369),a0=r(3612),a1=r(6562);function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var a3={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},a6=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,az.A)(this,e),this.init(t,r)}return(0,aK.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||a3,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a4(a4({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),a5=function(){function e(){(0,az.A)(this,e),this.observers={}}return(0,aK.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function a9(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function a8(e){return null==e?"":""+e}function a7(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=n(a.shift());!e[i]&&r&&(e[i]=new r),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return o()?{}:{obj:e,k:n(a.shift())}}function ie(e,t,r){var n=a7(e,t,Object);n.obj[n.k]=r}function it(e,t){var r=a7(e,t),n=r.obj,o=r.k;if(n)return n[o]}function ir(e,t,r){var n=it(e,r);return void 0!==n?n:it(t,r)}function io(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ia={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ii(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return ia[e]}):e}var is="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,il=[" ",",","?","!",";"];function iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ic(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var id=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,az.A)(this,n),t=r.call(this),is&&a5.call(aG(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,aK.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,i=[e,t];r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split("."));var s=it(this.data,i);return s||!a||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),a=t,i=0;i<o.length;++i){if(!a||"string"==typeof a[o[i]]&&i+1<o.length)return;if(void 0===a[o[i]]){for(var s=2,l=o.slice(i,i+s).join(n),u=a[l];void 0===u&&o.length>i+s;)s++,u=a[l=o.slice(i,i+s).join(n)];if(void 0===u)return;if(null===u)return null;if(r.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=o.slice(i+s).join(n);if(c)return e(u,c,n);return}a=a[o[i]]}return a}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var i=[e,t];r&&(i=i.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),ie(this.data,i,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=r,r=t,t=i[1]),this.addNamespaces(t);var s=it(this.data,i)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=ic(ic({},s),r),ie(this.data,i,s),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?ic(ic({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(a5),ip={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,r,n,o))}),t}};function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?im(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ig={},iy=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e){var t,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,az.A)(this,n),a=r.call(this),is&&a5.call(aG(a)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=aG(a),t.forEach(function(t){e[t]&&(o[t]=e[t])}),a.options=i,void 0===a.options.keySeparator&&(a.options.keySeparator="."),a.logger=a6.create("translator"),a}return(0,aK.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=r&&e.indexOf(r)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=il.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(r);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}(e,r,n);if(a&&!i){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,aH.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var f=t.nsSeparator||this.options.nsSeparator;return a?(m.res="".concat(c).concat(f).concat(l),m):"".concat(c).concat(f).concat(l)}return a?(m.res=l,m):l}var m=this.resolve(e,t),h=m&&m.res,g=m&&m.usedKey||l,y=m&&m.exactUsedKey||l,v=Object.prototype.toString.apply(h),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&E&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(v)&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,ih(ih({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(m.res=x,m):x}if(i){var D="[object Array]"===v,_=D?[]:{},S=D?y:g;for(var k in h)if(Object.prototype.hasOwnProperty.call(h,k)){var C="".concat(S).concat(i).concat(k);_[k]=this.translate(C,ih(ih({},t),{joinArrays:!1,ns:u})),_[k]===C&&(_[k]=h[k])}h=_}}else if(w&&"string"==typeof b&&"[object Array]"===v)(h=h.join(b))&&(h=this.extendTranslation(h,e,t,r));else{var P=!1,O=!1,R=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),N=R?this.pluralResolver.getSuffix(d,t.count,t):"",j=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(h)&&T&&(P=!0,h=j),this.isValidLookup(h)||(O=!0,h=l);var A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:h,$=T&&j!==h&&this.options.updateMissing;if(O||P||$){if(this.logger.log($?"updateKey":"missingKey",d,c,l,$?j:h),i){var I=this.resolve(l,ih(ih({},t),{},{keySeparator:!1}));I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)M.push(L[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var B=function(e,r,n){var a=T&&n!==h?n:A;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,a,$,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,a,$,t),o.emit("missingKey",e,c,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){B([e],l+r,t["defaultValue".concat(r)]||j)})}):B(M,l,j))}h=this.extendTranslation(h,e,t,m,r),O&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(l)),(O||P)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,P?h:void 0):this.options.parseMissingKeyHandler(h))}return a?(m.res=h,m):h}},{key:"extendTranslation",value:function(e,t,r,n,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,ih(ih({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(ih(ih({},r),{interpolation:ih(ih({},this.options.interpolation),r.interpolation)}));var i,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);i=l&&l.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=ih(ih({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);i<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return o&&o[0]===n[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):a.translate.apply(a,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=ip.handle(p,e,t,this.options&&this.options.postProcessPassResolved?ih({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,a,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!i.isValidLookup(t)){var l=i.extractFromKey(e,s),u=l.key;r=u;var c=l.namespaces;i.options.fallbackNS&&(c=c.concat(i.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,p=d&&!s.ordinal&&0===s.count&&i.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);c.forEach(function(e){i.isValidLookup(t)||(a=e,!ig["".concat(m[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(ig["".concat(m[0],"-").concat(e)]=!0,i.logger.warn('key "'.concat(r,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(function(r){if(!i.isValidLookup(t)){o=r;var a,l=[u];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(l,u,r,e,s);else{d&&(c=i.pluralResolver.getSuffix(r,s.count,s));var c,m="".concat(i.options.pluralSeparator,"zero");if(d&&(l.push(u+c),p&&l.push(u+m)),f){var h="".concat(u).concat(i.options.contextSeparator).concat(s.context);l.push(h),d&&(l.push(h+c),p&&l.push(h+m))}}for(;a=l.pop();)i.isValidLookup(t)||(n=a,t=i.getResource(r,e,a,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:a}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(a5);function iv(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ib=function(){function e(t){(0,az.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=a6.create("languageUtils")}return(0,aK.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iv(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iv(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=iv(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],a=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&a(r.formatLanguageCode(e))}),o}}]),e}(),iw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iE={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},ix=["v1","v2","v3"],iD={zero:0,one:1,two:2,few:3,many:4,other:5},i_=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,az.A)(this,e),this.languageUtils=t,this.options=n,this.logger=a6.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},iw.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iE[e.fc]}})}),r)}return(0,aK.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return iD[e]-iD[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!ix.includes(this.options.compatibilityJSON)}}]),e}();function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ik(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iC=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,az.A)(this,e),this.logger=a6.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,aK.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ii,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?io(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?io(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?io(t.nestingPrefix):t.nestingPrefixEscaped||io("$t("),this.nestingSuffix=t.nestingSuffix?io(t.nestingSuffix):t.nestingSuffixEscaped||io(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,a,i,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=ir(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,ik(ik(ik({},n),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),u=a.join(s.formatSeparator).trim();return s.format(ir(t,l,i),u,r,ik(ik(ik({},n),t),{},{interpolationkey:i}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach(function(t){for(i=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(a=c(r)))if("function"==typeof d){var l=d(e,o,n);a="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))a="";else if(p){a=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),a="";else"string"==typeof a||s.useRawValueToEscape||(a=a8(a));var u=t.safeValue(a);if(e=e.replace(o[0],u),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++i>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=ik({},a);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=ik(ik({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),l=c,u=!0}if((n=t(s.call(this,r[1].trim(),i),i))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=a8(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=l.reduce(function(e,t){return o.format(e,t,a.lng,ik(ik({},a),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function iP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iR(e){var t={};return function(r,n,o){var a=n+JSON.stringify(o),i=t[a];return i||(i=e(n,o),t[a]=i),i(r)}}var iT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,az.A)(this,e),this.logger=a6.create("formatter"),this.options=t,this.formats={number:iR(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:iR(function(e,t){var r=new Intl.NumberFormat(e,iO(iO({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:iR(function(e,t){var r=new Intl.DateTimeFormat(e,iO({},t));return function(e){return r.format(e)}}),relativetime:iR(function(e,t){var r=new Intl.RelativeTimeFormat(e,iO({},t));return function(e){return r.format(e,t.range||"day")}}),list:iR(function(e,t){var r=new Intl.ListFormat(e,iO({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,aK.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=iR(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var a=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,aQ.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,a0.A)(t)||(0,a1.A)()),o=n[0],a=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=a),"false"===a&&(r[o.trim()]=!1),"true"===a&&(r[o.trim()]=!0),isNaN(a)||(r[o.trim()]=parseInt(a,10))}})}return{formatName:t,formatOptions:r}}(t),i=a.formatName,s=a.formatOptions;if(o.formats[i]){var l=e;try{var u=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=u.locale||u.lng||n.locale||n.lng||r;l=o.formats[i](e,c,iO(iO(iO({},s),n),u))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(i)),e},e)}}]),e}();function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ij(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iN(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iA=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(e,t,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,az.A)(this,n),a=r.call(this),is&&a5.call(aG(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=a6.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=i.maxParallelReads||10,a.readingCalls=0,a.maxRetries=i.maxRetries>=0?i.maxRetries:5,a.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,i.backend,i),a}return(0,aK.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,a={},i={},s={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===i[s]&&(i[s]=!0):(o.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],a=n[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r),this.state[e]=t?-1:2;var i={};this.queue.forEach(function(r){var n,s,l,u;n=r.loaded,(l=(s=a7(n,[o],Object)).obj)[u=s.k]=l[u]||[],l[u].push(a),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){i[e]||(i[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===i[e][t]&&(i[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:i}):(this.readingCalls++,this.backend[r](e,t,function(s,l){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*a,i)},a):i(s,l)})):i(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,n,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],a=n[1];this.read(o,a,"read",void 0,void 0,function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,n,i)})}},{key:"saveMissing",value:function(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ij(ij({},a),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(a5);function i$(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function iI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iI(Object(r),!0).forEach(function(t){(0,aX.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iL(){}var iF=function(e){aY(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=aJ(n);return e=t?Reflect.construct(r,arguments,aJ(this).constructor):r.apply(this,arguments),aq(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if((0,az.A)(this,n),t=r.call(this),is&&a5.call(aG(t)),t.options=i$(o),t.services={},t.logger=a6,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=aG(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),a&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,a),aq(t,aG(t));setTimeout(function(){t.init(o,a)},0)}return t}return(0,aK.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,aH.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,aH.A)(e[2])||"object"===(0,aH.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=iM(iM(iM({},n),this.options),i$(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=iM(iM({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?a6.init(o(this.modules.logger),this.options):a6.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"u">typeof Intl&&(a=iT);var a,i=new ib(this.options);this.store=new id(this.options.resources,this.options);var s=this.services;s.logger=a6,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new i_(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(a),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new iC(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new iA(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new iy(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=iL),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var u=a9(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iL,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var a=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return i(e)}),this.options.preload&&this.options.preload.forEach(function(e){return i(e)}),this.services.backendConnector.load(a,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=a9();return e||(e=this.languages),t||(t=this.options.ns),r||(r=iL),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ip.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=a9();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},a=function(e,a){a?(o(a),r.translator.changeLanguage(a),r.isLanguageChangingTo=void 0,r.emit("languageChanged",a),r.logger.log("languageChanged",a)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},i=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,aH.A)(o)){for(var a,i=arguments.length,s=Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];a=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else a=iM({},o);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",c=a.keyPrefix?"".concat(a.keyPrefix).concat(u).concat(t):t;return n.t(c,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,i);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!o||i(a,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=a9();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=a9();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iL,o=iM(iM(iM({},this.options),t),{isClone:!0}),a=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=iM({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new iy(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];a.emit.apply(a,[e].concat(r))}),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(a5);(0,aX.A)(iF,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iF(e,t)});var iB=iF.createInstance();iB.createInstance=iF.createInstance,iB.createInstance,iB.init,iB.loadResources,iB.reloadResources,iB.use,iB.changeLanguage,iB.getFixedT,iB.t,iB.exists,iB.setDefaultNamespace,iB.hasLoadedNamespace,iB.loadNamespaces,iB.loadLanguages;let iV=iB.default||iB;function iU(e,t,r,n){return iV.t(t,{ns:e,defaultValue:r,...n})}function iW(e,t,r){return aW[e]?iU("core",e,t??aW[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iH(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iz(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function iz(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function iK({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iH(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(iW("navigateNonHttp"));n.startsWith(r)?al(n):window.location.assign(n)}iV.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iG="openmrs:history";function iZ(e){let t=JSON.parse(sessionStorage.getItem(iG)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iG,JSON.stringify(t))}function iY(){0===JSON.parse(sessionStorage.getItem(iG)??"[]").length&&document.referrer&&iZ(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=iq();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iG,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?iJ({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iZ(window.location.href)})}function iq(){return JSON.parse(sessionStorage.getItem(iG)??"[]")}function iJ({toUrl:e}){let t=iq(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);iK({to:t[r]}),sessionStorage.setItem(iG,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function iX(){sessionStorage.removeItem(iG)}let iQ="${openmrsSpaBase}/login",i0={redirectAuthFailure:{enabled:{_type:nn.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:nn.String,_default:iQ,_validators:[ou.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:nn.Array,_default:[401],_elements:{_type:nn.Number,_validators:[ou.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:nn.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:nn.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function i1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i2="/ws/rest/v1",i4="/ws/fhir2/R4",i3=`${i2}/session`;function i6(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function i5(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=i6(e);t.headers||(t.headers={}),ef(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;let n=!1;try{let e=new URL(r,window.location.href),t=new URL(i6(i2),window.location.href),o=e.pathname.replace(/\/{2,}/g,"/"),a=t.pathname.replace(/\/{2,}/g,"/");n=e.origin===t.origin&&(o===a||o.startsWith(`${a}/`))}catch{}if(n){let e=!1;for(let[r,n]of Object.entries(t.headers))"disable-www-authenticate"===r.toLowerCase()&&(void 0===n?delete t.headers[r]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(i4)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let o=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:n,followRedirects:a}=await nK("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(a&&t&&(r===i6(i3)||204===e.status)&&iK({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return(r===i6(i3)&&403===e.status||n.enabled&&n.errors.includes(e.status))&&(iX(),iK({to:n.url||e.headers.get("location")||iQ}),!0!==t.rejectAuthFailure)?n.resolvePromise?Promise.resolve():new Promise(()=>{}):e.clone().text().then(t=>{let n=t;try{n=JSON.parse(t)}catch(e){}throw new i9(r,e,n,o)},()=>{throw new i9(r,e,null,o)})})}class i9 extends Error{constructor(e,t,r,n){super(),i1(this,"response",void 0),i1(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
13
13
  ${n.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let i8=F("session",{loaded:!1,session:null}),i7=0,se=null;function st(){return se||(i8.getState().loaded&&i7>=Date.now()-6e4?null:sa())}function sr(e){let t=e?.includeAuthStatus??!0,r=e=>t?e:e.user;return st()?new Promise(e=>{let t=i8.subscribe(n=>{n.loaded&&(t(),e(r(n.session)))})}):Promise.resolve(r(i8.getState().session))}function sn(){return st(),i8}function so(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function sa(e,t){i7=Date.now();let r={};e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let n=sp(i5(i3,{headers:r})),o=()=>{se===n&&(se=null)};return n.then(o,o),se=n,n}function si(){i8.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function ss(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!H(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!H(n.privileges.find(t=>e===t.display))):(H(r)||console.error(`Could not understand privileges "${r}"`),!0))||!H(t.roles.find(e=>"System Developer"===e.display))}function sl(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(i8.getState()),e||(t=i8.subscribe(n))})}async function su(){return(await sr()).sessionLocation}async function sc(e,t){return sp(i5(i3,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function sd(e,t,r){return r||(r=new AbortController),await i5(`${i2}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),sa()}function sp(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},i8.setState(n),t(n)):(n={loaded:!1,session:null},i8.setState(n),r(n))}).catch(e=>{k(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};i8.setState(t),r(t)})})}function sf(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}i8.subscribe(e=>{e.loaded&&e.session&&so(e.session)});let sm={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function sh(){nF("@openmrs/esm-api",i0),sa()}let sg="import-map-override:",sy="import-map-overrides-disabled",sv="import-map-overrides:change",sb=!1,sw=null,sE=null;async function sx(){return sE??(sE=sD().then(({map:e,complete:t})=>(t||(sE=null),e))),sE}async function sD(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:s_(t),complete:r}}function s_(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sS(){let e={};try{let t=sR();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sg)){let r=n.slice(sg.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function sk(){let e=await sx();return sb?s_([e,sw??sS()]):e}async function sC(){return sx()}async function sP(){return sb?s_([await sx(),sS()]):sx()}function sO(e){if(!sb)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sg)){let t=localStorage.getItem(r);t&&(e[r.slice(sg.length)]=t)}}return{imports:e}}return sS()}function sR(){if(!sb)return[];try{let e=localStorage.getItem(sy);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sT(e){return!!sb&&sR().includes(e)}function sN(e,t){if(!sb)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sg+e,t),window.dispatchEvent(new CustomEvent(sv))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sj(e){if(!sb)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sg+e);let t=sR().filter(t=>t!==e);t.length>0?localStorage.setItem(sy,JSON.stringify(t)):localStorage.removeItem(sy),window.dispatchEvent(new CustomEvent(sv))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sA(){if(!sb)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(sg)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sy),window.dispatchEvent(new CustomEvent(sv))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function s$(e){if(!sb)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sR().filter(t=>t!==e);t.length>0?localStorage.setItem(sy,JSON.stringify(t)):localStorage.removeItem(sy),window.dispatchEvent(new CustomEvent(sv))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sI=!1;function sM(){!sI&&(sI=!0,(sb="development"===window.spaEnv)&&(sw=sS()))}function sL(e){return e.replace(/[\/\-@]/g,"_")}async function sF(e,t="./start",n){var o;let a,i=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sB(e,n?.importMap),new Promise((t,r)=>{a=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=i)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},i)})]),a&&clearTimeout(a);let s=sL(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function sB(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=sL(e);if(!window[r]){let r=t??await sV();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in sO().imports;try{return await function(e){var t;let r=(t=window)[sU]??(t[sU]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let a=new Promise((t,n)=>{let a=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function i(){clearTimeout(a),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),r.delete(e),o.remove();let a=`Failed to load script from ${e}`;console.error(a,t),n(t.message??a)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,a),a}(n)}catch(e){return o&&w({kind:"error",title:iW("scriptLoadingFailed","Error: Script failed to load"),description:iW("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:iW("resetOverrides","Reset overrides"),onActionButtonClick(){sA(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sV(){return sk()}let sU=Symbol.for("__openmrs_script_loading");function sW(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function sH(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&sW(t))}let sz="openmrs-routes:",sK="openmrs-routes:change",sG=!1,sZ=null,sY=null;async function sq(){return sY??(sY=sJ().then(({map:e,complete:t})=>(t||(sY=null),e))),sY}async function sJ(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&sH(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:sX(t),complete:r}}function sX(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function sQ(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(sz)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(sz.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sW(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sW(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function s0(){let e=await sq();return sG?sX([e,sZ??await sQ()]):e}async function s1(){return sq()}async function s2(){return sG?sX([await sq(),await sQ()]):sq()}function s4(){if(!sG)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sz)){let t=localStorage.getItem(r);t&&(e[r.slice(sz.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function s3(e,t){if(!sG)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sz+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sW(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sz+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(sz+e,JSON.stringify(t.toString()));else{if(!sW(t))return void 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);localStorage.setItem(sz+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sK))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function s6(e){if(!sG)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sz+e),window.dispatchEvent(new CustomEvent(sK))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function s5(){if(!sG)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(sz)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sK))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let s9=null;function s8(){return s9||(s9=(sG="development"===window.spaEnv)?sQ().then(e=>{sZ=e}):Promise.resolve())}let s7=`${i2}/attachment`;function le(e,t){return i5(`${s7}/${e}`,{signal:t.signal})}function lt(e,t,r,n){return i5(lr(e,t,n),{signal:r.signal})}function lr(e,t,r){return r?`${s7}?patient=${e}&encounter=${r}`:`${s7}?patient=${e}&includeEncounterless=${t}`}async function ln(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),i5(`${s7}`,{method:"POST",body:n})}function lo(e,t){return i5(`${s7}/${e}`,{method:"DELETE",signal:t.signal})}async function la(e,t){return e?(await i5(`${i4}/Patient/${e}`,t)).data:null}function li(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function ls(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}function ll(e){return{uuid:e.uuid,display:e.display}}function lu(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return i5(`${i2}/location${n?"?"+n:""}`).then(e=>e.data.results.map(ll))}function lc(e){return{uuid:e.uuid,display:e.display,name:e.name}}let ld=`${i2}/visittype`;function lp(e=ld){return i5(e).then(e=>e.data.results.map(lc))}var lf=((Q={}).NEWVISIT="startVisit",Q.EDITVISIT="editVisit",Q.LOADING="loadingVisit",Q),lm=((ee={}).NOTSTARTED="notStarted",ee.ONGOING="ongoing",ee);let lh="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",lg=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function ly(){return V("visit",lg)}function lv(e,t){ly().setState({patientUuid:e,manuallySetVisitUuid:t})}function lb(e,t){return i5(`${i2}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lw(e,t,r){return i5(`${i2}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lE(e,t,r){return i5(`${i2}/visit?patient=${e}&v=${r??lh}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}ly().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lx{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lx.version}static addUnaryOp(e){return lx.max_unop_len=Math.max(e.length,lx.max_unop_len),lx.unary_ops[e]=1,lx}static addBinaryOp(e,t,r){return lx.max_binop_len=Math.max(e.length,lx.max_binop_len),lx.binary_ops[e]=t,r?lx.right_associative.add(e):lx.right_associative.delete(e),lx}static addIdentifierChar(e){return lx.additional_identifier_chars.add(e),lx}static addLiteral(e,t){return lx.literals[e]=t,lx}static removeUnaryOp(e){return delete lx.unary_ops[e],e.length===lx.max_unop_len&&(lx.max_unop_len=lx.getMaxKeyLen(lx.unary_ops)),lx}static removeAllUnaryOps(){return lx.unary_ops={},lx.max_unop_len=0,lx}static removeIdentifierChar(e){return lx.additional_identifier_chars.delete(e),lx}static removeBinaryOp(e){return delete lx.binary_ops[e],e.length===lx.max_binop_len&&(lx.max_binop_len=lx.getMaxKeyLen(lx.binary_ops)),lx.right_associative.delete(e),lx}static removeAllBinaryOps(){return lx.binary_ops={},lx.max_binop_len=0,lx}static removeLiteral(e){return delete lx.literals[e],lx}static removeAllLiterals(){return lx.literals={},lx}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new lx(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return lx.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lx.binary_ops[String.fromCharCode(e)]||lx.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lx.isIdentifierStart(e)||lx.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(lx.hooks[e]){let r={context:this,node:t};return lx.hooks.run(e,r),r.node}return t}searchHook(e){if(lx.hooks[e]){let t={context:this};return lx.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lx.SPACE_CODE||e===lx.TAB_CODE||e===lx.LF_CODE||e===lx.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:lx.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lx.SEMCOL_CODE||r===lx.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,lx.max_binop_len),t=e.length;for(;t>0;){if(lx.binary_ops.hasOwnProperty(e)&&(!lx.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lx.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,a,i,s,l;if(!(a=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return a;for(o={value:t,prec:lx.binaryPrecedence(t),right_a:lx.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[a,o,i];t=this.gobbleBinaryOp();){if(0===(r=lx.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lx.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)i=n.pop(),t=n.pop().value,a=n.pop(),e={type:lx.BINARY_EXP,operator:t,left:a,right:i},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lx.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lx.isDecimalDigit(e)||e===lx.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lx.SQUOTE_CODE||e===lx.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lx.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lx.max_unop_len)).length;r>0;){if(lx.unary_ops.hasOwnProperty(t)&&(!lx.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lx.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lx.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lx.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lx.literals.hasOwnProperty(n.name)?n={type:lx.LITERAL,value:lx.literals[n.name],raw:n.name}:n.name===lx.this_str&&(n={type:lx.THIS_EXP})):e===lx.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lx.PERIOD_CODE||t===lx.OBRACK_CODE||t===lx.OPAREN_CODE||t===lx.QUMARK_CODE;){let r;if(t===lx.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lx.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lx.OBRACK_CODE?((e={type:lx.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lx.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lx.OPAREN_CODE?e={type:lx.CALL_EXP,arguments:this.gobbleArguments(lx.CPAREN_CODE),callee:e}:(t===lx.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lx.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lx.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lx.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lx.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));lx.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lx.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lx.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lx.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lx.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lx.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:lx.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lx.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lx.isIdentifierPart(e))this.index++;else break;return{type:lx.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lx.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lx.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lx.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lx.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lx.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lx.CPAREN_CODE);if(this.code===lx.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lx.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lx.ARRAY_EXP,elements:this.gobbleArguments(lx.CBRACK_CODE)}}}Object.assign(lx,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(lx),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),lx.max_unop_len=lx.getMaxKeyLen(lx.unary_ops),lx.max_binop_len=lx.getMaxKeyLen(lx.binary_ops);let lD=e=>new lx(e).parse(),l_=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lx).filter(e=>!l_.includes(e)&&void 0===lD[e]).forEach(e=>{lD[e]=lx[e]}),lD.Jsep=lx,lD.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let lS="ArrowFunctionExpression",lk={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},lC={...lk,Promise};function lP(e,t={}){return lA(e,t,lM)}async function lO(e,t={}){return l$(e,t,lM)}function lR(e,t={}){return lA(e,t,lL)}function lT(e,t={}){return l$(e,t,lL)}function lN(e,t={}){return lA(e,t,lF)}function lj(e,t={}){return l$(e,t,lF)}function lA(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=lH(t,lk),o=lB("string"==typeof e?lD(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function l$(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=lH(t,lC);return Promise.resolve(lB("string"==typeof e?lD(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function lI(e){return lD(e)}function lM(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lL(e){return"boolean"==typeof e}function lF(e){return"number"==typeof e}function lB(e,t){switch(e.type){case"UnaryExpression":var r,n,o,a,i,s,l,u,c,d,p,f,m,h=e,g=t;let y=lB(h.argument,g);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,b=t;switch(v.operator){case"&&":return lB(v.left,b)&&lB(v.right,b);case"||":return lB(v.left,b)||lB(v.right,b);case"??":return lB(v.left,b)??lB(v.right,b)}let w=lB(v.left,b),E=lB(v.right,b);switch(v.operator){case"+":return w+E;case"-":return w-E;case"*":return w*E;case"/":return w/E;case"%":return w%E;case"**":return w**E;case"==":return w==E;case"===":return w===E;case"!=":return w!=E;case"!==":return w!==E;case">":return w>E;case">=":return w>=E;case"<":return w<E;case"<=":return w<=E;case"in":return w in E;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return r=e,n=t,lB(r.test,n)?lB(r.consequent,n):lB(r.alternate,n);case"CallExpression":return lG(lU(e,t));case"ArrowFunctionExpression":let x;return o=e,a=t,x=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<x.length)throw`Required argument(s) ${x.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(x.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return lB(o.body,a.addVariables(t))}).bind(null);case"MemberExpression":return lG(lW(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(lZ(s));case"SequenceExpression":let D;return l=e,u=t,(D=l.expressions.map(lZ(u)))[D.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(lZ(S));switch(_.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${_.callee.name}`}}if(_.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(lY(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let k,C;return p=e,f=t,k=p.expressions?.map(lZ(f))??[],(C=p.quasis?.map(lZ(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+k.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(m=e).cooked,tail:m.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lV(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lV(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lU(e,t){let r=lK(e.callee,t);if(r===lz||e.optional&&null==r)return lz;let n=e.arguments?.map(lZ(t));if(r){if("function"!=typeof r)throw`${lX(e.callee)} is not a function`}else throw`No function named ${lX(e.callee)} is defined in this context`;return r(...n)}function lW(e,t){let r=lK(e.object,t);if(r===lz||e.optional&&null==r)return lz;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${lJ(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=lV(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${lJ(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(lB(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);lY(n),function(e,t){if(lq.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function lH(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lD.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:lS,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=lS,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lD.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lD.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(n+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(i===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,a=u,95===o||a.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),lD.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{n=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lD.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lD.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",a=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=i}else n+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lD.addBinaryOp("in",7),lD.addBinaryOp("??",1);let lz=Symbol("optional chain short-circuited");function lK(e,t){switch(e.type){case"MemberExpression":return lW(e,t);case"CallExpression":return lU(e,t);default:return lB(e,t)}}function lG(e){return e===lz?void 0:e}function lZ(e){return function(t){return null===t?null:lB(t,e)}}function lY(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let lq=new Set(["toString","valueOf","hasOwnProperty"]);function lJ(e,t){try{return lV(e,t)}catch{return"<computed>"}}function lX(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function lQ(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...lC},isLocalExpression:!1,variables:new Set};return l0("string"==typeof e?lD(e):e,t),[...t.variables]}function l0(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,l0(n.argument,o);case"BinaryExpression":return a=e,i=t,[l0(a.left,i),l0(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[l0(s.consequent,l),l0(s.test,l),l0(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=l0(u.callee,c),u.arguments?.map(l1(c)),r;case"ArrowFunctionExpression":var n,o,a,i,s,l,u,c,d,p,f,m,h,g,y,v,b=e,w=t;let E={...w};E.isLocalExpression=!0;let x=b.params?.map(l1(E))??[],D=l0(b.body,E)??[];if(D&&Array.isArray(D))for(let e of D)x.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(l0(_.object,S),_.computed)return void l0(_.property,S);let k={...S};k.isLocalExpression=!0,l0(_.property,k);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(l1(p));case"SequenceExpression":return f=e,m=t,void f.expressions?.map(l1(m));case"NewExpression":return h=e,g=t,void h.arguments?.map(l1(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,P=t;if(!(C.name in P.globals))if(P.isLocalExpression)return C.name;else P.variables.add(C.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(l1(v)),y.quasis?.map(l1(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function l1(e){return function(t){return null===t?null:l0(t,e)}}let l2=V("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function l4(e,t,r){l2.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function l3(){let e=l2.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function l6(e){return l2.getState().flags[e].enabled}function l5(e,t){l2.subscribe(r=>{t(r.flags[e].enabled)})}function l9(e,t){l2.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}l2.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var l8=tL(function(e,t,r){tR(e,t,r)});let l7=F("extensionsInternal",{slots:{},extensions:{}}),ue=F("extensionRenderings",{renderings:new Map}),ut=()=>V("extensionsInternal",{slots:{},extensions:{}}),ur=()=>V("extensionRenderings",{renderings:new Map});function un(e){let t=l7.getState(),r=e(t);r!==t&&l7.setState(r)}let uo=null,ua=null;function ui(){let e=ue.getState();return uo&&e===ua||(uo=new Map(e.renderings),ua=e,function(e){for(let t of(ug.clear(),e.values()))uv(t,1);uy=!0}(uo)),uo}function us(e){ua={renderings:e},ue.setState(ua,!0)}function ul(e){let t=ui();t.has(e.renderingId)||(t.set(e.renderingId,e),uv(e,1),us(t))}function uu(e){let t=ui(),r=t.get(e);r&&(t.delete(e),uv(r,-1),us(t))}let uc=()=>V("extensions",{slots:{}}),ud=0,up=new Set;function uf(e){ud++;try{return e()}finally{if(0==--ud&&up.size>0){let e=Array.from(up);for(let t of(up.clear(),e))um(t)}}}function um(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function uh(e){ud>0?up.add(e):um(e)}let ug=new Map,uy=!1;function uv(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=ug.get(r);if(!n){if(t<0)return;ug.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),uy=!0;return}n.count+=t,n.count<1&&(ug.delete(r),uy=!0)}function ub(){var e,t;if(ui(),!uy)return;uy=!1;let r=Array.from(ug.values(),({record:e})=>e);r.sort(uw),e=nf.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===uw(e,t[r]))||nf.setState({mountedExtensions:r})}function uw(e,t){return uE(e.slotName,t.slotName)||uE(e.extensionId,t.extensionId)||uE(e.slotModuleName,t.slotModuleName)||uE(e.extensionModuleName,t.extensionModuleName)}function uE(e,t){return e===t?0:e<t?-1:1}ub(),ue.subscribe(()=>uh(ub));let ux=ut(),uD=uc(),u_=nh(),uS=nv(),uk=new Set,uC=!1;function uP(e){if(null===e)uk=null;else if(null!==uk)for(let t of e)uk.add(t);uh(uO)}function uO(){if(!uC){uC=!0;try{for(let e=1;;e++){let t=uk;if(null!==t&&0===t.size)return;uk=new Set;try{!function(e,t,r,n,o,a=null){let i=uD.getState().slots,s={},l=!1,u=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,c]of Object.entries(e.slots)){let d=i[n];if(d&&a&&!a.has(n)){s[n]=d;continue}let{config:p}=ny(t,c.name),f=function(e,t,r,n,o,a){let i=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:a}=ux.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>uF(e,o,a[uN(e)]?.order,t)-uF(r,o,a[uN(r)]?.order,t))}(r,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=nw(n,e,l),u=nE(r,e,l),c=u?l8({},i,u):i,d=uN(l),p=t.extensions[d];if(p){let e=c?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!ss(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag))continue;s.push({id:l,name:d,moduleName:p.moduleName,config:c,featureFlag:p.featureFlag,meta:p.meta,displayConditionExpression:c?.["Display conditions"]?.expression||p.displayExpression})}}return s}(n,e,p,r,u,o.session);d&&d.moduleName===c.moduleName&&rw(d.candidateExtensions,f)?s[n]=d:(s[n]={moduleName:c.moduleName,candidateExtensions:f},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uD.setState({slots:s})}(ux.getState(),u_.getState(),uS.getState(),l2.getState(),i8.getState(),t)}catch(e){throw uk=null===t||null===uk?null:new Set([...t,...uk]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{uC=!1}}}function uR(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function uT(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uN(e){let[t]=e.split("#");return t}function uj(e,t){let r=uN(t);return e.extensions[r]}function uA(e){return uj(ux.getState(),e)}ux.subscribe((e,t)=>{uP(e.extensions!==t.extensions?null:uR(e.slots,t.slots))}),u_.subscribe((e,t)=>{uP(uR(e.slots,t.slots))}),uS.subscribe((e,t)=>{uP(uR(e.configs,t.configs))}),l2.subscribe(()=>uP(null)),i8.subscribe(()=>uP(null)),uP(null);let u$=e=>un(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uI(e,t){un(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...uT(e),attachedIds:[t]}}}})}function uM(e,t){un(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function uL(e){un(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function uF(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function uB(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let a=e.displayConditionExpression;if("string"!=typeof a||0===a.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!lR(a,o)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(uV(e),t,i8.getState().session,e)}function uV(e){return uD.getState().slots[e]?.candidateExtensions??[]}let uU=(e,t)=>ux.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=uT(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),uW=()=>{uk=null,un(()=>({slots:{},extensions:{}})),ur().setState({renderings:new Map}),uD.setState({slots:{}})},uH=F("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uz({name:e,basePath:t,mode:r,componentContext:n,state:o}){uH.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function uK(e){uH.getState().slotName===e&&uH.setState(uH.getInitialState(),!0)}let uG=F("modalRegistry",{modals:{}});function uZ(e){uG.setState(t=>(t.modals[e.name]=e,t))}function uY(e){let t=uG.getState().modals[e];if(!t){let r=uA(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),uZ(t))}return t}let uq=F("workspaceRegistrations",{workspaces:{}}),uJ=F("workspaceGroups",{workspaceGroups:{}});function uX(e){uq.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function uQ(e){uJ.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let u0=new Set;function u1(e){let t=uq.getState().workspaces;if(t[e])return t[e];{let t=uA(e);if(t){var r;let n;return u0.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),u0.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?iU(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function u2(e){let t=uJ.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let u4=F("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function u3(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=u4.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u6(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=u4.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u5(e){let{openedWindows:t}=u4.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function u9(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}u4.setState({registeredGroupsByName:n})}function u8(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u4.setState({registeredWindowsByName:n})}function u7(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=u4.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u4.setState({registeredWorkspacesByName:n})}let ce=0,ct=null,cr={bootstrap:15e3,mount:15e3,unmount:15e3};function cn(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(cr).filter(t=>e[t]).map(n=>{var o,a;let i,s;return[n,(o=e[n],a=cr[n],i=Array.isArray(o)?o:[o],s=e=>i.reduce((t,o,a)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${a} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,i=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${a}ms`)),a)});return Promise.race([s(e),i]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function co(e,t){var r,n;let o,a,i,s,l,u=await (ct??(ct=new Promise((e,t)=>{o4({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),o4))),ct),c={...t},d=(o=c,a=!1,{retarget:e=>o={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":a||(a=t);return;case"unmount":(t||a)&&i();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>cn(e,r)):cn(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function ca(){return ci}function ci(e,t){let r,n=co(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cs(e,t,r,n,o=e=>e,a={}){let i=uN(n),s=uA(n),l=null;if(e){let u;if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${t}'`);let{meta:c,moduleName:d,load:p}=s,f=ce++,m=`${t}/${n}-${f}`;e.dataset.extensionRenderingId=m;let h=e=>{try{uu(m)}catch(t){console.error(e,t)}};try{ul({renderingId:m,extensionName:i,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{u=await p()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await co(o({...u,name:`${t}/${i}-${f}`}),{...a,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}var cl=r(4923),cu=r.n(cl);let cc=(0,cl.createContext)({moduleName:"",featureName:""});function cd({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cl.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cu().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),iK({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:iH(e,t),...o},n)}let cp=({state:e,children:t,...r})=>{let{extension:n}=(0,cl.useContext)(cc),o=(0,cl.useRef)(null),a=(0,cl.useRef)(Promise.resolve()),i=(0,cl.useRef)(!1),s=(0,cl.useRef)(!1),l=(0,cl.useRef)(e),u=(0,cl.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":a.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cl.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(a.current=Promise.all([e.mountPromise,a.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cl.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cs(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cl.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(o.current)}),[]),(0,cl.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cu().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function cf(e){let t=(0,cl.useRef)(e);return O(t.current,e)||(t.current=e),t.current}function cm(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let ch=e=>e;function cg(e,t=ch,r){let n=(0,cl.useCallback)(t=>e.subscribe(t),[e]),o=(0,cl.useCallback)(()=>t(e.getState()),[e,t]),a=(0,cl.useSyncExternalStore)(n,o,o),i=(0,cl.useMemo)(()=>r?cm(e,r):null,[e,r]);return(0,cl.useMemo)(()=>i?{...a,...i}:a,[a,i])}function cy(e,t){return cg(e,ch,t)}function cv(e){return function(t){let r=(0,cl.useCallback)(t=>e.subscribe(t),[]),n=(0,cl.useCallback)(()=>e.getState(),[]),o=(0,cl.useSyncExternalStore)(r,n,n),a=(0,cl.useMemo)(()=>t?cm(e,t):null,[t]);return(0,cl.useMemo)(()=>a?{...o,...a}:o,[o,a])}}let cb=[];Object.freeze(cb);let cw={candidateExtensions:cb};Object.freeze(cw);let cE=e=>{let t=(0,cl.useCallback)(t=>t.slots?.[e]??cw,[e]);return cg(uc(),t)},cx=e=>e.session;function cD(e,t){let{candidateExtensions:r}=cE(e),n=cg(i8,cx),o=cf(t);return(0,cl.useMemo)(()=>uB(e,o),[e,o,n,r])}function c_(e,t){let{moduleName:r}=(0,cl.useContext)(cc);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cl.useEffect)(()=>{uU(r,e)},[r,e]),{extensions:cD(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function cS(e){return e}function ck({name:e,extensionSlotName:t,select:r=cS,children:n,state:o,style:a,...i}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,cl.useRef)(null),{extensions:u,extensionSlotModuleName:c}=c_(s,o),d=(0,cl.useMemo)(()=>r(u),[r,u]),p=(0,cl.useMemo)(()=>{if("function"==typeof n&&!cu().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cu().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...a,position:"relative"},...i},s&&d?.map((e,t)=>cu().createElement(cc.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},p?.[t]??("function"!=typeof n?n:null)??cu().createElement(cp,{state:o}))))}var cC=r(5338);function cP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cR(e){return(cR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cT(e){return(cT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cN(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(cT(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(cT(e)));return e}}var cj=null;try{cj=require("react").createContext()}catch(e){}var cA={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function c$(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cI(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,a=cB(e,t,function(){r(this)}),i=cN(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,a=t[r];if("function"!=typeof a)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(n),i;case"hydrateRoot":return a(o,n);default:return a(n,o),null}}({elementToRender:a,domElement:i,reactDom:cF(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cM(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():cF(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cL(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=cB(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var a=cN(e,t)();cF(e).render(n,a)}})}function cF(e){return e.ReactDOMClient||e.ReactDOM}function cB(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=cj?e.React.createElement(cj.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,cO(cO({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var cV=r(202),cU=r(2551),cW=r.n(cU),cH=r(7900);let cz={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},cK=new Map;(0,cH.initCache)(cK);let cG={errorRetryCount:3,fetcher:i5,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof i9){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>cK};function cZ(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},cz,e),r={...cG,...t.swrConfig};return function(e){var n,o,a,i,s;return a=o=class extends(n=cu().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cu().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cu().createElement(cl.Suspense,{fallback:null},cu().createElement(cU.SWRConfig,{value:r},cu().createElement(cc.Provider,{value:this.state.config},t.disableTranslations?cu().createElement(e,this.props):cu().createElement(cV.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},cu().createElement(e,this.props)))));return t.strictMode&&cu().StrictMode?cu().createElement(cu().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${t.featureName})`,i in a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function cY(e,t){return function(e){if("object"!==cR(e))throw Error("single-spa-react requires a configuration object");var t,r=cO(cO({},cA),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!cj&&r.React.createContext&&(cj=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:c$.bind(null,r),mount:cI.bind(null,r),unmount:cM.bind(null,r)};return r.parcelCanUpdate&&(n.update=cL.bind(null,r)),n}({React:cu(),ReactDOMClient:cC,rootComponent:cZ(t)(e)})}function cq(e,t){return()=>e().then(({default:e})=>cY(e,t))}function cJ(e,t){return()=>Promise.resolve(cY(e,t))}let cX=cq,cQ=j()(()=>({}));B("openmrs-app-context",cQ);let c0={};function c1(e,t=e=>e){let r=cQ.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function c2(e,t){cQ.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function c4(e){return null===e?null:Object.freeze(Object.assign({},e))}let c3=new Map;function c6(e,t){let r=(0,cl.useRef)(t??{}),n=(0,cl.useRef)(t=>c2(e,t)),o=(0,cl.useRef)(Symbol());return(0,cl.useEffect)(()=>{let r=t??{},n=o.current;return null===c1(e)?!function(e,t=c0){cQ.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===c0?{}:t})})}(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),c2(e,()=>r)),c3.set(e,n),()=>{c3.get(e)===n&&(cQ.setState(t=>(e in t&&delete t[e],t)),c3.delete(e))}},[e]),(0,cl.useEffect)(()=>{let n=t??{};O(r.current,n)||(c2(e,()=>n),r.current=n)},[t]),n.current}function c5({namespace:e,value:t}){return c6(e,t),null}let c9=({children:e,value:t,fallback:r})=>t?cu().createElement(cu().Fragment,null,e):r?cu().createElement(cu().Fragment,null,r):null;function c8(){let e=(0,cl.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cl.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function c7(e,t=e=>e??{}){let[r,n]=(0,cl.useState)(()=>{if(de(e))return;let r=c1(e);if(null!==r)return t?t(r):r});return(0,cl.useEffect)(()=>{if(de(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cl.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>O(e,r)?e:r)})(c4(o=c1(e))),cQ.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(c4(n)))})},[e,t]),r}function de(e){return"string"!=typeof e||0===e.trim().length}function dt(e){let t=cD(e);return(0,cl.useMemo)(()=>t.map(e=>e.id),[t])}function dr(e){return cE(e).candidateExtensions}function dn(e,t,r){let{data:n,error:o,mutate:a,isLoading:i,isValidating:s}=cW()(e?lr(e,t,r):null,i5);return(0,cl.useMemo)(()=>({isLoading:i,data:n?.data.results??[],error:o,mutate:a,isValidating:s}),[n,o,i,s,a])}function da(e){(0,cl.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let di={},ds=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
- Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dl(e){let{moduleName:t,extension:r}=(0,cl.useContext)(cc),n=e?.externalModuleName??t;if(!n&&!r)throw Error(ds);let o=function(e){let t=(0,cl.useMemo)(()=>nm(e),[e]),r=function(e){let[t,r]=(0,cl.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cl.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw di[e]||(di[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),di[e];return r}(n),a=function(e){let t=(0,cl.useMemo)(nv,[]),r=function(e,t){let[r,n]=(0,cl.useState)(t?()=>{let r=nw(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cl.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nw(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rw(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!di[r]&&t&&(di[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nw(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),di[r]}return r||{}}(r);return(0,cl.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...a},[n,e?.externalModuleName,o,a])}let du=cD;function dc(e,t=300){let[r,n]=(0,cl.useState)(e);return(0,cl.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dd=r(6880),dp=r.n(dd);let df=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function dm(){let e=`${i2}/emrapi/configuration?v=${df}`,t=dp()(e,i5);return(0,cl.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dh(){return(0,cl.useContext)(cc).extension}let dg=cv(ut());function dy(e){let t=cD(e);return(0,cl.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let dv=cv(uc());function db(e){let{flags:t}=cg(l2);return t[e]?.enabled??!1}function dw(){let[,e]=(0,cl.useState)(0);return(0,cl.useCallback)(()=>{e(e=>e+1)},[])}function dE(e,t,r={}){return dD(e,t,dx,r)}let dx={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i6(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function dD(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??i5,[d,p]=(0,cl.useState)(1),f=(0,cl.useRef)(NaN),m=(0,cl.useRef)(NaN),h=(0,cl.useRef)(d),g=(0,cl.useRef)(!1),y=(0,cl.useRef)(!1),v=e?.toString()??"",[b,w]=(0,cl.useState)(v);v!==b&&(w(v),p(1),h.current=1,f.current=NaN,m.current=NaN,g.current=!1,y.current=!1);let E=(d-1)*t,x=(0,cl.useMemo)(()=>o(e,t,E),[e,t,E]),{data:D,..._}=(l?dp():cW())(x,c,u);D?.data&&(f.current=a(D?.data),m.current=i(D?.data),g.current=!0);let S=Math.ceil(f.current/t),k=(0,cl.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(f.current/t);!g.current||Number.isNaN(r)||e<=r?(h.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cl.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(f.current)){y.current||(y.current=!0,console.warn(`useServerPagination: ${v} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(f.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),h.current=e,p(e))},[d,t,v,D]);let C=(0,cl.useCallback)(()=>{k(h.current+1)},[k]),P=(0,cl.useCallback)(()=>{k(h.current-1)},[k]);return{data:s(D?.data),totalPages:S,totalCount:f.current,currentPage:d,currentPageSize:m.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:k,goToNext:C,goToPrevious:P,..._}}function d_(e,t,r={}){return dD(e,t,dS(),r)}function dS(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i6(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var dk=r(6310),dC=r.n(dk);function dP(e,t={}){return dO(e,dx,t)}function dO(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:a,getTotalCount:i,getData:s}=t,l=r.fetcher??i5,u=(0,cl.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=dC()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),m=a(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=m,loadMore:()=>{p((c?.length??0)+1)},nextUri:m,...f}}function dR(e,t={}){return dT(e,dx,t)}function dT(e,t,r={}){let n=dO(e,t,r),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cl.useEffect)(()=>{o&&!a&&s()},[o,u]),r.partialData)?n:{...n,data:o||a?void 0:i,isLoading:l||o}}function dN(e,t={}){return dT(e,dS(),t)}function dj(e,t={}){return dO(e,dS(),t)}function dA(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function d$(){let[e,t]=(0,cl.useState)(dA);return(0,cl.useEffect)(()=>{let e=()=>{t(dA())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dI=e=>"small-desktop"===e||"large-desktop"===e;function dM(e){let t=(0,cl.useContext)(cc);(0,cl.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),uz(e),()=>{uK(e.name)}),[t,e])}function dL(){return cg(uH)}let dF=[];function dB(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),{data:o}=dR(`${i2}/location${n?"?"+n:""}`,{immutable:!0});return o??dF}function dV(e,t=!0){let r=(0,cl.useRef)(null);return(0,cl.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function dU(e){let t=(0,cl.useRef)();return(0,cl.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function dW(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:a}=t,i=c8(),s=(0,cl.useMemo)(()=>n?.signal??r?.signal??i.signal,[r?.signal,n?.signal,i.signal]),l=(0,cl.useCallback)(e=>i5(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return cW()(e,l,a)}function dH(e=[],t=10){let[r,n]=(0,cl.useState)(1),o=(0,cl.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let a=Math.min(Math.max(1,r),o),i=(0,cl.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),s=(0,cl.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cl.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cl.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cl.useMemo)(()=>({results:i,totalPages:o,currentPage:a,paginated:e.length>t,showNextButton:a<o,showPreviousButton:a>1,goTo:s,goToNext:l,goToPrevious:u}),[i,o,e.length,t,a,s,l,u])}function dz(e,t,r,n){return{pageSizes:(0,cl.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cl.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function dK(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function dG(e){let[t,r]=(0,cl.useState)(e??dK()),{data:n,error:o,isValidating:a}=cW()(t?["patient",t]:null,()=>la(t,{}));return(0,cl.useEffect)(()=>{let e=()=>{let e=dK();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cl.useMemo)(()=>({isLoading:a&&!o&&!n,patient:n,patientUuid:t,error:o}),[a,o,n,t])}function dZ(){let e=`${i2}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=cW()(e,i5);return(0,cl.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function dY(e){let{extensions:t,extensionSlotModuleName:r}=c_(e);return e?t.map(t=>({state:n})=>cu().createElement(cc.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cu().createElement(cp,{state:n}))):[]}function dq(){let e=(0,cl.useRef)(),[t,r]=(0,cl.useState)(null),n=null;if(!t){if(a){let e=sn().getState();e.loaded&&(n=e.session)}else a=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(sn().getState()),n||(e.current=sn().subscribe(r))});if(n)r(n);else throw a}(0,cl.useEffect)(()=>(e.current||(e.current=sn().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(a)throw console.warn("useSession is in an unexpected state. Attempting to recover."),a;else throw Error("useSession is in an invalid state.");return o}let dJ=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cl.useState)(null);return((0,cl.useEffect)(()=>{let e=sn(),t=e.subscribe(({loaded:e,session:t})=>{o(e?t?.user??null:null)}),{loaded:r,session:n}=e.getState();return r&&o(n?.user??null),t},[]),n&&ss(e,n))?cu().createElement(cu().Fragment,null,r):t?cu().createElement(cu().Fragment,null,t):null};var dX=r(4353),dQ=r.n(dX),d0=r(7581);let d1=new Map;function d2(){for(let e of Array.from(d1.values()))e()}let d4={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function d3(e){let t=(0,cl.useId)();return(0,cl.useEffect)(()=>{if(e)return d1.set(t,e),()=>{d1.delete(t)}},[t,e]),{...cy(ly(),d4),mutateVisit:d2}}function d6(e,t=lh){let r=(0,cl.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:a}=d3((0,cl.useCallback)(()=>r.current?.(),[])),i=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=cW()(e?`${i2}/visit${s}`:null,i5),{data:f,error:m,mutate:h,isValidating:g}=cW()(e&&i?`${i2}/visit${l}`:null,i5),y=(0,cl.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,cl.useMemo)(()=>i&&f?f.data:null,[f,i]),b=(0,cl.useRef)(null);(0,cl.useEffect)(()=>{!p&&y&&n===e&&null===o&&a(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&a(null),b.current=v)},[v,o,y,p,g,n]);let w=(0,cl.useCallback)(()=>{d(),h()},[d,h]);(0,cl.useEffect)(()=>{r.current=w},[w]);let E=!!(!u||i&&!f),x=!!(i?m:c);return{error:c||m,mutate:w,isValidating:p||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:E&&!x}}dX.extend(d0);let d5=[];function d9(){let{data:e}=dp()(ld,lp);return e??d5}let d8=new Map;async function d7(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,a=n?t.substring(r+1):t,i=await sF(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?pt(o,i).then(()=>i[a]()):(i?i&&Object.hasOwn(i,a)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${a}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),pe)}let pe={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function pt(e,t){if(e in d8)await d8[e];else{let r=t??await sF(e);await (d8[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nV(e),t(null)}).catch(n)}nV(e),t(null)}))}}function pr(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
15
+ ${this.stack}`}}let i8=F("session",{loaded:!1,session:null}),i7=0,se=null;function st(){return se||(i8.getState().loaded&&i7>=Date.now()-6e4?null:sa())}function sr(e){let t=e?.includeAuthStatus??!0,r=e=>t?e:e.user,n=st();return n?new Promise(e=>{let t=()=>{let t=i8.getState();t.loaded&&(o(),e(r(t.session)))},o=i8.subscribe(t);n.then(t,t)}):Promise.resolve(r(i8.getState().session))}function sn(){return st(),i8}function so(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function sa(e,t){i7=Date.now();let r={};e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let n=sh(i5(i3,{headers:r,rejectAuthFailure:!0})),o=()=>{se===n&&(se=null)};return n.then(o,o),se=n,n}function si(){i8.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function ss(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!H(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!H(n.privileges.find(t=>e===t.display))):(H(r)||console.error(`Could not understand privileges "${r}"`),!0))||!H(t.roles.find(e=>"System Developer"===e.display))}function sl(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(i8.getState()),e||(t=i8.subscribe(n))})}async function su(){return(await sr()).sessionLocation}async function sc(e,t){return sh(i5(i3,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function sd(e,t){return await i5(i3,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),sa()}async function sp(e,t,r){return r||(r=new AbortController),await i5(`${i2}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),sa()}async function sf(e,t=!1){let r=await i5(t?`${i3}?rememberMe=true`:i3,{headers:{"X-Totp-Code":e}});return r.data?.authenticated?(await sa()).session:r.data}async function sm(){try{await i5(i3,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!sg(e))throw e}si(),await sa().catch(()=>{})}function sh(e){return new Promise((t,r)=>{e.then(e=>{if("object"==typeof e?.data){let r={loaded:!0,session:e.data};i8.setState(r,!0),t(r)}else r(sy(Error("The session endpoint did not respond with a session")))}).catch(e=>{if(sg(e)){var n;"object"==typeof(n=e.responseBody)&&null!==n&&!1===n.authenticated?i8.setState({loaded:!0,session:e.responseBody},!0):si(),t(i8.getState());return}k(`Failed to fetch new session information: ${e}`),r(sy(e))})})}function sg(e){return e instanceof i9&&(401===e.response.status||403===e.response.status)}function sy(e){return i8.getState().loaded||i8.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e))},!0),i8.getState()}function sv(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}i8.subscribe(e=>{e.loaded&&e.session&&so(e.session)});let sb={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function sw(){nF("@openmrs/esm-api",i0),sa()}let sE="import-map-override:",sx="import-map-overrides-disabled",sD="import-map-overrides:change",s_=!1,sS=null,sk=null;async function sC(){return sk??(sk=sP().then(({map:e,complete:t})=>(t||(sk=null),e))),sk}async function sP(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:sO(t),complete:r}}function sO(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sR(){let e={};try{let t=s$();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sE)){let r=n.slice(sE.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function sT(){let e=await sC();return s_?sO([e,sS??sR()]):e}async function sN(){return sC()}async function sj(){return s_?sO([await sC(),sR()]):sC()}function sA(e){if(!s_)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sE)){let t=localStorage.getItem(r);t&&(e[r.slice(sE.length)]=t)}}return{imports:e}}return sR()}function s$(){if(!s_)return[];try{let e=localStorage.getItem(sx);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sI(e){return!!s_&&s$().includes(e)}function sM(e,t){if(!s_)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sE+e,t),window.dispatchEvent(new CustomEvent(sD))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sL(e){if(!s_)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sE+e);let t=s$().filter(t=>t!==e);t.length>0?localStorage.setItem(sx,JSON.stringify(t)):localStorage.removeItem(sx),window.dispatchEvent(new CustomEvent(sD))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sF(){if(!s_)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(sE)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sx),window.dispatchEvent(new CustomEvent(sD))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sB(e){if(!s_)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=s$().filter(t=>t!==e);t.length>0?localStorage.setItem(sx,JSON.stringify(t)):localStorage.removeItem(sx),window.dispatchEvent(new CustomEvent(sD))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sV=!1;function sU(){!sV&&(sV=!0,(s_="development"===window.spaEnv)&&(sS=sR()))}function sW(e){return e.replace(/[\/\-@]/g,"_")}async function sH(e,t="./start",n){var o;let a,i=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sz(e,n?.importMap),new Promise((t,r)=>{a=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=i)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},i)})]),a&&clearTimeout(a);let s=sW(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function sz(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=sW(e);if(!window[r]){let r=t??await sK();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in sA().imports;try{return await function(e){var t;let r=(t=window)[sG]??(t[sG]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let a=new Promise((t,n)=>{let a=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function i(){clearTimeout(a),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),r.delete(e),o.remove();let a=`Failed to load script from ${e}`;console.error(a,t),n(t.message??a)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,a),a}(n)}catch(e){return o&&w({kind:"error",title:iW("scriptLoadingFailed","Error: Script failed to load"),description:iW("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:iW("resetOverrides","Reset overrides"),onActionButtonClick(){sF(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sK(){return sT()}let sG=Symbol.for("__openmrs_script_loading");function sZ(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function sY(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&sZ(t))}let sq="openmrs-routes:",sJ="openmrs-routes:change",sX=!1,sQ=null,s0=null;async function s1(){return s0??(s0=s2().then(({map:e,complete:t})=>(t||(s0=null),e))),s0}async function s2(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&sY(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:s4(t),complete:r}}function s4(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function s3(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(sq)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(sq.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sZ(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sZ(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function s6(){let e=await s1();return sX?s4([e,sQ??await s3()]):e}async function s5(){return s1()}async function s9(){return sX?s4([await s1(),await s3()]):s1()}function s8(){if(!sX)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sq)){let t=localStorage.getItem(r);t&&(e[r.slice(sq.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function s7(e,t){if(!sX)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sq+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sZ(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sq+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(sq+e,JSON.stringify(t.toString()));else{if(!sZ(t))return void 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);localStorage.setItem(sq+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sJ))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function le(e){if(!sX)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sq+e),window.dispatchEvent(new CustomEvent(sJ))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function lt(){if(!sX)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(sq)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sJ))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let lr=null;function ln(){return lr||(lr=(sX="development"===window.spaEnv)?s3().then(e=>{sQ=e}):Promise.resolve())}let lo=`${i2}/attachment`;function la(e,t){return i5(`${lo}/${e}`,{signal:t.signal})}function li(e,t,r,n){return i5(ls(e,t,n),{signal:r.signal})}function ls(e,t,r){return r?`${lo}?patient=${e}&encounter=${r}`:`${lo}?patient=${e}&includeEncounterless=${t}`}async function ll(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),i5(`${lo}`,{method:"POST",body:n})}function lu(e,t){return i5(`${lo}/${e}`,{method:"DELETE",signal:t.signal})}async function lc(e,t){return e?(await i5(`${i4}/Patient/${e}`,t)).data:null}function ld(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lp(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}function lf(e){return{uuid:e.uuid,display:e.display}}function lm(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return i5(`${i2}/location${n?"?"+n:""}`).then(e=>e.data.results.map(lf))}function lh(e){return{uuid:e.uuid,display:e.display,name:e.name}}let lg=`${i2}/visittype`;function ly(e=lg){return i5(e).then(e=>e.data.results.map(lh))}var lv=((Q={}).NEWVISIT="startVisit",Q.EDITVISIT="editVisit",Q.LOADING="loadingVisit",Q),lb=((ee={}).NOTSTARTED="notStarted",ee.ONGOING="ongoing",ee);let lw="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",lE=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lx(){return V("visit",lE)}function lD(e,t){lx().setState({patientUuid:e,manuallySetVisitUuid:t})}function l_(e,t){return i5(`${i2}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lS(e,t,r){return i5(`${i2}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lk(e,t,r){return i5(`${i2}/visit?patient=${e}&v=${r??lw}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lx().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lC{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lC.version}static addUnaryOp(e){return lC.max_unop_len=Math.max(e.length,lC.max_unop_len),lC.unary_ops[e]=1,lC}static addBinaryOp(e,t,r){return lC.max_binop_len=Math.max(e.length,lC.max_binop_len),lC.binary_ops[e]=t,r?lC.right_associative.add(e):lC.right_associative.delete(e),lC}static addIdentifierChar(e){return lC.additional_identifier_chars.add(e),lC}static addLiteral(e,t){return lC.literals[e]=t,lC}static removeUnaryOp(e){return delete lC.unary_ops[e],e.length===lC.max_unop_len&&(lC.max_unop_len=lC.getMaxKeyLen(lC.unary_ops)),lC}static removeAllUnaryOps(){return lC.unary_ops={},lC.max_unop_len=0,lC}static removeIdentifierChar(e){return lC.additional_identifier_chars.delete(e),lC}static removeBinaryOp(e){return delete lC.binary_ops[e],e.length===lC.max_binop_len&&(lC.max_binop_len=lC.getMaxKeyLen(lC.binary_ops)),lC.right_associative.delete(e),lC}static removeAllBinaryOps(){return lC.binary_ops={},lC.max_binop_len=0,lC}static removeLiteral(e){return delete lC.literals[e],lC}static removeAllLiterals(){return lC.literals={},lC}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new lC(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return lC.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lC.binary_ops[String.fromCharCode(e)]||lC.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lC.isIdentifierStart(e)||lC.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(lC.hooks[e]){let r={context:this,node:t};return lC.hooks.run(e,r),r.node}return t}searchHook(e){if(lC.hooks[e]){let t={context:this};return lC.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lC.SPACE_CODE||e===lC.TAB_CODE||e===lC.LF_CODE||e===lC.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:lC.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lC.SEMCOL_CODE||r===lC.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,lC.max_binop_len),t=e.length;for(;t>0;){if(lC.binary_ops.hasOwnProperty(e)&&(!lC.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lC.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,a,i,s,l;if(!(a=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return a;for(o={value:t,prec:lC.binaryPrecedence(t),right_a:lC.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[a,o,i];t=this.gobbleBinaryOp();){if(0===(r=lC.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lC.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)i=n.pop(),t=n.pop().value,a=n.pop(),e={type:lC.BINARY_EXP,operator:t,left:a,right:i},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lC.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lC.isDecimalDigit(e)||e===lC.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lC.SQUOTE_CODE||e===lC.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lC.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lC.max_unop_len)).length;r>0;){if(lC.unary_ops.hasOwnProperty(t)&&(!lC.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lC.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lC.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lC.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lC.literals.hasOwnProperty(n.name)?n={type:lC.LITERAL,value:lC.literals[n.name],raw:n.name}:n.name===lC.this_str&&(n={type:lC.THIS_EXP})):e===lC.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lC.PERIOD_CODE||t===lC.OBRACK_CODE||t===lC.OPAREN_CODE||t===lC.QUMARK_CODE;){let r;if(t===lC.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lC.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lC.OBRACK_CODE?((e={type:lC.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lC.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lC.OPAREN_CODE?e={type:lC.CALL_EXP,arguments:this.gobbleArguments(lC.CPAREN_CODE),callee:e}:(t===lC.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lC.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lC.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lC.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lC.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));lC.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lC.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lC.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lC.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lC.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lC.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:lC.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lC.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lC.isIdentifierPart(e))this.index++;else break;return{type:lC.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lC.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lC.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lC.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lC.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lC.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lC.CPAREN_CODE);if(this.code===lC.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lC.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lC.ARRAY_EXP,elements:this.gobbleArguments(lC.CBRACK_CODE)}}}Object.assign(lC,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(lC),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),lC.max_unop_len=lC.getMaxKeyLen(lC.unary_ops),lC.max_binop_len=lC.getMaxKeyLen(lC.binary_ops);let lP=e=>new lC(e).parse(),lO=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lC).filter(e=>!lO.includes(e)&&void 0===lP[e]).forEach(e=>{lP[e]=lC[e]}),lP.Jsep=lC,lP.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let lR="ArrowFunctionExpression",lT={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},lN={...lT,Promise};function lj(e,t={}){return lF(e,t,lU)}async function lA(e,t={}){return lB(e,t,lU)}function l$(e,t={}){return lF(e,t,lW)}function lI(e,t={}){return lB(e,t,lW)}function lM(e,t={}){return lF(e,t,lH)}function lL(e,t={}){return lB(e,t,lH)}function lF(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=lY(t,lT),o=lz("string"==typeof e?lP(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function lB(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=lY(t,lN);return Promise.resolve(lz("string"==typeof e?lP(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function lV(e){return lP(e)}function lU(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lW(e){return"boolean"==typeof e}function lH(e){return"number"==typeof e}function lz(e,t){switch(e.type){case"UnaryExpression":var r,n,o,a,i,s,l,u,c,d,p,f,m,h=e,g=t;let y=lz(h.argument,g);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,b=t;switch(v.operator){case"&&":return lz(v.left,b)&&lz(v.right,b);case"||":return lz(v.left,b)||lz(v.right,b);case"??":return lz(v.left,b)??lz(v.right,b)}let w=lz(v.left,b),E=lz(v.right,b);switch(v.operator){case"+":return w+E;case"-":return w-E;case"*":return w*E;case"/":return w/E;case"%":return w%E;case"**":return w**E;case"==":return w==E;case"===":return w===E;case"!=":return w!=E;case"!==":return w!==E;case">":return w>E;case">=":return w>=E;case"<":return w<E;case"<=":return w<=E;case"in":return w in E;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return r=e,n=t,lz(r.test,n)?lz(r.consequent,n):lz(r.alternate,n);case"CallExpression":return lX(lG(e,t));case"ArrowFunctionExpression":let x;return o=e,a=t,x=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<x.length)throw`Required argument(s) ${x.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(x.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return lz(o.body,a.addVariables(t))}).bind(null);case"MemberExpression":return lX(lZ(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(lQ(s));case"SequenceExpression":let D;return l=e,u=t,(D=l.expressions.map(lQ(u)))[D.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(lQ(S));switch(_.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${_.callee.name}`}}if(_.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(l0(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let k,C;return p=e,f=t,k=p.expressions?.map(lQ(f))??[],(C=p.quasis?.map(lQ(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+k.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(m=e).cooked,tail:m.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lK(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lK(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lG(e,t){let r=lJ(e.callee,t);if(r===lq||e.optional&&null==r)return lq;let n=e.arguments?.map(lQ(t));if(r){if("function"!=typeof r)throw`${l4(e.callee)} is not a function`}else throw`No function named ${l4(e.callee)} is defined in this context`;return r(...n)}function lZ(e,t){let r=lJ(e.object,t);if(r===lq||e.optional&&null==r)return lq;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${l2(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=lK(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${l2(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(lz(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);l0(n),function(e,t){if(l1.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function lY(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lP.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:lR,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=lR,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lP.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lP.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(n+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(i===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,a=u,95===o||a.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),lP.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{n=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lP.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lP.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",a=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=i}else n+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lP.addBinaryOp("in",7),lP.addBinaryOp("??",1);let lq=Symbol("optional chain short-circuited");function lJ(e,t){switch(e.type){case"MemberExpression":return lZ(e,t);case"CallExpression":return lG(e,t);default:return lz(e,t)}}function lX(e){return e===lq?void 0:e}function lQ(e){return function(t){return null===t?null:lz(t,e)}}function l0(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let l1=new Set(["toString","valueOf","hasOwnProperty"]);function l2(e,t){try{return lK(e,t)}catch{return"<computed>"}}function l4(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function l3(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...lN},isLocalExpression:!1,variables:new Set};return l6("string"==typeof e?lP(e):e,t),[...t.variables]}function l6(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,l6(n.argument,o);case"BinaryExpression":return a=e,i=t,[l6(a.left,i),l6(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[l6(s.consequent,l),l6(s.test,l),l6(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=l6(u.callee,c),u.arguments?.map(l5(c)),r;case"ArrowFunctionExpression":var n,o,a,i,s,l,u,c,d,p,f,m,h,g,y,v,b=e,w=t;let E={...w};E.isLocalExpression=!0;let x=b.params?.map(l5(E))??[],D=l6(b.body,E)??[];if(D&&Array.isArray(D))for(let e of D)x.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(l6(_.object,S),_.computed)return void l6(_.property,S);let k={...S};k.isLocalExpression=!0,l6(_.property,k);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(l5(p));case"SequenceExpression":return f=e,m=t,void f.expressions?.map(l5(m));case"NewExpression":return h=e,g=t,void h.arguments?.map(l5(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,P=t;if(!(C.name in P.globals))if(P.isLocalExpression)return C.name;else P.variables.add(C.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(l5(v)),y.quasis?.map(l5(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function l5(e){return function(t){return null===t?null:l6(t,e)}}let l9=V("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function l8(e,t,r){l9.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function l7(){let e=l9.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function ue(e){return l9.getState().flags[e].enabled}function ut(e,t){l9.subscribe(r=>{t(r.flags[e].enabled)})}function ur(e,t){l9.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}l9.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var un=tL(function(e,t,r){tR(e,t,r)});let uo=F("extensionsInternal",{slots:{},extensions:{}}),ua=F("extensionRenderings",{renderings:new Map}),ui=()=>V("extensionsInternal",{slots:{},extensions:{}}),us=()=>V("extensionRenderings",{renderings:new Map});function ul(e){let t=uo.getState(),r=e(t);r!==t&&uo.setState(r)}let uu=null,uc=null;function ud(){let e=ua.getState();return uu&&e===uc||(uu=new Map(e.renderings),uc=e,function(e){for(let t of(uE.clear(),e.values()))uD(t,1);ux=!0}(uu)),uu}function up(e){uc={renderings:e},ua.setState(uc,!0)}function uf(e){let t=ud();t.has(e.renderingId)||(t.set(e.renderingId,e),uD(e,1),up(t))}function um(e){let t=ud(),r=t.get(e);r&&(t.delete(e),uD(r,-1),up(t))}let uh=()=>V("extensions",{slots:{}}),ug=0,uy=new Set;function uv(e){ug++;try{return e()}finally{if(0==--ug&&uy.size>0){let e=Array.from(uy);for(let t of(uy.clear(),e))ub(t)}}}function ub(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function uw(e){ug>0?uy.add(e):ub(e)}let uE=new Map,ux=!1;function uD(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=uE.get(r);if(!n){if(t<0)return;uE.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),ux=!0;return}n.count+=t,n.count<1&&(uE.delete(r),ux=!0)}function u_(){var e,t;if(ud(),!ux)return;ux=!1;let r=Array.from(uE.values(),({record:e})=>e);r.sort(uS),e=nf.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===uS(e,t[r]))||nf.setState({mountedExtensions:r})}function uS(e,t){return uk(e.slotName,t.slotName)||uk(e.extensionId,t.extensionId)||uk(e.slotModuleName,t.slotModuleName)||uk(e.extensionModuleName,t.extensionModuleName)}function uk(e,t){return e===t?0:e<t?-1:1}u_(),ua.subscribe(()=>uw(u_));let uC=ui(),uP=uh(),uO=nh(),uR=nv(),uT=new Set,uN=!1;function uj(e){if(null===e)uT=null;else if(null!==uT)for(let t of e)uT.add(t);uw(uA)}function uA(){if(!uN){uN=!0;try{for(let e=1;;e++){let t=uT;if(null!==t&&0===t.size)return;uT=new Set;try{!function(e,t,r,n,o,a=null){let i=uP.getState().slots,s={},l=!1,u=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,c]of Object.entries(e.slots)){let d=i[n];if(d&&a&&!a.has(n)){s[n]=d;continue}let{config:p}=ny(t,c.name),f=function(e,t,r,n,o,a){let i=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:a}=uC.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>uH(e,o,a[uM(e)]?.order,t)-uH(r,o,a[uM(r)]?.order,t))}(r,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=nw(n,e,l),u=nE(r,e,l),c=u?un({},i,u):i,d=uM(l),p=t.extensions[d];if(p){let e=c?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!ss(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag))continue;s.push({id:l,name:d,moduleName:p.moduleName,config:c,featureFlag:p.featureFlag,meta:p.meta,displayConditionExpression:c?.["Display conditions"]?.expression||p.displayExpression})}}return s}(n,e,p,r,u,o.session);d&&d.moduleName===c.moduleName&&rw(d.candidateExtensions,f)?s[n]=d:(s[n]={moduleName:c.moduleName,candidateExtensions:f},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uP.setState({slots:s})}(uC.getState(),uO.getState(),uR.getState(),l9.getState(),i8.getState(),t)}catch(e){throw uT=null===t||null===uT?null:new Set([...t,...uT]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{uN=!1}}}function u$(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function uI(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uM(e){let[t]=e.split("#");return t}function uL(e,t){let r=uM(t);return e.extensions[r]}function uF(e){return uL(uC.getState(),e)}uC.subscribe((e,t)=>{uj(e.extensions!==t.extensions?null:u$(e.slots,t.slots))}),uO.subscribe((e,t)=>{uj(u$(e.slots,t.slots))}),uR.subscribe((e,t)=>{uj(u$(e.configs,t.configs))}),l9.subscribe(()=>uj(null)),i8.subscribe(()=>uj(null)),uj(null);let uB=e=>ul(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uV(e,t){ul(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...uI(e),attachedIds:[t]}}}})}function uU(e,t){ul(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function uW(e){ul(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function uH(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function uz(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let a=e.displayConditionExpression;if("string"!=typeof a||0===a.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!l$(a,o)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(uK(e),t,i8.getState().session,e)}function uK(e){return uP.getState().slots[e]?.candidateExtensions??[]}let uG=(e,t)=>uC.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=uI(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),uZ=()=>{uT=null,ul(()=>({slots:{},extensions:{}})),us().setState({renderings:new Map}),uP.setState({slots:{}})},uY=F("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uq({name:e,basePath:t,mode:r,componentContext:n,state:o}){uY.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function uJ(e){uY.getState().slotName===e&&uY.setState(uY.getInitialState(),!0)}let uX=F("modalRegistry",{modals:{}});function uQ(e){uX.setState(t=>(t.modals[e.name]=e,t))}function u0(e){let t=uX.getState().modals[e];if(!t){let r=uF(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),uQ(t))}return t}let u1=F("workspaceRegistrations",{workspaces:{}}),u2=F("workspaceGroups",{workspaceGroups:{}});function u4(e){u1.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function u3(e){u2.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let u6=new Set;function u5(e){let t=u1.getState().workspaces;if(t[e])return t[e];{let t=uF(e);if(t){var r;let n;return u6.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),u6.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?iU(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function u9(e){let t=u2.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let u8=F("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function u7(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=u8.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function ce(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=u8.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function ct(e){let{openedWindows:t}=u8.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function cr(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=u8.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}u8.setState({registeredGroupsByName:n})}function cn(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=u8.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u8.setState({registeredWindowsByName:n})}function co(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=u8.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}u8.setState({registeredWorkspacesByName:n})}let ca=0,ci=null,cs={bootstrap:15e3,mount:15e3,unmount:15e3};function cl(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(cs).filter(t=>e[t]).map(n=>{var o,a;let i,s;return[n,(o=e[n],a=cs[n],i=Array.isArray(o)?o:[o],s=e=>i.reduce((t,o,a)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${a} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,i=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${a}ms`)),a)});return Promise.race([s(e),i]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function cu(e,t){var r,n;let o,a,i,s,l,u=await (ci??(ci=new Promise((e,t)=>{o4({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),o4))),ci),c={...t},d=(o=c,a=!1,{retarget:e=>o={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":a||(a=t);return;case"unmount":(t||a)&&i();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>cl(e,r)):cl(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function cc(){return cd}function cd(e,t){let r,n=cu(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cp(e,t,r,n,o=e=>e,a={}){let i=uM(n),s=uF(n),l=null;if(e){let u;if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${t}'`);let{meta:c,moduleName:d,load:p}=s,f=ca++,m=`${t}/${n}-${f}`;e.dataset.extensionRenderingId=m;let h=e=>{try{um(m)}catch(t){console.error(e,t)}};try{uf({renderingId:m,extensionName:i,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{u=await p()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await cu(o({...u,name:`${t}/${i}-${f}`}),{...a,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}var cf=r(4923),cm=r.n(cf);let ch=(0,cf.createContext)({moduleName:"",featureName:""});function cg({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cf.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cm().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),iK({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:iH(e,t),...o},n)}let cy=({state:e,children:t,...r})=>{let{extension:n}=(0,cf.useContext)(ch),o=(0,cf.useRef)(null),a=(0,cf.useRef)(Promise.resolve()),i=(0,cf.useRef)(!1),s=(0,cf.useRef)(!1),l=(0,cf.useRef)(e),u=(0,cf.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":a.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cf.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(a.current=Promise.all([e.mountPromise,a.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cf.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cp(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cf.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(o.current)}),[]),(0,cf.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cm().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function cv(e){let t=(0,cf.useRef)(e);return O(t.current,e)||(t.current=e),t.current}function cb(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let cw=e=>e;function cE(e,t=cw,r){let n=(0,cf.useCallback)(t=>e.subscribe(t),[e]),o=(0,cf.useCallback)(()=>t(e.getState()),[e,t]),a=(0,cf.useSyncExternalStore)(n,o,o),i=(0,cf.useMemo)(()=>r?cb(e,r):null,[e,r]);return(0,cf.useMemo)(()=>i?{...a,...i}:a,[a,i])}function cx(e,t){return cE(e,cw,t)}function cD(e){return function(t){let r=(0,cf.useCallback)(t=>e.subscribe(t),[]),n=(0,cf.useCallback)(()=>e.getState(),[]),o=(0,cf.useSyncExternalStore)(r,n,n),a=(0,cf.useMemo)(()=>t?cb(e,t):null,[t]);return(0,cf.useMemo)(()=>a?{...o,...a}:o,[o,a])}}let c_=[];Object.freeze(c_);let cS={candidateExtensions:c_};Object.freeze(cS);let ck=e=>{let t=(0,cf.useCallback)(t=>t.slots?.[e]??cS,[e]);return cE(uh(),t)},cC=e=>e.session;function cP(e,t){let{candidateExtensions:r}=ck(e),n=cE(i8,cC),o=cv(t);return(0,cf.useMemo)(()=>uz(e,o),[e,o,n,r])}function cO(e,t){let{moduleName:r}=(0,cf.useContext)(ch);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cf.useEffect)(()=>{uG(r,e)},[r,e]),{extensions:cP(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function cR(e){return e}function cT({name:e,extensionSlotName:t,select:r=cR,children:n,state:o,style:a,...i}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,cf.useRef)(null),{extensions:u,extensionSlotModuleName:c}=cO(s,o),d=(0,cf.useMemo)(()=>r(u),[r,u]),p=(0,cf.useMemo)(()=>{if("function"==typeof n&&!cm().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cm().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...a,position:"relative"},...i},s&&d?.map((e,t)=>cm().createElement(ch.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},p?.[t]??("function"!=typeof n?n:null)??cm().createElement(cy,{state:o}))))}var cN=r(5338);function cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cj(Object(r),!0).forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cj(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c$(e){return(c$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cI(e){return(cI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cM(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(cI(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(cI(e)));return e}}var cL=null;try{cL=require("react").createContext()}catch(e){}var cF={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function cB(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cV(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,a=cz(e,t,function(){r(this)}),i=cM(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,a=t[r];if("function"!=typeof a)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(n),i;case"hydrateRoot":return a(o,n);default:return a(n,o),null}}({elementToRender:a,domElement:i,reactDom:cH(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cU(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():cH(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cW(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=cz(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var a=cM(e,t)();cH(e).render(n,a)}})}function cH(e){return e.ReactDOMClient||e.ReactDOM}function cz(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=cL?e.React.createElement(cL.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,cA(cA({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var cK=r(202),cG=r(2551),cZ=r.n(cG),cY=r(7900);let cq={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},cJ=new Map;(0,cY.initCache)(cJ);let cX={errorRetryCount:3,fetcher:i5,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof i9){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>cJ};function cQ(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},cq,e),r={...cX,...t.swrConfig};return function(e){var n,o,a,i,s;return a=o=class extends(n=cm().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cm().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cm().createElement(cf.Suspense,{fallback:null},cm().createElement(cG.SWRConfig,{value:r},cm().createElement(ch.Provider,{value:this.state.config},t.disableTranslations?cm().createElement(e,this.props):cm().createElement(cK.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},cm().createElement(e,this.props)))));return t.strictMode&&cm().StrictMode?cm().createElement(cm().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${t.featureName})`,i in a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function c0(e,t){return function(e){if("object"!==c$(e))throw Error("single-spa-react requires a configuration object");var t,r=cA(cA({},cF),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!cL&&r.React.createContext&&(cL=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:cB.bind(null,r),mount:cV.bind(null,r),unmount:cU.bind(null,r)};return r.parcelCanUpdate&&(n.update=cW.bind(null,r)),n}({React:cm(),ReactDOMClient:cN,rootComponent:cQ(t)(e)})}function c1(e,t){return()=>e().then(({default:e})=>c0(e,t))}function c2(e,t){return()=>Promise.resolve(c0(e,t))}let c4=c1,c3=j()(()=>({}));B("openmrs-app-context",c3);let c6={};function c5(e,t=e=>e){let r=c3.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function c9(e,t){c3.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function c8(e){return null===e?null:Object.freeze(Object.assign({},e))}let c7=new Map;function de(e,t){let r=(0,cf.useRef)(t??{}),n=(0,cf.useRef)(t=>c9(e,t)),o=(0,cf.useRef)(Symbol());return(0,cf.useEffect)(()=>{let r=t??{},n=o.current;return null===c5(e)?!function(e,t=c6){c3.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===c6?{}:t})})}(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),c9(e,()=>r)),c7.set(e,n),()=>{c7.get(e)===n&&(c3.setState(t=>(e in t&&delete t[e],t)),c7.delete(e))}},[e]),(0,cf.useEffect)(()=>{let n=t??{};O(r.current,n)||(c9(e,()=>n),r.current=n)},[t]),n.current}function dt({namespace:e,value:t}){return de(e,t),null}let dr=({children:e,value:t,fallback:r})=>t?cm().createElement(cm().Fragment,null,e):r?cm().createElement(cm().Fragment,null,r):null;function dn(){let e=(0,cf.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cf.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function da(e,t=e=>e??{}){let[r,n]=(0,cf.useState)(()=>{if(di(e))return;let r=c5(e);if(null!==r)return t?t(r):r});return(0,cf.useEffect)(()=>{if(di(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cf.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>O(e,r)?e:r)})(c8(o=c5(e))),c3.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(c8(n)))})},[e,t]),r}function di(e){return"string"!=typeof e||0===e.trim().length}function ds(e){let t=cP(e);return(0,cf.useMemo)(()=>t.map(e=>e.id),[t])}function dl(e){return ck(e).candidateExtensions}function du(e,t,r){let{data:n,error:o,mutate:a,isLoading:i,isValidating:s}=cZ()(e?ls(e,t,r):null,i5);return(0,cf.useMemo)(()=>({isLoading:i,data:n?.data.results??[],error:o,mutate:a,isValidating:s}),[n,o,i,s,a])}function dc(e){(0,cf.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dd={},dp=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function df(e){let{moduleName:t,extension:r}=(0,cf.useContext)(ch),n=e?.externalModuleName??t;if(!n&&!r)throw Error(dp);let o=function(e){let t=(0,cf.useMemo)(()=>nm(e),[e]),r=function(e){let[t,r]=(0,cf.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cf.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dd[e]||(dd[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),dd[e];return r}(n),a=function(e){let t=(0,cf.useMemo)(nv,[]),r=function(e,t){let[r,n]=(0,cf.useState)(t?()=>{let r=nw(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cf.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nw(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rw(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!dd[r]&&t&&(dd[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nw(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),dd[r]}return r||{}}(r);return(0,cf.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...a},[n,e?.externalModuleName,o,a])}let dm=cP;function dh(e,t=300){let[r,n]=(0,cf.useState)(e);return(0,cf.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dg=r(6880),dy=r.n(dg);let dv=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function db(){let e=`${i2}/emrapi/configuration?v=${dv}`,t=dy()(e,i5);return(0,cf.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dw(){return(0,cf.useContext)(ch).extension}let dE=cD(ui());function dx(e){let t=cP(e);return(0,cf.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let dD=cD(uh());function d_(e){let{flags:t}=cE(l9);return t[e]?.enabled??!1}function dS(){let[,e]=(0,cf.useState)(0);return(0,cf.useCallback)(()=>{e(e=>e+1)},[])}function dk(e,t,r={}){return dP(e,t,dC,r)}let dC={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i6(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function dP(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??i5,[d,p]=(0,cf.useState)(1),f=(0,cf.useRef)(NaN),m=(0,cf.useRef)(NaN),h=(0,cf.useRef)(d),g=(0,cf.useRef)(!1),y=(0,cf.useRef)(!1),v=e?.toString()??"",[b,w]=(0,cf.useState)(v);v!==b&&(w(v),p(1),h.current=1,f.current=NaN,m.current=NaN,g.current=!1,y.current=!1);let E=(d-1)*t,x=(0,cf.useMemo)(()=>o(e,t,E),[e,t,E]),{data:D,..._}=(l?dy():cZ())(x,c,u);D?.data&&(f.current=a(D?.data),m.current=i(D?.data),g.current=!0);let S=Math.ceil(f.current/t),k=(0,cf.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(f.current/t);!g.current||Number.isNaN(r)||e<=r?(h.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cf.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(f.current)){y.current||(y.current=!0,console.warn(`useServerPagination: ${v} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(f.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),h.current=e,p(e))},[d,t,v,D]);let C=(0,cf.useCallback)(()=>{k(h.current+1)},[k]),P=(0,cf.useCallback)(()=>{k(h.current-1)},[k]);return{data:s(D?.data),totalPages:S,totalCount:f.current,currentPage:d,currentPageSize:m.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:k,goToNext:C,goToPrevious:P,..._}}function dO(e,t,r={}){return dP(e,t,dR(),r)}function dR(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i6(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var dT=r(6310),dN=r.n(dT);function dj(e,t={}){return dA(e,dC,t)}function dA(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:a,getTotalCount:i,getData:s}=t,l=r.fetcher??i5,u=(0,cf.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=dN()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),m=a(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=m,loadMore:()=>{p((c?.length??0)+1)},nextUri:m,...f}}function d$(e,t={}){return dI(e,dC,t)}function dI(e,t,r={}){let n=dA(e,t,r),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cf.useEffect)(()=>{o&&!a&&s()},[o,u]),r.partialData)?n:{...n,data:o||a?void 0:i,isLoading:l||o}}function dM(e,t={}){return dI(e,dR(),t)}function dL(e,t={}){return dA(e,dR(),t)}function dF(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function dB(){let[e,t]=(0,cf.useState)(dF);return(0,cf.useEffect)(()=>{let e=()=>{t(dF())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dV=e=>"small-desktop"===e||"large-desktop"===e;function dU(e){let t=(0,cf.useContext)(ch);(0,cf.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),uq(e),()=>{uJ(e.name)}),[t,e])}function dW(){return cE(uY)}let dH=[];function dz(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),{data:o}=d$(`${i2}/location${n?"?"+n:""}`,{immutable:!0});return o??dH}function dK(e,t=!0){let r=(0,cf.useRef)(null);return(0,cf.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function dG(e){let t=(0,cf.useRef)();return(0,cf.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function dZ(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:a}=t,i=dn(),s=(0,cf.useMemo)(()=>n?.signal??r?.signal??i.signal,[r?.signal,n?.signal,i.signal]),l=(0,cf.useCallback)(e=>i5(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return cZ()(e,l,a)}function dY(e=[],t=10){let[r,n]=(0,cf.useState)(1),o=(0,cf.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let a=Math.min(Math.max(1,r),o),i=(0,cf.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),s=(0,cf.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cf.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cf.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cf.useMemo)(()=>({results:i,totalPages:o,currentPage:a,paginated:e.length>t,showNextButton:a<o,showPreviousButton:a>1,goTo:s,goToNext:l,goToPrevious:u}),[i,o,e.length,t,a,s,l,u])}function dq(e,t,r,n){return{pageSizes:(0,cf.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cf.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function dJ(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function dX(e){let[t,r]=(0,cf.useState)(e??dJ()),{data:n,error:o,isValidating:a}=cZ()(t?["patient",t]:null,()=>lc(t,{}));return(0,cf.useEffect)(()=>{let e=()=>{let e=dJ();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cf.useMemo)(()=>({isLoading:a&&!o&&!n,patient:n,patientUuid:t,error:o}),[a,o,n,t])}function dQ(){let e=`${i2}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=cZ()(e,i5);return(0,cf.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function d0(e){let{extensions:t,extensionSlotModuleName:r}=cO(e);return e?t.map(t=>({state:n})=>cm().createElement(ch.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cm().createElement(cy,{state:n}))):[]}function d1(){let e=(0,cf.useRef)(),[t,r]=(0,cf.useState)(null),n=null;if(!t){if(a){let e=sn().getState();e.loaded&&(n=e.session)}else a=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(sn().getState()),n||(e.current=sn().subscribe(r))});if(n)r(n);else throw a}(0,cf.useEffect)(()=>(e.current||(e.current=sn().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(a)throw console.warn("useSession is in an unexpected state. Attempting to recover."),a;else throw Error("useSession is in an invalid state.");return o}let d2=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cf.useState)(null);return((0,cf.useEffect)(()=>{let e=sn(),t=e.subscribe(({loaded:e,session:t})=>{o(e?t?.user??null:null)}),{loaded:r,session:n}=e.getState();return r&&o(n?.user??null),t},[]),n&&ss(e,n))?cm().createElement(cm().Fragment,null,r):t?cm().createElement(cm().Fragment,null,t):null};var d4=r(4353),d3=r.n(d4),d6=r(7581);let d5=new Map;function d9(){for(let e of Array.from(d5.values()))e()}let d8={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function d7(e){let t=(0,cf.useId)();return(0,cf.useEffect)(()=>{if(e)return d5.set(t,e),()=>{d5.delete(t)}},[t,e]),{...cx(lx(),d8),mutateVisit:d9}}function pe(e,t=lw){let r=(0,cf.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:a}=d7((0,cf.useCallback)(()=>r.current?.(),[])),i=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=cZ()(e?`${i2}/visit${s}`:null,i5),{data:f,error:m,mutate:h,isValidating:g}=cZ()(e&&i?`${i2}/visit${l}`:null,i5),y=(0,cf.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,cf.useMemo)(()=>i&&f?f.data:null,[f,i]),b=(0,cf.useRef)(null);(0,cf.useEffect)(()=>{!p&&y&&n===e&&null===o&&a(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&a(null),b.current=v)},[v,o,y,p,g,n]);let w=(0,cf.useCallback)(()=>{d(),h()},[d,h]);(0,cf.useEffect)(()=>{r.current=w},[w]);let E=!!(!u||i&&!f),x=!!(i?m:c);return{error:c||m,mutate:w,isValidating:p||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:E&&!x}}d4.extend(d6);let pt=[];function pr(){let{data:e}=dy()(lg,ly);return e??pt}let pn=new Map;async function po(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,a=n?t.substring(r+1):t,i=await sH(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?pi(o,i).then(()=>i[a]()):(i?i&&Object.hasOwn(i,a)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${a}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),pa)}let pa={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function pi(e,t){if(e in pn)await pn[e];else{let r=t??await sH(e);await (pn[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nV(e),t(null)}).catch(n)}nV(e),t(null)}))}}function ps(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
17
17
  registered. To fix this, ensure that you define the "name" field inside the
18
18
  extension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${r} from ${e} declares both a 'slots' property and
19
19
  a 'slot' property. Only the 'slots' property will be honored.`);let n=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
20
- To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(u$({name:r,load:()=>d7(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))uI(o,r)}let pn=[];function po(e,t){uf(()=>(function(e,t){if(e&&t&&"object"==typeof t){nB(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],a=t.workspaceGroups??[],i=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?pn.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?pr(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?uZ({name:r,moduleName:e,load:()=>d7(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
20
+ To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(uB({name:r,load:()=>po(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))uV(o,r)}let pl=[];function pu(e,t){uv(()=>(function(e,t){if(e&&t&&"object"==typeof t){nB(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],a=t.workspaceGroups??[],i=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?pl.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?ps(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?uQ({name:r,moduleName:e,load:()=>po(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
21
21
  To fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be
22
22
  registered. To fix this, ensure that you define the "name" field inside the
23
23
  modal definition.`,t)}else console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let r=t.name;if(!r)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
24
24
  To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let n=t.title;if(!n)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
25
25
  To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
26
- To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(uX({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>d7(e,t.component)}),t.groups||[]))uQ({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?uQ({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
- To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),u9(e,s);for(let t of(u8(e,l),l))t.icon&&pr(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});u7(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?l4(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
26
+ To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(u4({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>po(e,t.component)}),t.groups||[]))u3({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?u3({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
+ To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),cr(e,s);for(let t of(cn(e,l),l))t.icon&&ps(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});co(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?l8(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
28
28
  To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
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
- To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function pa(){pn.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pn){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",a=document.getElementById(o),i=`single-spa-application:${n}`;if(a){let e=document.createElement("div");e.id=i,a?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
- To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?aP(e,()=>d7(t.appName,t.component),function(e,{featureFlag:t}){return t?r=>!!l6(t)&&e(r):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?aA(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),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)}(n,t)}}let pi={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 ps(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<pi.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>pi.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>pi.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<pi.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<pi.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<pi.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>pi.SMALL_DESKTOP_MAX)}let pl=!1;function pu(){pl||(window.addEventListener("resize",ps),ps(),pl=!0)}var pc=r(4848),pd=r(6942),pp=r.n(pd);function pf({title:e,children:t}){let r="tablet"===d$();return(0,pc.jsxs)("div",{className:pp()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,pc.jsx)("h4",{children:e}),t]})}let pm=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],ph={primaryColor:{_type:nn.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[ou.oneOf(pm)]},secondaryColor:{_type:nn.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[ou.oneOf(pm)]}},pg={"Brand color #1":{_default:"#005d5d",_type:nn.String},"Brand color #2":{_default:"#004144",_type:nn.String},"Brand color #3":{_default:"#007d79",_type:nn.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nn.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nn.UUID}}},implementationName:{_type:nn.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nn.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:nn.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:[ou.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:nn.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:nn.String}},diagnosisTags:ph};var py=r(9536);let pv={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},pb=e=>(0,pc.jsx)(py.TableBatchActions,{translateWithId:(e,t)=>{let r=pv[e];return r?iW(r,e,t):e},...e}),pw="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",pE="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",px="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",pD="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",p_=(0,cl.createContext)(null);function pS(){let e=(0,cl.useContext)(p_);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function pk({menuTitle:e,children:t}){let[r,n]=cu().useState(!1),o=dV(()=>n(!1),r),a="tablet"===d$(),i=(0,cl.useCallback)(()=>n(e=>!e),[]),s=(0,cl.useRef)(null),l=(0,cl.useRef)(null),u=(0,cl.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,cl.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,cl.useMemo)(()=>({closeMenu:p}),[p]),m=(0,cl.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),h=cl.Children.toArray(t);(0,cl.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cl.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cl.isValidElement)(e)?(0,cl.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:g,index:t}):e);return(0,pc.jsxs)("div",{"data-overflow-menu":!0,className:pp()("cds--overflow-menu",pw),ref:o,children:[(0,pc.jsx)("button",{className:pp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},pD),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,pc.jsxs)("div",{className:pp()("cds--overflow-menu-options","cds--overflow-menu--flip",pE,{[px]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,pc.jsx)("ul",{className:pp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,pc.jsx)(p_.Provider,{value:f,children:y})}),(0,pc.jsx)("span",{})]})]})}function pC(e){let t=(0,cl.useContext)(p_);return(0,pc.jsx)(py.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var pP=r(8168);(et=en||(en={})).Pop="POP",et.Push="PUSH",et.Replace="REPLACE";var pO=function(e){return e},pR="beforeunload";function pT(e){e.preventDefault(),e.returnValue=""}function pN(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function pj(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let pA=(0,cl.createContext)(null),p$=(0,cl.createContext)(null);function pI(e,t){if(!e)throw Error(t)}function pM(){return null!=(0,cl.useContext)(p$)}function pL(e){let{basename:t="/",children:r=null,location:n,navigationType:o=en.Pop,navigator:a,static:i=!1}=e;pM()&&pI(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cl.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=pj(n));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default"}=n,m=(0,cl.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:p,key:f}},[s,u,c,d,p,f]);return null==m?null:(0,cl.createElement)(pA.Provider,{value:l},(0,cl.createElement)(p$.Provider,{children:r,value:{location:m,navigationType:o}}))}function pF(e){let{basename:t,children:r,window:n}=e,o=(0,cl.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,pO({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=en.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=en.Pop,s=o(),l=s[0],u=s[1],c=pN(),d=pN();function p(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function f(e,t){return void 0===t&&(t=null),pO((0,pP.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?pj(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},p(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,pP.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:p,push:function e(t,o){var a=en.Push,i=f(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=en.Replace,a=f(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(pR,pT),function(){t(),d.length||r.removeEventListener(pR,pT)}}}}({window:n}));let a=o.current,[i,s]=(0,cl.useState)({action:a.action,location:a.location});return(0,cl.useLayoutEffect)(()=>a.listen(s),[a]),(0,cl.createElement)(pL,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let pB=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],pV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),pU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-add",iconProps:e})})),pW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),pH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),pz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),pK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),pG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),pZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),pY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),pq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),pJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),pX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),pQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),p0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),p1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),p2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),p4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),p3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),p6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),p5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),p9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),p8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),p7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-close",iconProps:e})})),fe=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),ft=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),fr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-document",iconProps:e})})),fn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),fo=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-download",iconProps:e})})),fa=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),fi=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),fs=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),fl=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-events",iconProps:e})})),fu=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),fc=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),fd=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),fp=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),ff=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),fm=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-group",iconProps:e})})),fh=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),fg=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),fy=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),fv=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-information",iconProps:e})})),fb=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),fw=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),fE=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),fx=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),fD=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),f_=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-location",iconProps:e})})),fS=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),fk=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),fC=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),fP=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),fO=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),fR=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),fT=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-money",iconProps:e})})),fN=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),fj=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),fA=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),f$=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),fI=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-password",iconProps:e})})),fM=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),fL=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),fF=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),fB=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),fV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),fU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),fW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),fH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-report",iconProps:e})})),fz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),fK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-save",iconProps:e})})),fG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-search",iconProps:e})})),fZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),fY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),fq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),fJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),fX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),fQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),f0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),f1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-table",iconProps:e})})),f2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-time",iconProps:e})})),f4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),f3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),f6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),f5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),f9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),f8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),f7=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),me=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mt=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mr=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mn=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mo=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(md,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),ma=mo,mi=fn,ms=fD,ml=fy,mu=fJ,mc=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cl.useRef)(e?document.getElementById(e):void 0);return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pc.jsx)(c9,{value:o.current,fallback:t,children:(0,pc.jsx)(md,{ref:n,icon:e,iconProps:r})})})),md=(0,cl.memo)((0,cl.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cl.useRef)(null);return(0,cl.useImperativeHandle)(r,()=>i.current),(0,cl.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,pc.jsx)("svg",{ref:i,className:pp()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,pc.jsx)("use",{href:`#${e}`})})})),mp=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cV.useTranslation)(),a=(pM()||pI(!1),(0,cl.useContext)(p$).location),i=(0,cl.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,pc.jsx)("div",{children:(0,pc.jsx)(cd,{className:pp()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,pc.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,pc.jsx)(mc,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,pc.jsx)("span",{children:o(t)})]})})},e)};function mf(e){return function({basePath:t}){return(0,pc.jsx)(pF,{children:(0,pc.jsx)(mp,{basePath:t,...e})})}}function mm(e){let t=(0,cl.useRef)(null);return(0,cl.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mh(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let mg="u">typeof document?cu().useLayoutEffect:()=>{};function my(e){let t=(0,cl.useRef)(null);return mg(()=>{t.current=e},[e]),(0,cl.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mv={prefix:String(Math.round(1e10*Math.random())),current:0},mb=cu().createContext(mv),mw=cu().createContext(!1),mE=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mx="function"==typeof cu().useId?function(e){let t=cu().useId(),[r]=(0,cl.useState)(mk()),n=r?"react-aria":`react-aria${mv.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cl.useContext)(mb),r=function(e=!1){let t=(0,cl.useContext)(mb),r=(0,cl.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cu().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mE.get(e);null==r?mE.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mE.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mD(){return!1}function m_(){return!0}function mS(e){return()=>{}}function mk(){return"function"==typeof cu().useSyncExternalStore?cu().useSyncExternalStore(mS,mD,m_):(0,cl.useContext)(mw)}let mC=!!("u">typeof window&&window.document&&window.document.createElement),mP=new Map;function mO(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=mx(t),a=(0,cl.useRef)(null);if(i&&i.register(a,o),mC){let e=mP.get(o);e&&!e.includes(n)?e.push(n):mP.set(o,[n])}return mg(()=>()=>{i&&i.unregister(a),mP.delete(o)},[o]),(0,cl.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mR(e=[]){let t=mO(),[r,n]=function(e){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(null),o=my(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});mg(()=>{n.current&&o()});let a=my(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cl.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return mg(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(i=new FinalizationRegistry(e=>{mP.delete(e)}));let mT=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mN(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mh(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mT(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mP.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mP.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mj=Symbol("default");function mA({values:e,children:t}){for(let[r,n]of e)t=cu().createElement(r.Provider,{value:n},t);return t}function m$(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mI(e,t){let r=(0,cl.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mj;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mM(e,t,r){let{ref:n,...o}=mI(r,e.slot)||{},a=mm((0,cl.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mN(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mL(e=!0){let[t,r]=(0,cl.useState)(e),n=(0,cl.useRef)(!1),o=(0,cl.useCallback)(e=>{n.current=!0,r(!!e)},[]);return mg(()=>{n.current||r(!1)},[]),[o,t]}function mF(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mB=(0,cl.createContext)(null),mV=null;function mU(e,t="assertive",r=7e3){mV?mV.announce(e,t,r):(mV=new mW,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mV.announce(e,t,r):setTimeout(()=>{(null==mV?void 0:mV.isAttached())&&(null==mV||mV.announce(e,t,r))},100))}class mW{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mH=new Set(["id"]),mz=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mK=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mG=/^(data-.*)$/;function mZ(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mH.has(t)||r&&mz.has(t)||n&&mK.has(t)||(null==o?void 0:o.has(t))||mG.test(t))&&(a[t]=e[t]);return a}let mY=["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"])'],mq=mY.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mY.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mJ=mY.join(':not([hidden]):not([tabindex="-1"]),');function mX(e){return e.matches(mq)}function mQ(e){return e.matches(mJ)}let m0=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m1=e=>e&&"window"in e&&e.window===e?e:m0(e).defaultView||window;function m2(e){if(function(){if(null==m4){m4=!1;try{document.createElement("div").focus({get preventScroll(){return m4=!0,!0}})}catch{}}return m4}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m4=null;function m3(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m6(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m5(e){let t=(0,cl.useRef)({isFocused:!1,observer:null});mg(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=my(t=>{null==e||e(t)});return(0,cl.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m3(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let m9=!1;function m8(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function m7(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function he(e){let t=null;return()=>(null==t&&(t=e()),t)}let ht=he(function(){return m7(/^Mac/i)}),hr=he(function(){return m7(/^iPhone/i)}),hn=he(function(){return m7(/^iPad/i)||ht()&&navigator.maxTouchPoints>1}),ho=he(function(){return hr()||hn()});he(function(){return ht()||ho()});let ha=he(function(){return m8(/AppleWebKit/i)&&!hi()}),hi=he(function(){return m8(/Chrome/i)}),hs=he(function(){return m8(/Android/i)}),hl=he(function(){return m8(/Firefox/i)}),hu=new Map,hc=new Set;function hd(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hu.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hu.delete(r.target)),0===hu.size)){for(let e of hc)e();hc.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hu.get(r.target);n||(n=new Set,hu.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hp(e){requestAnimationFrame(()=>{0===hu.size?e():hc.add(e)})}"u">typeof document&&("loading"!==document.readyState?hd():document.addEventListener("DOMContentLoaded",hd));let hf="default",hm="",hh=new WeakMap;function hg(e){if(ho())"disabled"===hf&&(hf="restoring",setTimeout(()=>{hp(()=>{if("restoring"===hf){let t=m0(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hm||""),hm="",hf="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hh.has(e)){let t=hh.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hh.delete(e)}}let hy=cu().createContext({register:()=>{}});function hv(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hb(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hw(e,t,r){var n=hv(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hE(e,t){mg(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hx(){let e=(0,cl.useRef)(new Map),t=(0,cl.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cl.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cl.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cl.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hy.displayName="PressResponderContext";function hD(e,t){return!!t&&!!e&&e.contains(t)}function h_(e){return e.target}function hS(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hl()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(ht()?a=!0:i=!0);let u=ha()&&ht()&&!hn()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hS.isOpening=r,m2(e),e.dispatchEvent(u),hS.isOpening=!1}function hk(e){return 0===e.mozInputSource&&!!e.isTrusted||(hs()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hS.isOpening=!1;var hC=r(1779),hP=r.n(hC),hO=new WeakMap;class hR{continuePropagation(){hw(this,hO,!1)}get shouldStopPropagation(){var e;return e=hv(this,hO,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hb(this,hO,{writable:!0,value:void 0}),hw(this,hO,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hT=Symbol("linkClicked");function hN(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,cl.useContext)(hy);if(t){let{register:r,...n}=t;e=mN(n,e),r()}return hE(t,e.ref),e}(e),[m,h]=(0,cl.useState)(!1),g=(0,cl.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hx(),b=my((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hR("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=my((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new hR("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hR("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=my((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hR("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=my(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(h$(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hg(t.target),t.disposables))r();t.disposables=[]}}),D=my(e=>{c&&x(e)}),_=my(e=>{null==i||i(e)}),S=my((e,t)=>{if(i){let r=new MouseEvent("click",e);m6(r,t),i(m3(r))}}),k=(0,cl.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(hA(t.nativeEvent,t.currentTarget)&&hD(t.currentTarget,h_(t.nativeEvent))){var n;hI(h_(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m0(t.currentTarget),"keyup",mh(t=>{hA(t,n)&&!t.repeat&&hD(n,h_(t))&&e.target&&E(h$(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&ht()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||hD(t.currentTarget,h_(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hS.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hk(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(h$(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&hA(t,e.target)){hI(h_(t),t.key)&&t.preventDefault();let r=h_(t),o=hD(e.target,h_(t));w(h$(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hj(e.target)&&hD(e.target,r)&&!t[hT]&&(t[hT]=!0,hS(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!hD(t.currentTarget,h_(t.nativeEvent)))return;if(o=t.nativeEvent,!hs()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(ho()){if("default"===hf){let t=m0(e);hm=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hf="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hh.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=h_(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m0(t.currentTarget),"pointerup",r,!1),y(m0(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(hD(t.currentTarget,h_(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!mX(e);)e=e.parentElement;let t=m1(e),r=t.document.activeElement;if(!r||r===e)return;m9=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m2(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m2(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m9=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{hD(t.currentTarget,h_(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(h$(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(h$(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(hD(e.target,h_(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m2(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{hD(e.currentTarget,h_(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cl.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof m1(e).Element&&"auto"===m1(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,cl.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hg(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mN(f,k)}}function hj(e){return"A"===e.tagName&&e.hasAttribute("href")}function hA(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m1(t).HTMLInputElement&&!hL(t,r)||t instanceof m1(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hj(t))&&"Enter"!==r)}function h$(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hI(e,t){return e instanceof HTMLInputElement?!hL(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hj(e))}let hM=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hL(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hM.has(e.type)}let hF=null,hB=new Set,hV=new Map,hU=!1,hW=!1,hH={Tab:!0,Escape:!0};function hz(e,t){for(let r of hB)r(e,t)}function hK(e){hU=!0,e.metaKey||!ht()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hF="keyboard",hz("keyboard",e))}function hG(e){hF="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hU=!0,hz("pointer",e))}function hZ(e){hk(e)&&(hU=!0,hF="virtual")}function hY(e){e.target!==window&&e.target!==document&&!m9&&e.isTrusted&&(hU||hW||(hF="virtual",hz("virtual",e)),hU=!1,hW=!1)}function hq(){m9||(hU=!1,hW=!0)}function hJ(e){if("u"<typeof window||hV.get(m1(e)))return;let t=m1(e),r=m0(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hU=!0,n.apply(this,arguments)},r.addEventListener("keydown",hK,!0),r.addEventListener("keyup",hK,!0),r.addEventListener("click",hZ,!0),t.addEventListener("focus",hY,!0),t.addEventListener("blur",hq,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hG,!0),r.addEventListener("pointermove",hG,!0),r.addEventListener("pointerup",hG,!0)),t.addEventListener("beforeunload",()=>{hX(e)},{once:!0}),hV.set(t,{focus:n})}let hX=(e,t)=>{let r=m1(e),n=m0(e);t&&n.removeEventListener("DOMContentLoaded",t),hV.has(r)&&(r.HTMLElement.prototype.focus=hV.get(r).focus,n.removeEventListener("keydown",hK,!0),n.removeEventListener("keyup",hK,!0),n.removeEventListener("click",hZ,!0),r.removeEventListener("focus",hY,!0),r.removeEventListener("blur",hq,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hG,!0),n.removeEventListener("pointermove",hG,!0),n.removeEventListener("pointerup",hG,!0)),hV.delete(r))};function hQ(){return"pointer"!==hF}"u">typeof document&&("loading"!==(d=m0(void 0)).readyState?hJ(void 0):d.addEventListener("DOMContentLoaded",()=>{hJ(void 0)}));let h0=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h1(e){let t=m0(e),r=((e=document)=>e.activeElement)(t);"virtual"===hF?hp(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m2(e)}):m2(e)}function h2(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cl.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=m5(a),s=(0,cl.useCallback)(e=>{let t=m0(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===h_(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h4(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h3=cu().createContext(null);function h6(e,t){let{focusProps:r}=h2(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h4(e.onKeyDown),onKeyUp:h4(e.onKeyUp)}},o=mN(r,n),a=function(e){let t=(0,cl.useContext)(h3)||{};hE(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cl.useRef)(e.autoFocus);(0,cl.useEffect)(()=>{s.current&&t.current&&h1(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mN({...o,tabIndex:l},i)}}function h5(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cl.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hx(),l=(0,cl.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=m5(l),c=(0,cl.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m0(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===h_(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!hD(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});m6(n,r),l(m3(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function h9(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cl.useRef)({isFocused:!1,isFocusVisible:r||hQ()}),[i,s]=(0,cl.useState)(!1),[l,u]=(0,cl.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cl.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cl.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},hJ(),(0,cl.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m0(null==r?void 0:r.target),i="u">typeof window?m1(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m1(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m1(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m1(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h0.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hH[r.key]||(e=>{a.current.isFocusVisible=e,c()})(hQ())};return hB.add(e),()=>{hB.delete(e)}},[]);let{focusProps:p}=h2({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=h5({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?f:p}}cu().forwardRef(function(e,t){let{children:r,...n}=e,o=mm(t),a={...n,ref:o};return cu().createElement(h3.Provider,{value:a},r)});let h8=!1,h7=0;function ge(e){"touch"===e.pointerType&&(h8=!0,setTimeout(()=>{h8=!1},50))}function gt(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",ge),h7++,()=>{!(--h7>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",ge)}}function gr(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cl.useState)(!1),s=(0,cl.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cl.useEffect)(gt,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hx(),{hoverProps:c,triggerHoverEnd:d}=(0,cl.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{h8&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m0(n.target),"pointerover",t=>{s.isHovered&&s.target&&!hD(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cl.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let gn=(0,cl.createContext)(!1);function go(e){let t=(t,r)=>(0,cl.useContext)(gn)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cl.forwardRef)(t)}let ga=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gi=(0,cl.createContext)({}),gs=go(function(e,t){var r;[e,t]=mM(e,t,gi);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:f,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hN({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=h6(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mN(b,y,mZ(e,{labelable:!0}));return{isPressed:v,buttonProps:mN(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=h9(e),{hoverProps:c,isHovered:d}=gr({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=m$({...e,values:p,defaultClassName:"react-aria-Button"}),m=mO(a.id),h=mO(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cl.useRef)(o);return(0,cl.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mU(e,"assertive"):y.current&&l&&!o&&mU(e,"assertive"),y.current=o},[o,l,g,m]),cu().createElement("button",{...mZ(e,{propNames:ga}),...mN(a,s,c),...f,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cu().createElement(mB.Provider,{value:{id:h}},f.children))});(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null),(0,cl.createContext)(null);let gl=(0,cl.createContext)({}),gu=(0,cl.createContext)({}),gc=(0,cl.forwardRef)(function(e,t){[e,t]=mM(e,t,gu);let{elementType:r="span",...n}=e;return cu().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gd=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gp=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gf(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gd.has(t.script)}let t=e.split("-")[0];return gp.has(t)}let gm=Symbol.for("react-aria.i18n.locale");function gh(){let e="u">typeof window&&window[gm]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gf(e)?"rtl":"ltr"}}let gg=gh(),gy=new Set;function gv(){for(let e of(gg=gh(),gy))e(gg)}function gb(){let e=mk(),[t,r]=(0,cl.useState)(gg);return((0,cl.useEffect)(()=>(0===gy.size&&window.addEventListener("languagechange",gv),gy.add(r),()=>{gy.delete(r),0===gy.size&&window.removeEventListener("languagechange",gv)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gw=cu().createContext(null);function gE(e){let{locale:t,children:r}=e,n=gb(),o=cu().useMemo(()=>t?{locale:t,direction:gf(t)?"rtl":"ltr"}:n,[n,t]);return cu().createElement(gw.Provider,{value:o},r)}function gx(){let e=gb();return(0,cl.useContext)(gw)||e}var gD={};function g_(e,t){return e-t*Math.floor(e/t)}function gS(e,t,r,n){let o=(t=gC(e,t))-1,a=-2;return r<=2?a=0:gk(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gk(e){return e%4==0&&(e%100!=0||e%400==0)}function gC(e,t){return"BC"===e?1-t:t}function gP(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gD={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let gO={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 gR{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=g_(t,146097),o=Math.floor(n/36524),a=g_(n,36524),i=Math.floor(a/1461),s=Math.floor(g_(a,1461)/365),[l,u]=gP(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gS(l,u,1,1),d=2;e<gS(l,u,3,1)?d=0:gk(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-gS(l,u,p,1)+1;return new gX(l,u,p,f)}toJulianDay(e){return gS(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gO[gk(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gk(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function gT(e,t){let r=e.copy(),n="hour"in r?gV(r,t):0;gN(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gj(r),gA(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gj(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gj(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gN(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function gj(e){for(;e.month<1;)gN(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gN(e,1)}function gA(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 g$(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gA(e)}function gI(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gM(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),g$(r),r}function gL(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gF(r),r}function gF(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 gB(e,t){let r=e%t;return r<0&&(r+=t),r}function gV(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gB(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gB(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gB(e.minute,60),r=Math.floor(e.hour/24),e.hour=gB(e.hour,24),r}function gU(e,t){let r=e.copy();return gV(r,t),r}function gW(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=gz(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],g$(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gz(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gz(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gz(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),g$(o),o}function gH(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gz(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gz(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gz(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gz(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gz(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gK(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?ye(gT(yo(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):g6(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),ya(yr(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gG(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 gZ(e){let t,r=ya(e,new gR);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gY(e){return`${gZ(e)}T${gG(e)}`}function gq(e){let t,r="object"==typeof e[0]?e.shift():new gR;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var gJ=new WeakMap;class gX{copy(){return this.era?new gX(this.calendar,this.era,this.year,this.month,this.day):new gX(this.calendar,this.year,this.month,this.day)}add(e){return gT(this,e)}subtract(e){return gT(this,gI(e))}set(e){return gM(this,e)}cycle(e,t,r){return gW(this,e,t,r)}toDate(e){return yt(this,e)}toString(){return gZ(this)}compare(e){return ym(this,e)}constructor(...e){hb(this,gJ,{writable:!0,value:void 0});let[t,r,n,o,a]=gq(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,g$(this)}}var gQ=new WeakMap;class g0{copy(){return new g0(this.hour,this.minute,this.second,this.millisecond)}add(e){return gU(this,e)}subtract(e){return gU(this,gI(e))}set(e){return gL(this,e)}cycle(e,t,r){return gH(this,e,t,r)}toString(){return gG(this)}compare(e){var t,r;return t=this,r=e,yh(t)-yh(r)}constructor(e=0,t=0,r=0,n=0){hb(this,gQ,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gF(this)}}var g1=new WeakMap;class g2{copy(){return this.era?new g2(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g2(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gT(this,e)}subtract(e){return gT(this,gI(e))}set(e){return gM(gL(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gW(this,e,t,r);default:return gH(this,e,t,r)}}toDate(e,t){return yt(this,e,t)}toString(){return gY(this)}compare(e){var t,r;let n=ym(this,e);return 0===n?(t=this,r=yo(e),yh(t)-yh(r)):n}constructor(...e){hb(this,g1,{writable:!0,value:void 0});let[t,r,n,o,a]=gq(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,g$(this)}}var g4=new WeakMap;class g3{copy(){return this.era?new g3(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g3(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gK(this,e)}subtract(e){return gK(this,gI(e))}set(e,t){let r,n;return 0===(n=gL(gM(r=yo(this),e),e)).compare(r)?this:ya(yr(ye(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=yo(e),i=ya(gL(a,{hour:t}),new gR),s=[ye(i,e.timeZone,"earlier"),ye(i,e.timeZone,"later")].filter(t=>yr(t,e.timeZone).day===i.day)[0],l=ya(gL(a,{hour:o}),new gR),u=[ye(l,e.timeZone,"earlier"),ye(l,e.timeZone,"later")].filter(t=>yr(t,e.timeZone).day===l.day).pop(),c=g6(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return ya(yr(c=36e5*gz(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gH(e,t,r,n);case"era":case"year":case"month":case"day":return ya(yr(ye(gW(yo(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(g6(e)-e.offset)}toString(){var e;let t,r,n;return`${gY(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g3){var r,n;return e.timeZone===t?e:(r=e,n=t,ya(yr(g6(r)-r.offset,n),r.calendar))}return yr(ye(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hb(this,g4,{writable:!0,value:void 0});let[t,r,n,o,a]=gq(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,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,g$(this)}}function g6(e){return g5(gC((e=ya(e,new gR)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g5(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function g9(e,t){if("UTC"===t)return 0;if(e>0&&t===yy())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=g7(e,t);return g5(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let g8=new Map;function g7(e,t){let r=g8.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),g8.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function ye(e,t,r="compatible"){var n,o,a;let i=yo(e);if("UTC"===t)return g6(i);if(t===yy()&&"compatible"===r){i=ya(i,new gR);let e=new Date,t=gC(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=g6(i),l=g9(s-864e5,t),u=g9(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=g7(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function yt(e,t,r="compatible"){return new Date(ye(e,t,r))}function yr(e,t){let r=g9(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g3(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function yn(e){return new gX(e.calendar,e.era,e.year,e.month,e.day)}function yo(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g2(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function ya(e,t){if(yu(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,g$(n),n}let yi={"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 ys(e,t){return t=ya(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yl(e,t){return yu(e.calendar,t.calendar)&&ys(e,t)}function yu(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yc={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yd(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yc[r]:(n=function(e){if(Intl.Locale){let t=yE.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yE.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yi[n]||0))%7;return o<0&&(o+=7),o}function yp(e){return yr(Date.now(),e)}function yf(e){return yn(yp(e))}function ym(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yh(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yg=null;function yy(){return null==yg&&(yg=new Intl.DateTimeFormat().resolvedOptions().timeZone),yg}function yv(e){return e.subtract({days:e.day-1})}function yb(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yw(e,t,r){let n=yd(e,t,r);return e.subtract({days:n})}let yE=new Map;function yx(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yD(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let y_=Symbol.for("react-aria.i18n.locale"),yS=Symbol.for("react-aria.i18n.strings");class yk{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[y_];if(void 0===p){let e=window[yS];if(!e)return null;for(let r in p={},e)p[r]=new yk({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yC=new Map,yP=new Map;class yO{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yC.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yC.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yP.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yP.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let yR=new WeakMap;function yT(e,t){let r;return t&&yk.getGlobalDictionaryForPackage(t)||((r=yR.get(e))||(r=new yk(e),yR.set(e,r)),r)}function yN(e,t){let{locale:r}=gx(),n=yT(e,t);return(0,cl.useMemo)(()=>new yO(r,n),[r,n])}let yj=new Map;class yA{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yL&&(yL="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yL&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yI(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=yI(e,t),this.options=t}}let y$={true:{ja:"h11"},false:{}};function yI(e,t={}){if("boolean"==typeof t.hour12&&(null==yM&&(yM="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yM)){let r=y$[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yj.has(r))return yj.get(r);let n=new Intl.DateTimeFormat(e,t);return yj.set(r,n),n}let yM=null,yL=null;function yF(e,t){let r=(0,cl.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yB(e){e=yF(null!=e?e:{},yV);let{locale:t}=gx();return(0,cl.useMemo)(()=>new yA(t,e),[t,e])}function yV(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yU(e){return e&&e.__esModule?e.default:e}let yW=new WeakMap;function yH(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yz(e,t,r,n){let o=yN(yU(gD),"@react-aria/calendar"),a=yH(e)||yH(t),i=yB({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yB({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cl.useMemo)(()=>{if(ys(e,yv(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),ys(t,yb(e)))return i.format(a.toDate(r));if(ys(t,yb(t)))return n?yK(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yK(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yK(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yG(e,t){let r=(0,cl.useRef)(!0),n=(0,cl.useRef)(null);(0,cl.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cl.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yZ(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mO(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function yY(e,t){var r,n;let o,a,i,s,l,u=yN((r=gD)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mZ(e),d=yz(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=yz(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yG(()=>{t.isFocused||mU(p)},[p]);let f=(i=yN(yU(gD),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yB({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yH(o)||yH(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cl.useMemo)(()=>{if(!l&&o&&a)if(ys(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yK(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yG(()=>{f&&mU(f,"polite",4e3)},[f]);let m=mR([!!e.errorMessage,e.isInvalid,e.validationState]);yW.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,cl.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cl.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mN(c,yZ({id:e.id,"aria-label":[e["aria-label"],p].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let yq={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function yJ(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cl.useState)(!1),{focusWithinProps:a}=h5({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cl.useMemo)(()=>n?t:t?{...yq,...t}:yq,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cu().createElement(r,mN(a,i),t)}function yX(e,t,r,n){let o=my(r),a=null==r;(0,cl.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let yQ=0,y0=new Map;function y1(e){let[t,r]=(0,cl.useState)();return mg(()=>{if(!e)return;let t=y0.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${yQ++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y0.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y0.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y2(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y4(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y3(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y2(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y4(e,t,"left"),n=y4(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:p,scrollPaddingLeft:f}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(p,10)||0,w=parseInt(d,10)||0,E=parseInt(f,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function y6(e,t){let r=e;for(y2(r,t)&&(r=r.parentElement);r&&!y2(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class y5 extends gR{fromJulianDay(e){let t=super.fromJulianDay(e);return new gX(this,gC(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(y9(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(y9(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function y9(e){let[t,r]=gP(e.year+-543);return new gX(t,r,e.month,e.day)}function y8(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function y7(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-y8(e,r,1,1))/30),o=t+1-y8(e,r,n,1);return[r,n,o]}function ve(e){return Math.floor(e%4/3)}function vt(e,t){return t%13!=0?30:ve(e)+5}class vr{fromJulianDay(e){let[t,r,n]=y7(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new gX(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),y8(1723856,t,e.month,e.day)}getDaysInMonth(e){return vt(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+ve(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vn extends vr{fromJulianDay(e){let[t,r,n]=y7(1723856,e);return new gX(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vo extends vr{fromJulianDay(e){let[t,r,n]=y7(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new gX(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),y8(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vt(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 va=765433;function vi(e){return 7>g_(7*e+1,19)}function vs(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>g_(3*(r+1),7)&&(r+=1),r}function vl(e){let t,r;return vs(e)+(t=vs(e-1),r=vs(e),vs(e+1)-r==356?2:+(r-t==382))}function vu(e){return vl(e+1)-vl(e)}function vc(e,t){if(t>=6&&!vi(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vu(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vi(e):30}class vd{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/va*19+234)/235)+1,n=vl(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vl(--r)));let a=1,i=0;for(;i<o;)i+=vc(r,a),a++;let s=o-(i-=vc(r,--a));return new gX(this,r,a,s)}toJulianDay(e){let t=vl(e.year);for(let r=1;r<e.month;r++)t+=vc(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vc(e.year,e.month)}getMonthsInYear(e){return vi(e.year)?13:12}getDaysInYear(e){return vu(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vi(t.year)&&!vi(e.year)&&t.month>6?e.month--:!vi(t.year)&&vi(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vp extends gR{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gS(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gk(o.year-1)?31:30)+155+90+10):(t=gk(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new gX(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gP(e.year+78);return(gk(o)?(t=31,r=gS(n,o,3,21)):(t=30,r=gS(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gk(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 vf(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vm(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vf(t,n,1,1)))/29.5)+1),a=r-vf(t,n,o,1)+1;return new gX(e,n,o,a)}function vh(e){return(14+11*e)%30<11}class vg{fromJulianDay(e){return vm(this,1948440,e)}toJulianDay(e){return vf(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vh(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vh(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vy extends vg{fromJulianDay(e){return vm(this,1948439,e)}toJulianDay(e){return vf(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vv(e){return 460322+l[e-1300]}function vb(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function vw(e,t){let r=vv(e);for(let n=1;n<t;n++)r+=vb(e,n);return r}function vE(e){return l[e+1-1300]-l[e-1300]}class vx extends vg{fromJulianDay(e){let t=e-1948440,r=vv(1300),n=vv(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vv(++e)+1;let o=vE(e);if(n===o){r=12;break}if(n<o){let t=vb(e,r);for(r=1;n>t;)n-=t,t=vb(e,++r);break}}return new gX(this,e,r,t-vw(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vw(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vb(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vE(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let r=1;r<=12;r++)e+=vb(t,r)}}}}let vD=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],v_=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vS=[1867,1911,1925,1988,2018],vk=["meiji","taisho","showa","heisei","reiwa"];function vC(e){let t=vD.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vD.length-1:0===t?0:t-1}function vP(e){let t=vS[vk.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gX(e.year+t,e.month,e.day)}class vO extends gR{fromJulianDay(e){let t=super.fromJulianDay(e),r=vC(t);return new gX(this,vk[r],t.year-vS[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vP(e))}balanceDate(e){let t=vP(e),r=vC(t);vk[r]!==e.era&&(e.era=vk[r],e.year=t.year-vS[r]),this.constrainDate(e)}constrainDate(e){let t=vk.indexOf(e.era),r=v_[t];if(null!=r){let[n,o,a]=r,i=n-vS[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vD[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vk}getYearsInEra(e){let t=vk.indexOf(e.era),r=vD[t],n=vD[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vP(e))}getMinimumMonthInYear(e){let t=vR(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vR(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vR(e){if(1===e.year)return vD[vk.indexOf(e.era)]}let vT=[0,31,62,93,124,155,186,216,246,276,306,336];class vN{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vT[o]+1;return new gX(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vT[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>g_(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vj(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vA(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class v$ extends gR{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vA(gC(t.era,t.year));return new gX(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vI(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vA(vj(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vI(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vI(e){let[t,r]=gP(vj(e));return new gX(t,r,e.month,e.day)}function vM(e){switch(e){case"buddhist":return new y5;case"ethiopic":return new vr;case"ethioaa":return new vn;case"coptic":return new vo;case"hebrew":return new vd;case"indian":return new vp;case"islamic-civil":return new vg;case"islamic-tbla":return new vy;case"islamic-umalqura":return new vx;case"japanese":return new vO;case"persian":return new vN;case"roc":return new v$;default:return new gR}}function vL(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vF(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vB(e,t,r).subtract(a);return vU(e,i,t,r,n,o)}function vB(e,t,r,n,o){let a=e;if(t.years)a=yv(e.subtract({months:e.month-1}));else t.months?a=yv(e):t.weeks&&(a=yw(e,r));return vU(e,a,t,r,n,o)}function vV(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vB(e,t,r).subtract(a);return vU(e,i,t,r,n,o)}function vU(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yD(t,vB(yn(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=yx(t,vV(yn(a),r,n));e&&(t=e)}return t}function vW(e,t,r){if(t){let r=yD(e,yn(t));r&&(e=r)}if(r){let t=yx(e,yn(r));t&&(e=t)}return e}function vH(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vz(e,t,r){let[n,o]=(0,cl.useState)(e||t),a=(0,cl.useRef)(void 0!==e),i=void 0!==e;(0,cl.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cl.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vK(e){var t,r,n;let o=(0,cl.useMemo)(()=>new yA(e.locale),[e.locale]),a=(0,cl.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:p,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,cl.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vz(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cl.useMemo)(()=>g?ya(yn(g),h):null,[g,h]),b=(0,cl.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vz((0,cl.useMemo)(()=>e.focusedValue?vW(ya(yn(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cl.useMemo)(()=>vW(e.defaultFocusedValue?ya(yn(e.defaultFocusedValue),h):v||ya(yf(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cl.useState)(()=>{switch(d){case"start":return vB(w,l,i,u,c);case"end":return vV(w,l,i,u,c);default:return vF(w,l,i,u,c)}}),[_,S]=(0,cl.useState)(e.autoFocus||!1),k=(0,cl.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[C,P]=(0,cl.useState)(h);if(!yu(h,C)){let e=ya(w,h);D(vF(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vW(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vH(e=vW(e,u,c),x,p))&&(e=ya(e,(null==g?void 0:g.calendar)||new gR),g&&"hour"in g?y(g.set(e)):y(e))}}vL(w,u,c)?E(vW(w,u,c)):0>w.compare(x)?D(vV(w,l,i,u,c)):w.compare(k)>0&&D(vB(w,l,i,u,c));let T=(0,cl.useMemo)(()=>!!v&&(!!(p&&p(v))||vL(v,u,c)),[v,p,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cl.useMemo)(()=>"visible"===f?l:vG(l),[f,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:k},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vW(w.add(j),u,c)),D(vB(vU(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vW(w.subtract(j),u,c)),D(vB(vU(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yw(w,i)):(l.months||l.years)&&O(yv(w))},focusSectionEnd(){l.days?O(k):l.weeks?O(yw(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yb(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vG(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vG(l)))},selectFocusedDate(){p&&p(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vL(e,u,c),isSelected(e){return null!=v&&ys(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&ys(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(k)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return ys(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return ys(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yd(r=yw(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(ys(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vG(e){let t={...e};for(let r in e)t[r]=1;return t}function vZ(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:yn(e),end:yn(t)}):null}function vY(e,t){return(e=ya(e,(null==t?void 0:t.calendar)||new gR),t&&"hour"in t)?t.set(e):e}function vq(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vJ=(0,cl.createContext)(null),vX=(0,cl.createContext)(null),vQ=(0,cl.createContext)(null),v0=(0,cl.createContext)(null),v1=(0,cl.forwardRef)(function(e,t){[e,t]=mM(e,t,vJ);let{locale:r}=gx(),n=vK({...e,locale:r,createCalendar:e.createCalendar||vM}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=yY(e,n),u=m$({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cu().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cu().createElement(mA,{values:[[gi,{slots:{previous:a,next:i}}],[gl,{"aria-hidden":!0,level:2,children:l}],[vQ,n],[vJ,e],[gu,{slots:{errorMessage:s}}]]},cu().createElement(yJ,null,cu().createElement("h2",null,o["aria-label"])),u.children,cu().createElement(yJ,null,cu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v2=(0,cl.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mM(e,t,vX);let{locale:s}=gx(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vz(t,r||null,n),[p,f]=(0,cl.useState)(null),m="center";if(c&&c.start&&c.end){let e=vF(yn(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cl.useRef)(null),[g,y]=(0,cl.useState)(null),v=(0,cl.useMemo)(()=>yD(s,null==g?void 0:g.start),[s,g]),b=(0,cl.useMemo)(()=>yx(l,null==g?void 0:g.end),[l,g]),w=vK({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vq(t,w,-1),end:vq(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cl.useState)(w.visibleRange);yl(w.visibleRange.start,x.start)&&yl(w.visibleRange.end,x.end)||(E(p),D(w.visibleRange));let _=e=>{e?(f(e),E(e)):(f(null),E(null))},S=p?vZ(p,w.focusedDate):c&&vZ(c.start,c.end),k=t=>{if(e.isReadOnly)return;let r=vH(vW(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(p){let e=vZ(p,r);e&&d({start:vY(e.start,null==c?void 0:c.start),end:vY(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[C,P]=(0,cl.useState)(!1),{isDateUnavailable:O}=e,R=(0,cl.useMemo)(()=>!!c&&!p&&(!!(O&&(O(c.start)||O(c.end)))||vL(c.start,s,l)||vL(c.end,s,l)),[O,c,p,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){k(w.focusedDate)},selectDate:k,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vL(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:C,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vM}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:f}=(r=e,n=t,o=yY(r,l),a=(0,cl.useRef)(!1),yX(i=(0,cl.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),yX(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},yX(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=m$({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cu().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cu().createElement(mA,{values:[[gi,{slots:{previous:c,next:d}}],[gl,{"aria-hidden":!0,level:2,children:f}],[v0,l],[vX,e],[gu,{slots:{errorMessage:p}}]]},cu().createElement(yJ,null,cu().createElement("h2",null,u["aria-label"])),m.children,cu().createElement(yJ,null,cu().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v4=(0,cl.createContext)(null),v3=(0,cl.forwardRef)(function(e,t){var r,n;let o=(0,cl.useContext)(vQ),a=(0,cl.useContext)(v0),i=mI(vJ),s=mI(vX),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=gx(),s=yz(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yW.get(t),c=yZ({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yB({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=gx(),f=(0,cl.useMemo)(()=>{let e=yw(yf(t.timeZone),p,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[p,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((yd(yv(n),p,a)+r)/7));return{gridProps:mN(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:m}}({startDate:u,endDate:yb(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cu().createElement(v4.Provider,{value:{headerProps:p,weekDays:f,startDate:u,weeksInMonth:m}},cu().createElement("table",{...mZ(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cu().createElement(cu().Fragment,null,cu().createElement(v6,null,e=>cu().createElement(v5,null,e)),cu().createElement(v9,null,e.children))))}),v6=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cl.useContext)(v4);return cu().createElement("thead",{...mZ(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cu().createElement("tr",null,i.map((e,t)=>cu().cloneElement(r(e),{key:t}))))}),v5=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cu().createElement("th",{...mZ(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),v9=(0,cl.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cl.useContext)(vQ),i=(0,cl.useContext)(v0),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cl.useContext)(v4);return cu().createElement("tbody",{...mZ(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cu().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cu().cloneElement(r(e),{key:t}):cu().createElement("td",{key:t})))))}),v8=(0,cl.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cl.useContext)(vQ),s=(0,cl.useContext)(v0),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cl.useContext)(v4))?n:{startDate:l.visibleRange.start},c=(0,cl.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yW.get(t),u=yN((n=gD)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yB({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yH(a),timeZone:t.timeZone}),d=t.isSelected(a),p=t.isCellFocused(a);i=i||t.isCellDisabled(a);let f=t.isCellUnavailable(a),m=!i&&!f,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&ys(t.value,a));h&&(d=!0),a=yF(a,yl);let g=(0,cl.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=ys(a,yf(t.timeZone)),v=(0,cl.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(ys(a,t.value.start)||ys(a,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&ys(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&ys(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&p&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y1(b),E=(0,cl.useRef)(!1),x=(0,cl.useRef)(!1),D=(0,cl.useRef)(void 0),{pressProps:_,isPressed:S}=hN({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(ys(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(ys(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});i||(o=ys(a,t.focusedDate)?0:-1),(0,cl.useEffect)(()=>{p&&r.current&&(m2(r.current),"pointer"!==hF&&document.activeElement===r.current&&y3(r.current,{containingElement:y6(r.current)}))},[p,r]);let k=yB({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),C=(0,cl.useMemo)(()=>k.formatToParts(g).find(e=>"day"===e.type).value,[k,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mN(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":v,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:p,isSelected:d,isDisabled:i,isUnavailable:f,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:C}}({date:e},l,c),{hoverProps:m,isHovered:h}=gr({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=h9();y&&(y=f.isFocused);let v=(o=u,a=ya(a=e,o.calendar),o=yv(o),a=yv(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=ys(e,l.highlightedRange.start),w=ys(e,l.highlightedRange.end));let E=m$({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...f}}),x={"data-focused":f.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return cu().createElement("td",{...d,ref:r},cu().createElement("div",{...mN(mZ(t),p,g,m,x,E),ref:c}))}),v7=(0,cl.createContext)({}),be=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mM(e,t,v7);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=gr({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:m}=h9({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=m$({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cu().createElement("div",{...mN(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bt=(0,cl.createContext)({}),br=go(function(e,t){[e,t]=mM(e,t,bt);let{hoverProps:r,isHovered:n}=gr(e),{isFocused:o,isFocusVisible:a,focusProps:i}=h9({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=m$({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cu().createElement("input",{...mN((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var bn={};bn={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let bo=cu().createContext(null),ba="react-aria-focus-scope-restore",bi=null;function bs(e){var t,r,n,o,a,i,s,l,u,c;let d,p,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cl.useRef)(null),w=(0,cl.useRef)(null),E=(0,cl.useRef)([]),{parentNode:x}=(0,cl.useContext)(bo)||{},D=(0,cl.useMemo)(()=>new bx({scopeRef:E}),[E]);mg(()=>{let e=x||bD.root;if(bD.getTreeNode(e.scopeRef)&&bi&&!bp(bi,e.scopeRef)){let t=bD.getTreeNode(bi);t&&(e=t)}e.addChild(D),bD.addNode(D)},[D,x]),mg(()=>{let e=bD.getTreeNode(E);e&&(e.contain=!!g)},[g]),mg(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(ba,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(ba,n)}},[h]),mg(()=>{if(r||n)return;let e=t.current,o=m0(e?e[0]:void 0),a=e=>{let r=h_(e);bc(r,t.current)?bi=t:bd(r)||(bi=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cl.useRef)(void 0),p=(0,cl.useRef)(void 0),mg(()=>{let e=o.current;if(!a){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=m0(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bu(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bc(r,n))return;let a=bv(bl(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bf(i,!0)},n=e=>{(!bi||bp(bi,o))&&bc(h_(e),o.current)?(bi=o,d.current=h_(e)):bu(o)&&!bd(h_(e),o)?d.current?d.current.focus():bi&&bi.current&&bh(bi.current):bu(o)&&(d.current=h_(e))},i=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=hF,n=("virtual"===r||null===r)&&hs()&&hi(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bu(o)&&!bd(a,o)){bi=o;let t=h_(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bi.current&&bh(bi.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),mg(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),i=E,s=y,l=g,f=(0,cl.useRef)("u">typeof document?((e=document)=>e.activeElement)(m0(i.current?i.current[0]:void 0)):null),mg(()=>{let e=i.current,t=m0(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bi||bp(bi,i))&&bc(((e=document)=>e.activeElement)(t),i.current)&&(bi=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),mg(()=>{let e=m0(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bu(i)||t.isComposing)return;let r=e.activeElement;if(!bd(r,i)||!bg(i))return;let n=bD.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bv(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bd(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bd(s,i));(t.preventDefault(),t.stopPropagation(),s)?bf(s,!0):bd(o)?bf(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mg(()=>{var e;let t=m0(i.current?i.current[0]:void 0);if(!s)return;let r=bD.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=bD.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bd(n,i)||n===t.body&&bg(i))){let e=bD.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void by(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bD.getTreeNode(t.scopeRef))return void by(bm(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cu().useRef(c),(0,cl.useEffect)(()=>{m.current&&(bi=u,!bc(((e=document)=>e.activeElement)(m0(u.current?u.current[0]:void 0)),bi.current)&&u.current&&bh(u.current)),m.current=!1},[u]),(0,cl.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m0(E.current?E.current[0]:void 0)),t=null;if(bc(e,E.current)){for(let r of bD.traverse())r.scopeRef&&bc(e,r.scopeRef.current)&&(t=r);t===bD.getTreeNode(E)&&(bi=t.scopeRef)}},[E]),mg(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bD.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bi||bp(E,bi))&&(!n||bD.getTreeNode(n))&&(bi=n),bD.removeTreeNode(E)},[E]);let _=(0,cl.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m0(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bv(bl(n),{tabbable:a,accept:s},n);c.currentNode=bc(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bf(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m0(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bv(bl(n),{tabbable:a,accept:s},n);c.currentNode=bc(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bf(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bv(bl(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bf(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bv(bl(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bf(i,!0),i}}},[]),S=(0,cl.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cu().createElement(bo.Provider,{value:S},cu().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cu().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bl(e){return e[0].parentElement}function bu(e){let t=bD.getTreeNode(bi);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bc(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bd(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bD.traverse(bD.getTreeNode(t)))if(r&&bc(e,r.current))return!0;return!1}function bp(e,t){var r;let n=null==(r=bD.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bf(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h1(e)}catch{}}function bm(e,t=!0){let r=e[0].previousElementSibling,n=bl(e),o=bv(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bv(n=bl(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function bh(e,t=!0){bf(bm(e,t))}function bg(e){let t=bD.getTreeNode(bi);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function by(e){e.dispatchEvent(new CustomEvent(ba,{bubbles:!0,cancelable:!0}))&&bf(e)}function bv(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?mQ:mX,s=m0((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m1(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bc(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bb(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m0(n)),u=bv(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bf(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m0(n)),u=bv(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bw(u);return e&&bf(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bw(u);if(!e)return null;c=e}return c&&bf(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bv(n,{tabbable:o,accept:a}).nextNode();return i&&bf(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bw(bv(n,{tabbable:o,accept:a}));return i&&bf(i,!0),null!=i?i:null}}}function bw(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bE{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new bx({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bc(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new bE;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new bx({scopeRef:null}),this.fastMap.set(null,this.root)}}class bx{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let bD=new bE;function b_(e,t,r){let{direction:n}=gx(),o=(0,cl.useMemo)(()=>bb(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bv(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hN({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mN(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bS(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bS(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bS(e,t,r){let n=bv(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bk(e,t,r){let n=(0,cl.useRef)(t),o=my(()=>{r&&r(n.current)});(0,cl.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bC(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mO(t);let i=mO(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yZ({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mR([!!t,!!r,n,o]),l=mR([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mN(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bP(e,t,r){let{validationBehavior:n,focus:o}=e;mg(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=my(()=>{t.resetValidation()}),i=my(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hF="keyboard",hz("keyboard",null)),e.preventDefault()}),s=my(()=>{t.commitValidation()});(0,cl.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bO=new WeakMap,bR="__role_"+Date.now(),bT="__focusManager_"+Date.now();function bN(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=bC({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,cl.useRef)(null),{focusWithinProps:m}=h5({...e,onFocusWithin(r){var n;f.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=yN((o=bn)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y1(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bR]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bT],E=(0,cl.useMemo)(()=>w||bb(r),[w,r]),x=b_(t,r,"presentation"===e[bR]);bO.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cl.useRef)(e.autoFocus);a="presentation"===e[bR]?{role:"presentation"}:mN(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cl.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bk(e.inputRef,t.value,t.setValue),bP({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mZ(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mN(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:p,isInvalid:i,validationErrors:s,validationDetails:l}}var bj={};bj={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let bA={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},b$={...bA,customError:!0,valid:!1},bI={isInvalid:!1,validationDetails:bA,validationErrors:[]},bM=(0,cl.createContext)({}),bL="__formValidationState"+Date.now();function bF(e){if(e[bL]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bL];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:b$}:null,u=(0,cl.useMemo)(()=>i&&null!=o?bV(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bB(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cl.useContext)(bM),d=(0,cl.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bB(c[e])):bB(c[n]):[],[c,n]),[p,f]=(0,cl.useState)(c),[m,h]=(0,cl.useState)(!1);c!==p&&(f(c),h(!1));let g=(0,cl.useMemo)(()=>bV(m?[]:d),[m,d]),y=(0,cl.useRef)(bI),[v,b]=(0,cl.useState)(bI),w=(0,cl.useRef)(bI),[E,x]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bU(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bI,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bU(v,e)?y.current=e:b(e)},resetValidation(){bU(bI,w.current)||(w.current=bI,b(bI)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bB(e){return e?Array.isArray(e)?e:[e]:[]}function bV(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:b$}:null}function bU(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bW(...e){let t=new Set,r=!1,n={...bA};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bH=new yk((er=bj)&&er.__esModule?er.default:er);function bz(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bK(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bz(),n=new yO(e,yk.getGlobalDictionaryForPackage("@react-stately/datepicker")||bH),l=new yA(e,bY({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bG={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bZ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bY(e,t){var r;e={...t.shouldForceLeadingZeros?bZ:bG,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function bq(e){return e&&"hour"in e?e:new g0}function bJ(e,t){return null===e?null:e?ya(e,t):void 0}function bX(e,t,r,n){if(e)return bJ(e,r);let o=ya(yp(null!=n?n:yy()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?yn(o):n?o:yo(o)}function bQ(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cl.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b0=new yk({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),b1={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b2={year:5,month:2,day:7,hour:2,minute:15,second:15},b4={dayperiod:"dayPeriod"};function b3(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,p=e.value||e.defaultValue||e.placeholderValue||null,[f,m]=bQ(p,e.granularity),h=m||"UTC";if(p&&!(f in p))throw Error("Invalid granularity "+f+" for value "+p.toString());let g=(0,cl.useMemo)(()=>new yA(n),[n]),y=(0,cl.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vz(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cl.useMemo)(()=>{var e;return null!=(e=bJ(v,y))?e:null},[v,y]),[E,x]=(0,cl.useState)(()=>bX(e.placeholderValue,f,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cl.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cl.useMemo)(()=>bY({},_),[_]),k=(0,cl.useMemo)(()=>new yA(n,S),[n,S]),C=(0,cl.useMemo)(()=>k.resolvedOptions(),[k]),P=(0,cl.useMemo)(()=>k.formatToParts(new Date).filter(e=>b1[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[k]),[O,R]=(0,cl.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cl.useRef)(null),N=(0,cl.useRef)(y);(0,cl.useEffect)(()=>{yu(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?ya(t,y):bX(e.placeholderValue,f,y,m)))},[y,f,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(bX(e.placeholderValue,f,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(bX(e.placeholderValue,f,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=ya(t,(null==p?void 0:p.calendar)||new gR)):x(t),T.current=null},$=(0,cl.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cl.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,p;let r=b1[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b1[e.type]&&!t[e.type],f=b1[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?b0.getStringForLocale(d,i):"––"):null,m={type:b4[e.type]||e.type,text:u?f:e.value,...b6(o,e.type,n),isPlaceholder:u,placeholder:f,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"⁦",...b6(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"⁩",...b6(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"⁩",...b6(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,k,C,j,y,n,f),[$,O,k,C,j,y,n,f]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,C));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cl.useMemo)(()=>bK(v,u,c,d,_),[v,u,c,d,_]),B=bF({...e,value:v,builtinValidation:F}),V=B.displayValidation.isInvalid,U=e.validationState||(V?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:k,validationState:U,isInvalid:V,granularity:f,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b2[e]||1)},decrementPage(e){L(e,-(b2[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,C))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=bX(e.placeholderValue,f,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yA(n,bY(e,_)).format($):"",getDateFormatter:(e,t)=>new yA(e,bY({},{..._,...t}))}}function b6(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let b5=(0,cl.createContext)(null),b9=(0,cl.createContext)(null),b8=(0,cl.createContext)(null),b7=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(b9),n=(0,cl.useContext)(b8);return r||n?cu().createElement(wt,{...e,ref:t}):cu().createElement(we,{...e,ref:t})}),we=(0,cl.forwardRef)((e,t)=>{let[r,n]=mM({slot:e.slot},t,b5),{locale:o}=gx(),a=b3({...r,locale:o,createCalendar:vM}),i=(0,cl.useRef)(null),{fieldProps:s,inputProps:l}=bN({...r,inputRef:i},a,n);return cu().createElement(mA,{values:[[b9,a],[bt,{...l,ref:i}],[v7,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cu().createElement(wt,e))}),wt=(0,cl.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cl.useContext)(b9),a=(0,cl.useContext)(b8),i=null!=o?o:a;return cu().createElement(cu().Fragment,null,cu().createElement(be,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cl.cloneElement)(n(e),{key:t}))),cu().createElement(br,null))}),wr=(0,cl.createContext)({});function wn({children:e}){let t=(0,cl.useMemo)(()=>({register:()=>{}}),[]);return cu().createElement(hy.Provider,{value:t},e)}cu().forwardRef(({children:e,...t},r)=>{let n=(0,cl.useRef)(!1),o=(0,cl.useContext)(hy);r=mm(r||(null==o?void 0:o.ref));let a=mN(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hE(o,r),(0,cl.useEffect)(()=>{n.current||(n.current=!0)},[]),cu().createElement(hy.Provider,{value:a},e)});let wo=cu().createContext(null);function wa(e){var t;let r=mk(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[a,i]=(0,cl.useState)(!1),s=(0,cl.useMemo)(()=>({contain:a,setContain:i}),[a,i]),{getContainer:l}=null!=(t=(0,cl.useContext)(wr))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=cu().createElement(bs,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!o},u)),u=cu().createElement(wo.Provider,{value:s},cu().createElement(wn,null,u)),hP().createPortal(u,n)}let wi=(0,cl.createContext)(null),ws=(0,cl.createContext)(null),wl=(0,cl.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mM(e,t,wi);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mR();a=e["aria-label"]?void 0:a;let i=(0,cl.useRef)(!1);return(0,cl.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h1(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h1(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),mg(()=>{null==n||n(!0)},[n=null==(r=(0,cl.useContext)(wo))?void 0:r.setContain]),{dialogProps:{...mZ(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cl.useContext)(ws);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=m$({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cu().createElement("section",{...mZ(e),...n,...i,ref:t,slot:e.slot||void 0},cu().createElement(mA,{values:[[gl,{slots:{[mj]:{},title:{...o,level:2}}}],[gi,{slots:{[mj]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wu=(0,cl.createContext)(null),wc=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(wu);return(null==r?void 0:r.isInvalid)?cu().createElement(wd,{...e,ref:t}):null}),wd=(0,cl.forwardRef)((e,t)=>{let r=(0,cl.useContext)(wu),n=mZ(e),o=m$({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cu().createElement(gc,{slot:"errorMessage",...n,...o,ref:t})}),wp=(0,cl.createContext)(null),wf=(0,cl.createContext)({}),wm=go(function(e,t){[e,t]=mM(e,t,wf);let{elementType:r="label",...n}=e;return cu().createElement(r,{className:"react-aria-Label",...n,ref:t})}),wh=(0,cl.createContext)({placement:"bottom"}),wg=new WeakMap,wy=[];function wv(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wb(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function ww(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wb(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(wb(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wb((r-t)/n,n))*n),a=wb(a,n)}let wE={top:"top",bottom:"top",left:"left",right:"left"},wx={top:"bottom",bottom:"top",left:"right",right:"left"},wD={top:"left",left:"top"},w_={top:"height",left:"width"},wS={width:"totalWidth",height:"totalHeight"},wk={},wC="u">typeof document?window.visualViewport:null;function wP(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,p={},f=(null!=(t=null==wC?void 0:wC.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wC?void 0:wC.width)?r:l,s=null!=(n=null==wC?void 0:wC.height)?n:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,wC&&(c=wC.offsetTop,d=wC.offsetLeft)}else({width:i,height:s,top:c,left:d}=wj(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=i,u=s;return ha()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(p.top=0,p.left=0,c=null!=(o=null==wC?void 0:wC.pageTop)?o:0,d=null!=(a=null==wC?void 0:wC.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function wO(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[w_[e]],c=n.scroll[wE[e]]+a,d=u+n.scroll[wE[e]]-a,p=t-l+i[e]-n[wE[e]],f=t-l+r+i[e]-n[wE[e]];return p<c?c-p:f>d?Math.max(d-f,c-p):0}function wR(e){if(wk[e])return wk[e];let[t,r]=e.split(" "),n=wE[t]||"right",o=wD[n];wE[r]||(r="center");let a=w_[n],i=w_[o];return wk[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wk[e]}function wT(e,t,r,n,o,a,i,s,l,u){var c,d,p,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(p=r[w])?p:0))/2:g!==v&&(E[v]+=(null!=(f=e[w])?f:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wv(E[v],x,D),h===y){let r=s?i[b]:t[wS[b]];E[wx[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function wN(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wx[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wx[c]]-o)}function wj(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wA(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wj(e);let n=wj(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function w$(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let wI=new WeakMap;function wM(e){let{ref:t,box:r,onResize:n}=e;(0,cl.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wL="u">typeof document?window.visualViewport:null;function wF(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wB=[],wV="u">typeof document&&window.visualViewport,wU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wW=0;function wH(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wz(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wK(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=y6(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wG={};function wZ(e){var t;let{onDismiss:r,...n}=e,o=yZ(n,yN((t=wG)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cu().createElement(yJ,null,cu().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wY(e,t,r){mg(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hC.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function wq(e){let[t,r]=vz(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cl.useCallback)(()=>{r(!0)},[r]),o=(0,cl.useCallback)(()=>{r(!1)},[r]),a=(0,cl.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wG={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let wJ=(0,cl.createContext)(null),wX=(0,cl.createContext)(null),wQ=(0,cl.forwardRef)(function(e,t){[e,t]=mM(e,t,wJ);let r=(0,cl.useContext)(ws),n=wq(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=function(e,t){let[r,n]=(0,cl.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return wY(e,o,(0,cl.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,i=(0,cl.useContext)(gn),{direction:s}=gx();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cu().createElement(cu().Fragment,null,t)}return!o||o.isOpen||a?cu().createElement(w0,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w0({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(0),c=(0,cl.useRef)(null),d=(0,cl.useContext)(wX),p=d&&"SubmenuTrigger"===n.trigger;mg(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:p}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cl.useEffect)(()=>{if(o&&!wB.includes(t))return wB.push(t),()=>{let e=wB.indexOf(t);e>=0&&wB.splice(e,1)}},[o,t]);let l=()=>{wB[wB.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cl.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=my(e=>{r&&wF(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=my(e=>{r&&r(e)});(0,cl.useEffect)(()=>{let e=a.current;if(n)return;let r=m0(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wF(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wB[wB.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wB[wB.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=h5({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bd(e.relatedTarget,bi))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:f,arrowProps:m,placement:h}=function(e){var t,r,n;let{direction:o}=gx(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:p="u">typeof document?document.body:null,offset:f=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cl.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,p,f,m,g,o,v,b,a],D=(0,cl.useRef)(null==wL?void 0:wL.scale);(0,cl.useEffect)(()=>{g&&(D.current=null==wL?void 0:wL.scale)},[g]);let _=(0,cl.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!p||(null==wL?void 0:wL.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!w$(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!w$(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wj(s):wA(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wj(l),D={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wP(p),k=wP(v),C="BODY"===p.tagName?wj(v):wA(v,p);return"HTML"===v.tagName&&"BODY"===p.tagName&&(k.scroll.top=0,k.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,p,f,m,h){var g,y,v,b,w,E,x,D,_,S,k,C,P,O;let R,T,N,j=wR(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wT(t,s,r,j,c,d,u,p,m,h),B=c,V=wN(s,u,t,o,a+c,j);if(i&&n[A]>V){let e=wR(`${wx[M]} ${L}`),n=wT(t,s,r,e,c,d,u,p,m,h);wN(s,u,t,o,a+c,e)>V&&(j=e,F=n,B=c)}let U="bottom";"top"===j.axis?"top"===j.placement?U="top":"bottom"===j.placement&&(U="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?U="bottom":"bottom"===j.crossPlacement&&(U="top"));let W=wO($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=U,R=p?u.height:s[wS.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(k=o.bottom)?k:0)+a)):Math.max(0,T+E-(s.top+(null!=(C=s.scroll.top)?C:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));f&&f<H&&(H=f),r.height=Math.min(r.height,H),W=wO($,(F=wT(t,s,r,j,B,d,u,p,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[wE[$]],G=m/2+h,Z="left"===wE[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wv(K,t[$]+m/2-(F[$]+o[wE[$]]),t[$]+t[I]-m/2-(F[$]+o[wE[$]]));return z[$]=wv(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,k,C,f,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);mg(_,x),mg(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wM({ref:s,onResize:_}),wM({ref:i,onResize:_});let S=(0,cl.useRef)(!1);mg(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wL||wL.addEventListener("resize",t),null==wL||wL.addEventListener("scroll",r),()=>{null==wL||wL.removeEventListener("resize",t),null==wL||wL.removeEventListener("scroll",r)}},[_]);let k=(0,cl.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cl.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wI.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;mg(()=>{if(!t){let e,t,r,n;return 1==++wW&&(u=ho()?(r=null,n=mh(wz(document,"touchstart",r=>{((e=y6(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wH(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wz(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),wz(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wz(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wU.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=mh(wz(window,"scroll",()=>{window.scrollTo(0,0)}),wH(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wH(document.documentElement,"overflow","hidden"),wH(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wV&&(wV.height<window.innerHeight?requestAnimationFrame(()=>{wK(n)}):wV.addEventListener("resize",()=>wK(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):mh(wH(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wH(document.documentElement,"overflow","hidden"))),()=>{0==--wW&&u()}}},[t])}({isDisabled:a||!t.isOpen}),mg(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=wg.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wg.set(e,r+1))};wy.length&&wy[wy.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return wy.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wg.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wg.delete(e)):wg.set(e,t-1))}s===wy[wy.length-1]?(wy.pop(),wy.length&&wy[wy.length-1].observe()):wy.splice(wy.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=wy[wy.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mN(d,f),arrowProps:m,underlayProps:p,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:p?d:c},e),y=n.popoverRef,v=function(e,t=!0){let[r,n]=(0,cl.useState)(!0),o=r&&t;return mg(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),wY(e,o,(0,cl.useCallback)(()=>n(!1),[])),o}(y,!!g)||n.isEntering||!1,b=m$({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cl.useState)(!1);mg(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cl.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h1(y.current)},[E,y]);let D={...f.style,...b.style},_=cu().createElement("div",{...mN(mZ(n),f),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cu().createElement(wZ,{onDismiss:e.close}),cu().createElement(wh.Provider,{value:{...h,placement:g,ref:i}},b.children),cu().createElement(wZ,{onDismiss:e.close}));return p?cu().createElement(wa,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cu().createElement(wa,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cu().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cu().createElement("div",{ref:c,style:{display:"contents"}},cu().createElement(wX.Provider,{value:c},_)))}function w1(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w2=(0,cl.createContext)(null),w4=(0,cl.createContext)(null),w3=(0,cl.createContext)(null),w6=(0,cl.createContext)(null),w5=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mM(e,t,w2);let{validationBehavior:o}=mI(wp)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=wq(e),[n,o]=vz(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=bQ(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,p]=(0,cl.useState)(null),[f,m]=(0,cl.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cl.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,cl.useMemo)(()=>bK(n,y,v,b,g),[n,y,v,b,g]),E=bF({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(yn(e)):yo(e,t)),p(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:f,setDateValue:t=>{let n="function"==typeof c?c():c;u?f||n?_(t,f||bq(e.defaultValue||e.placeholderValue)):p(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,f||bq(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yA(e,bY(t,g)).format(l):"",getDateFormatter:(e,t)=>new yA(e,bY({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mL(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mO(),a=mO(),i=mO(),s=yN((n=bn)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:m}=bC({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=b_(t,r),g=p["aria-labelledby"]||p.id,{locale:y}=gx(),v=t.formatValue(y,{month:"long"}),b=y1(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mZ(e),x=(0,cl.useMemo)(()=>bb(r),[r]),D=(0,cl.useRef)(!1),{focusWithinProps:_}=h5({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mN(E,h,p,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...p,id:i,[bR]:"presentation","aria-describedby":w,value:t.value,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[bL]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mF(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cl.useState)(null),E=(0,cl.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wM({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=h9({within:!0}),S=m$({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=mZ(e);return delete k.id,cu().createElement(mA,{values:[[w3,i],[v7,{...c,ref:s,isInvalid:i.isInvalid}],[b5,p],[gi,{...f,isPressed:i.isOpen}],[wf,{...d,ref:l,elementType:"span"}],[vJ,h],[ws,i],[wJ,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wi,m],[gu,{slots:{description:g,errorMessage:y}}],[wu,v]]},cu().createElement("div",{...x,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),w9=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mM(e,t,w4);let{validationBehavior:o}=mI(wp)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=wq(e),[a,i]=vz(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cl.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w1(e)?i(e):i(null)},[d,p]=bQ((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),f="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cl.useState)(null),[y,v]=(0,cl.useState)(null);u&&w1(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(yn(e.start)):yo(e.start,t.start),end:"timeZone"in t.end?t.end.set(yn(e.end)):yo(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;f?w1(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bq(e.placeholderValue),end:(null==y?void 0:y.end)||bq(e.placeholderValue)}):g(t):w1(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w1(h)&&w1(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cl.useMemo)(()=>({granularity:d,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:k}=e,C=(0,cl.useMemo)(()=>{var e,t;let r;return r=bW(bK(null!=(e=null==u?void 0:u.start)?e:null,_,S,k,D),bK(null!=(t=null==u?void 0:u.end)?t:null,_,S,k,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bW(r,{isInvalid:!0,validationErrors:[(yk.getGlobalDictionaryForPackage("@react-stately/datepicker")||bH).getStringForLocale("rangeReversed",bz())],validationDetails:{...bA,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,k,D]),P=bF({...e,value:a,name:(0,cl.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:C}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:f,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w1(h)&&f&&b(h,{start:(null==y?void 0:y.start)||bq(e.placeholderValue),end:(null==y?void 0:y.end)||bq(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bY(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),p=new yA(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=p}else n=new yA(t,bY(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yA(e,bY({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cl.useRef)(null),[l,u]=mL(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=yN((l=bn)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:f,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bC({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=gx(),b=t.formatValue(v,{month:"long"}),w=y1(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mO(),_=mO(),S=b_(t,r),k=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,cl.useMemo)(()=>bb(r,{accept:e=>e.id!==D}),[r,D]),P={[bT]:C,[bR]:"presentation","aria-describedby":k,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},O=mZ(e),R=(0,cl.useRef)(!1),{focusWithinProps:T}=h5({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cl.useRef)(bI),j=(0,cl.useRef)(bI);return{groupProps:mN(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...f,onClick:()=>{C.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bL]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bW(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bL]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bW(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:c,validationErrors:d,validationDetails:p}}({...mF(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cl.useState)(null),x=(0,cl.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wM({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=h9({within:!0}),k=m$({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=mZ(e);return delete C.id,cu().createElement(mA,{values:[[w6,i],[v7,{...c,ref:s,isInvalid:i.isInvalid}],[gi,{...m,isPressed:i.isOpen}],[wf,{...d,ref:l,elementType:"span"}],[vX,g],[ws,i],[wJ,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wi,h],[b5,{slots:{start:p,end:f}}],[gu,{slots:{description:y,errorMessage:v}}],[wu,b]]},cu().createElement("div",{...D,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function w8(e){return cu().createElement(gE,e)}function w7(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof gX||e instanceof g2||e instanceof g3)return t?ya(e,t):e;{let r=dQ()(e).toDate(),n=new gX(r.getFullYear(),r.getMonth()+1,r.getDate());return t?ya(n,t):n}}function Ee(e){if(e)return e.toDate(yy())}function Et(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Er(e){let t=e??"",r=Et(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function En(){let e=window.i18next.language,t=Et(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;eo=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;eo=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Eo=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(eo||"en-US"),Ea=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ei={};for(let e=1;e<100;e++)Ei[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Es={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},El="[1234567890一二三四五六七八九〇\\d]",Eu={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},Ec={},Ed={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Ep={zone:Ed,year:Ei,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},Ef={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(Ed).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},Em={...Ef,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},Eh={},Eg=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Eo){return Eh[t.toLowerCase()]||(Eh[t.toLowerCase()]=new e(t)),Eh[t.toLowerCase()]}constructor(e=Eo){this.locale=e,this.lookups={...Ep},this.vars={...Ef};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Eu:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(Ec[e])return Ec[e];if("fullwide"===e||"hanidec"===e)return{group:El,lookup:{...Eu}};let t=Es[e];if(!t)return{group:"\\d",lookup:{...Eu}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Ec[e]={group:`[${r}-${n}]`,lookup:o},Ec[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Em)Em.hasOwnProperty(r)&&(this.vars[r]=Em[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},Ey=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],Ev={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Eb=()=>new Date;function Ew(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var EE=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},Ex=["year","month","day","hour","minute","second","millisecond","offset"],ED={};function E_(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var ES=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],Ek={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...ES],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:ES,id:ES,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function EC(e,t=Eo){let r=function(e){if(!ED[e]){var t,r;let n,o,a=Eg.factory(e);ED[e]=new EE({doneChecker:E_,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Ew(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Ew(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Ew(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${El}{2,4})\\s*\u5E74\\s*(${El}{1,2})\\s*\u6708\\s*(${El}{1,2})\\s*\u65E5$`),handler:Ew(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Ew(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:Ew(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Eb(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?Ev[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=Eb();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Ew(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Ew(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:Ew(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Ew(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Ew(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Ew(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:Ew(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Ew(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Ew(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Ew(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Ew(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Ew(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Ew(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Ew(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Ew(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Ew(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Ew(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Ew(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Ew(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:Ew(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Ew(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Ew(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:Ew(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:Ew(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:Ew(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Ew(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:Ew(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:Ew(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:Ew(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:Ew(["offset"])}],o=a.baseName.slice(0,5),Ey.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(Ex.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ei[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return ED[e]}(t),n=function(e,t){let r=Ek[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function EP(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ea(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new Ea(t.valueOf()-60*e.offset*1e3):t}function EO(e,t=Eo){let r=EC(e,t),n=r.invalid?new Ea(NaN):EP(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function ER(e,t=Eo){return e instanceof Date?new Ea(e.valueOf()):"number"==typeof e?new Ea(e):EO(e,t)}Date.fromString=Ea.fromString=EO,Date.fromAny=Ea.fromAny=ER,"u">typeof window&&(window.anyDateParser={fromString:EO,fromAny:ER,fromObject:EP,attempt:EC});var ET=r(5238),EN=r(3826);let Ej=function(e){return null==e};function EA(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}dX.extend(d0),dX.extend(EN),dX.extend(ET);let E$="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EI(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&dX(e,E$).isValid()}function EM(e){return dX(e).isToday()}function EL(e){return EI(e)?dX(e,E$).toDate():null}function EF(e,t=!1){let r=dX(e);return t&&(r=r.utc()),r.format(E$)}function EB(e){return dX(e).toDate()}var EV=new WeakMap;let EU=new class{register(e,t){EA(this,EV).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EA(this,EV).has(t))return EA(this,EV).get(t)}if(e.language&&EA(this,EV).has(e.language))return EA(this,EV).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EA(this,EV).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EV,{writable:!0,value:new Map})}};function EW(e,t){EU.register(e,t)}function EH(e){let t=e??En();return EU.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let Ez={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EK(e,t={}){let r=EC(e,En());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!Ej(r.day)&&Ej(r.month)&&(r=Object.assign({},nr(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nr(r,"day"),{date:r.day}));let n=dX().set(r).toDate();return Ej(r.year)&&(t.year=!1),Ej(r.month)&&(t.month=!1),Ej(r.date)&&(t.day=!1),EG(n,t)}function EG(e,t){let r,n=t?.locale??En(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...Ez,...{noToday:"am"===o.language},...t},f={calendar:a??EH(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},m=dX(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(EZ("-"))),"wide"==i&&(t=t.map(EZ(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${EY(e)}`),r}let EZ=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function EY(e){return e.toLocaleTimeString(En(),{hour:"2-digit",minute:"2-digit"})}function Eq(e,t){return EG(e,{...t,time:!0})}function EJ(e,t){let r=EH("string"==typeof t?new Intl.Locale(t):t);return r?ya(e,vM(r)):e}function EX(e,t){return new Intl.DurationFormat(En(),t).format(e)}function EQ(e,t){if(null==e)return null;if("string"==typeof e){let r=EC(e,En());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nr(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nr(r,"day"),...{date:r.day}}),dX(t).set(r))}return dX(e)}let E0=["years","months","days","hours","minutes","seconds"],E1={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E2={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function E4(e,t=dX(),r){let n,o=dX(t),a=EQ(e,o);if(null==a)return null;if("string"==typeof r){let e=E1[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E1[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E0.indexOf(r);for(let o=0;o<E0.length;o++){let a=E0[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E1[s]??s,function(e,t,r,n){let o=E0.indexOf(r),a=E0.indexOf(n),i=E0.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E2};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E1[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let E3={style:"short",localeMatcher:"lookup"};function E6(e,t=dX(),r){let n=E4(e,t,r);return null==n?null:EX(n,"object"==typeof r&&r.formatOptions?{...E3,...r.formatOptions}:E3)}let E5=(0,cl.createContext)(null);function E9(){let e=dl({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cl.useMemo)(()=>{let t=En();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cl.useMemo)(()=>{let e=EH(t);return void 0!==e?vM(e):void 0},[t]),n=(0,cl.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cl.useMemo)(()=>r?ya(yf(yy()),r):yf(yy()),[r]);return{calendar:r,intlLocale:n,today_:o}}let E8=new gX(1793,1,1);var E7={};function xe(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}E7={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xt=r(137);function xr(e={}){let{locale:t}=gx();return(0,cl.useMemo)(()=>new(0,xt.K)(t,e),[t,e])}var xn={};function xo(e){var t;let r=(0,cl.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=yN((t=xn)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cl.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cl.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cl.useEffect)(()=>{y.current&&(mV&&mV.clear("assertive"),mU(w,"assertive"))},[w]);let E=my(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=my(e=>{clearTimeout(r.current),null==p||p(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=hx();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),null==p||p());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xn={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};var xa=r(7120);function xi(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xs=(0,cl.createContext)(null),xl=(0,cl.createContext)(null),xu=(0,cl.forwardRef)(function(e,t){var r,n;[e,t]=mM(e,t,xs);let{validationBehavior:o}=mI(wp)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=gx(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wv(a,t,r):ww(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wv(i,t,r):ww(i,t,r,n));let[d,p]=vz(a,isNaN(i)?NaN:i,s),[f,m]=(0,cl.useState)(()=>isNaN(d)?"":new(0,xt.K)(l,o).format(d)),h=(0,cl.useMemo)(()=>new(0,xa.d)(l,o),[l,o]),g=(0,cl.useMemo)(()=>h.getNumberingSystem(f),[h,f]),y=(0,cl.useMemo)(()=>new(0,xt.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cl.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cl.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bF({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cl.useState)(d),[_,S]=(0,cl.useState)(l),[k,C]=(0,cl.useState)(o);Object.is(d,x)&&l===_&&o===k||(m(b(d)),D(d),S(l),C(o));let P=(0,cl.useMemo)(()=>h.parse(f),[h,f]),O=(e,n=0)=>{if(isNaN(P))return ww(isNaN(n)?0:n,t,r,E);{let n=ww(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:ww(xi(e,P,E),t,r,E)}},R=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||ww(P,t,r,E)>P||xi("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cl.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||ww(P,t,r,E)<P||xi("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),p(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(p(ww(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),p(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:p,setInputValue:m,inputValue:f,commit:()=>{let e;if(!f.length){p(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wv(P,t,r):ww(P,t,r,n),p(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cl.useRef)(null),[u,c]=mL(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:p,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:k,incrementToMax:C,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=yN((o=E7)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mO(i),{focusProps:I}=h2({onBlur(){N()}}),M=xr(g),L=(0,cl.useMemo)(()=>M.resolvedOptions(),[M]),F=xr({...g,currencySign:void 0}),B=(0,cl.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:V,incrementButtonProps:U,decrementButtonProps:W}=xo({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:f,minValue:p,onIncrement:k,onIncrementToMax:C,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cl.useState)(!1),{focusWithinProps:K}=h5({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cl.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);yX(t,"wheel",n?void 0:o)}({onScroll:(0,cl.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?k():e.deltaY<0&&P())},[P,k]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";hr()?Z?Y="text":G&&(Y="decimal"):hs()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mZ(e),J=(0,cl.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=my(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cl.useEffect)(()=>{if(!xe()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xe()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vz(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=h6(e,t),d=bF({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bC({...e,isInvalid:p,errorMessage:e.errorMessage||f}),b=mZ(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bk(t,l,u),bP(e,d,t),(0,cl.useEffect)(()=>{if(t.current instanceof m1(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mN(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:p,validationErrors:f,validationDetails:m}}(e,r),c=(0,cl.useRef)(null);return{inputProps:mN(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bL]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cl.useMemo)(()=>mh(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bk(r,t.numberValue,t.setNumberValue);let ea=mN(V,I,er,{role:null,"aria-roledescription":ho()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mO(),eu=mO(),ec=mN(U,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mN(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mF(e),label:c,validationBehavior:a},s,l),b=m$({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mZ(e);return delete w.id,cu().createElement(mA,{values:[[xl,s],[v7,p],[bt,{...f,ref:l}],[wf,{...d,ref:u}],[gi,{slots:{increment:m,decrement:h}}],[gu,{slots:{description:g,errorMessage:y}}],[wu,v]]},cu().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&cu().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xc(e,t){return Number.parseInt(EG(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xd=(0,cl.forwardRef)(function(e,t){let{className:r}=e,n=(0,cl.useContext)(vQ),o=(0,cl.useContext)(v0),a=n??o,i=(0,cl.useContext)(E5),s=yy(),l=EG(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xc(a.visibleRange.start.toDate(s),i),c=a.maxValue?xc(a.maxValue.toDate(s),i):void 0,d=a.minValue?xc(a.minValue.toDate(s),i):void 0,p=(0,cl.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,pc.jsxs)("span",{ref:t,className:r,children:[(0,pc.jsx)("span",{children:l}),(0,pc.jsxs)(xu,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,pc.jsx)(br,{}),(0,pc.jsxs)(be,{children:[(0,pc.jsx)(gs,{slot:"increment",children:(0,pc.jsx)(pQ,{size:8})}),(0,pc.jsx)(gs,{slot:"decrement",children:(0,pc.jsx)(pq,{size:8})})]})]})]})}),xp="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xf="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xm="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xh="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xg="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xy="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",xv="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xb="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xw({children:e}){let t=(0,cl.useContext)(w3),r=(0,cl.useContext)(w6),n=t??r,o=dV(()=>n?.close());return(0,pc.jsx)(wl,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xE=(0,cl.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,pc.jsx)(wQ,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,pc.jsx)(xw,{children:(0,pc.jsxs)(a?v2:v1,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,pc.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,pc.jsx)(gs,{className:pp()(xg,xy),slot:"previous",children:(0,pc.jsx)(p5,{size:16})}),(0,pc.jsx)(xd,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,pc.jsx)(gs,{className:pp()(xg,xy),slot:"next",children:(0,pc.jsx)(p9,{size:16})})]}),(0,pc.jsx)(v3,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,pc.jsx)(v8,{className:pp()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xx=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(w3),[n,o]=mM({slot:e.slot},t,b5),{locale:a}=gx(),i=b3({...n,locale:a,createCalendar:vM}),s=(0,cl.useRef)(null),{fieldProps:l,inputProps:u}=bN({...n,inputRef:s},i,o),c=(0,cl.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,pc.jsxs)(mA,{values:[[b9,i],[bt,{...u,ref:s}],[v7,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,pc.jsx)(be,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,r)=>(0,cl.cloneElement)(e.children(t),{key:r}))}),(0,pc.jsx)(br,{})]})}),xD=(0,cl.forwardRef)(function(e,t){let r=(0,cl.useContext)(w3),n=(0,cl.useContext)(w6);return(r??n).isInvalid?(0,pc.jsx)(mo,{ref:t,size:16,...e}):(0,pc.jsx)(pY,{ref:t,size:16,...e})});class x_{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xS=new Map,xk=(0,cl.forwardRef)(function({segment:e,...t},r){let n=(0,cl.useContext)(b9),o=mm(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cl.useRef)(""),{locale:l,direction:u}=gx(),c=function(){var e;let{locale:t}=gx(),r=yT((e=bn)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cl.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new x_(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:m}=bO.get(t),h=e.isPlaceholder?"":e.text,g=(0,cl.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yB({month:"long",timeZone:g.timeZone}),v=yB({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=xo({value:e.value,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,cl.useMemo)(()=>new(0,xa.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=gx(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xS.has(r))return xS.get(r);let n=new Intl.Collator(t,e);return xS.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cl.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cl.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cl.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yB({hour:"numeric",hour12:!0}),_=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cl.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),k=yB({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,cl.useMemo)(()=>{if("era"!==e.type)return[];let r=ya(new gX(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[k,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=C.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};yX((0,cl.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cl.useRef)("");yX(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),yX(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),mg(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=ho()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cl.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let T=mO(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yZ({"aria-label":`${j}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mN(b,A,{id:T,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(cu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(ht()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),E()}},onFocus:()=>{s.current="",r.current&&y3(r.current,{containingElement:y6(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=h9(),{hoverProps:u,isHovered:c}=gr({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cl.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,cl.useCallback)(e=>{e.stopPropagation()},[]);return(0,pc.jsx)("span",{...mN(mZ(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),xC={short:!1,size:"md"},xP=(0,cl.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:m,short:h,size:g,value:y,...v}={...xC,...e},{calendar:b,intlLocale:w,today_:E}=E9(),x=(0,cl.useId)(),D=!!(u??l),_=(0,cl.useMemo)(()=>w7(n,b),[n,b]),S=(0,cl.useMemo)(()=>w7(y,b,!0),[y,b]),k=(0,cl.useMemo)(()=>w7(d,b),[d,b]),C=(0,cl.useMemo)(()=>w7(p??E8,b),[p,b]),P=(0,cl.useMemo)(()=>a||s,[a,s]),O=(0,cl.useMemo)(()=>(m&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>f?.(Ee(e)))),[m,f]);return(0,pc.jsx)(w8,{locale:w.toString(),children:(0,pc.jsx)("div",{className:pp()("cds--form-item",r),children:(0,pc.jsx)(mA,{values:[[E5,w]],children:(0,pc.jsxs)(w5,{className:pp()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,pc.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,pc.jsx)(wm,{className:pp()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,pc.jsxs)(be,{className:xp,children:[(0,pc.jsx)(xx,{id:D?x:void 0,ref:t,className:pp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,pc.jsx)(xk,{className:xf,segment:e}):(0,pc.jsx)(cu().Fragment,{})}),(0,pc.jsx)(gs,{className:pp()(xg,{[xv]:"sm"===g,[xy]:"md"===g||!g||0===g.length,[xb]:"lg"===g}),children:(0,pc.jsx)(xD,{})})]}),(0,pc.jsx)(wc,{className:xh,children:i})]}),(0,pc.jsx)(xE,{variant:"single",today_:E})]})})})})}),xO=(0,cl.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=E9(),w=(0,cl.useId)(),E=!!(s??i),x=(0,cl.useMemo)(()=>{if(m)return{start:w7(m[0],y,!1),end:w7(m[1],y,!1)}},[m,y]),D=(0,cl.useMemo)(()=>{if(t)return{start:w7(t[0],y,!1),end:w7(t[1],y,!1)}},[t,y]),_=(0,cl.useMemo)(()=>w7(c??E8,y,!0),[c,y]),S=(0,cl.useMemo)(()=>w7(u,y,!0),[u,y]),k=(0,cl.useMemo)(()=>r||a,[r,a]),C=(0,cl.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([Ee(e.start),Ee(e.end)]))),[p,d]);return(0,pc.jsx)(w8,{locale:v.toString(),children:(0,pc.jsx)("div",{className:pp()("cds--form-item",e),children:(0,pc.jsx)(mA,{values:[[E5,v]],children:(0,pc.jsx)(w9,{id:E?w:void 0,className:pp()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:C,children:(0,pc.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,pc.jsx)(wm,{className:pp()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,pc.jsxs)(be,{className:xp,children:[(0,pc.jsxs)("div",{className:pp()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===f,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===f||!f||0===f.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===f}),children:[(0,pc.jsx)(b7,{className:pp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xm),slot:"start",children:e=>(0,pc.jsx)(xk,{className:xf,segment:e})}),(0,pc.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,pc.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,pc.jsx)(b7,{className:pp()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xm),slot:"end",children:e=>(0,pc.jsx)(xk,{className:xf,segment:e})})]}),(0,pc.jsx)(gs,{className:pp()(xg,{[xv]:"sm"===f,[xy]:"md"===f||!f||0===f.length,[xb]:"lg"===f}),children:(0,pc.jsx)(xD,{})})]}),(0,pc.jsx)(wc,{className:xh,children:n}),(0,pc.jsx)(xE,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xR=({diagnoses:e})=>{let{diagnosisTags:t}=dl({externalModuleName:"@openmrs/esm-styleguide"});return(0,pc.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,a=t[1===r?"primaryColor":"secondaryColor"];return(0,pc.jsx)(py.Tag,{type:a,children:o},n)})})},xT={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},xN=({width:e="64",height:t="64"})=>(0,pc.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,pc.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xj=e=>{let t="tablet"===d$(),r=e.launchForm;return(0,pc.jsx)(py.Layer,{className:xT.layer,children:(0,pc.jsxs)(py.Tile,{className:xT.tile,children:[(0,pc.jsx)("div",{className:t?xT.tabletHeading:xT.desktopHeading,children:(0,pc.jsx)("h4",{children:e.headerTitle})}),(0,pc.jsx)(xN,{}),(0,pc.jsx)("p",{className:xT.content,children:iW("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,pc.jsx)("p",{className:xT.action,children:r&&(0,pc.jsx)(py.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iW("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xA=({error:e,headerTitle:t})=>{let r="tablet"===d$();return(0,pc.jsx)(py.Layer,{children:(0,pc.jsxs)(py.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,pc.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,pc.jsx)("h4",{children:t})}),(0,pc.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iW("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,pc.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iW("errorCopy")})]})})},x$=xA,xI=cu().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dL(),i=window.location??{pathname:""},s=cD(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,pc.jsxs)(py.SideNav,{"aria-label":iW("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,pc.jsx)(ck,{name:"global-nav-menu-slot"}),r?(0,pc.jsx)(c9,{value:o,fallback:(0,pc.jsx)(ck,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,pc.jsx)(cc.Provider,{value:o,children:(0,pc.jsx)(ck,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),xM=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cl.useState)(""),s=(0,cl.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dp()(t,i5,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cl.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:m}=function(e,t=0,r=""){let n=dc(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dC()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let a=`${i4}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},i5);return(0,cl.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cl.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cl.useCallback)(e=>{o(),i(e.trim())},[o]),y=dU((0,cl.useCallback)(()=>{!p&&d&&m(e=>e+1)},[p,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)(py.Search,{"aria-describedby":f?`${s}-error`:void 0,labelText:iW("searchForLocation"),id:s,placeholder:iW("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,pc.jsx)(py.InlineNotification,{kind:"error",subtitle:iW("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iW("error","Error")})}),(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,pc.jsx)(py.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,pc.jsx)(py.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,pc.jsx)(py.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,pc.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,pc.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iW("noResultsToDisplay")})})}),p&&(0,pc.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,pc.jsx)(py.InlineLoading,{description:iW("loading")})})]})})]})},xL=F("modalState",{modalContainer:null,modalStack:[]}),xF=0;async function xB(e,t,r={}){let n=uY(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=xF++;o=await co({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function xV(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xU(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xW(e){return e.find(e=>!xV(e))}function xH(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xz=window.getComputedStyle(document.body).overflow;function xK({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xZ),document.body.style.overflow="hidden",t.style.visibility="unset");let r=xW(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",xB(r,e.modalName,e.props).then(n=>{xV(e)?xU(e.modalName,n):n?(e.parcel=n,t.prepend(r),xH(e,xW(xL.getState().modalStack)===e),n.mountPromise.then(()=>{xV(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,xG(e)})):xG(e)},t=>{k(t),xG(e)});break}case"MOUNTING":case"MOUNTED":xH(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xU(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xL.getState();xL.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xz,removeEventListener("keydown",xZ)}function xG(e){if(xV(e))return;e.state="TO_BE_DELETED";let t=xL.getState();xL.setState({...t,modalStack:[...t.modalStack]})}function xZ(e){"Escape"===e.key&&function(){let[e]=xL.getState().modalStack;e&&xG(e)}()}function xY(e){xL.subscribe(xK),xL.setState({...xL.getState(),modalContainer:e})}function xq(e,t={},r=()=>{}){let n=()=>{let e=xL.getState().modalStack.find(e=>e.onClose===r);e&&xG(e)};if(uY(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=xL.getState()).modalStack],xL.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var xJ=Object.prototype.hasOwnProperty;let xX=function(e){if(null==e)return!0;if(tr(e)&&(te(e)||"string"==typeof e||"function"==typeof e.splice||ti(e)||th(e)||e7(e)))return!e.length;var t=rm(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e4(e))return!t3(e).length;for(var r in e)if(xJ.call(e,r))return!1;return!0},xQ=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,pc.jsx)(py.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},x0=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pc.jsx)(pc.Fragment,{children:t.map(e=>(0,pc.jsx)(xQ,{notification:e},e.id))})},x1=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cl.useState)(t);return(0,pc.jsx)(py.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iW("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iW("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},x2=({subject:e})=>{let[t,r]=(0,cl.useState)([]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pc.jsx)(pc.Fragment,{children:t.map(e=>(0,pc.jsx)(x1,{notification:e},e.id))})};class x4{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let x3=new x4,x6=0,x5=new x4,x9=0;function x8(e){e&&(0,cC.createRoot)(e).render((0,pc.jsx)(x0,{subject:x3}))}function x7(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!xX(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{x3.next({...e,id:x6++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function De(e){e&&(0,cC.createRoot)(e).render((0,pc.jsx)(x2,{subject:x5}))}function Dt(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!xX(t))?setTimeout(()=>{x5.next({...e,id:x9++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Dr=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Dn=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Do={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},Da=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cl.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i2}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i2}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dp()(r,i5),i=n?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,p=(0,cl.useMemo)(()=>{if(n)return n?"--"===n?"normal":Dr.includes(n)?n.toLowerCase():Dn.includes(n)?n:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[n,d,e,c])??"normal",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,m="normal"!==p,h=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:iW("notAvailable","Not available"),w=pp()({[Do["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[Do["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[Do.low]:"low"===p,[Do.high]:"high"===p,[Do["off-scale-low"]]:"off_scale_low"===p,[Do["off-scale-high"]]:"off_scale_high"===p}),E=pp()({[Do.container]:!0,[Do.card]:!0,[Do["critical-value"]]:f,[Do["abnormal-value"]]:m&&!f}),x=pp()({[Do.cell]:!0,[w]:!0});return"cell"===i?(0,pc.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,pc.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,pc.jsxs)("div",{className:Do["label-container"],children:[(0,pc.jsx)("span",{id:h,className:Do.label,children:r}),m&&(0,pc.jsx)("span",{className:Do[p.replace("_","-")],title:iW("abnormalValue","Abnormal value")})]}),(0,pc.jsxs)("div",{className:Do["value-container"],children:[(0,pc.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Do.value,children:b}),v&&t&&(0,pc.jsx)("span",{id:y,className:Do.units,children:t})]})]})},Di="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",Ds=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,pc.jsx)("div",{className:pp()(Di,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,pc.jsx)("div",{className:pp()(Di,n),...o,children:(0,pc.jsx)(Dl,{title:t,illustration:r})})}},Dl=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cl.useState)(null);return(0,cl.useEffect)(()=>{nK("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,pc.jsxs)("div",{className:pp()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,pc.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,pc.jsx)("p",{children:iW(n.implementationName)}),(0,pc.jsx)("p",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},Du=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dz(t,e,n,a),u="tablet"===d$(),c=iW("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,pc.jsx)(pc.Fragment,{children:e>0&&(0,pc.jsxs)("div",{className:pp()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,pc.jsxs)("div",{children:[c,o&&(0,pc.jsx)(cd,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iW("seeAll","See all")})]}),(0,pc.jsx)(py.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iW("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dc(e){return Dp(Dm(e,"usual","official"))}function Dd(e){return Dc(e)}function Dp(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Df(e){return Dp(e)}function Dm(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function Dh(e,t=dX()){let r=dX(t),n=EQ(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function Dg(e,t=dX()){let r=Dh(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),EX(r,n)}let Dy={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function Dv({showIdentifierLabel:e,type:t,value:r}){return(0,pc.jsx)("span",{className:Dy.primaryIdentifier,children:(0,pc.jsxs)(py.Tag,{className:Dy.tag,type:"gray",children:[e&&t?.text&&(0,pc.jsxs)("span",{className:Dy.label,children:[t.text,": "]}),(0,pc.jsx)("span",{className:Dy.value,children:r})]})})}function Db({showIdentifierLabel:e,type:t,value:r}){return(0,pc.jsxs)(py.FormLabel,{className:Dy.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,pc.jsxs)("span",{className:Dy.label,children:[t?.text,": "]}),(0,pc.jsx)("span",{className:Dy.value,children:r})]})}function Dw({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=dl(),{primaryIdentifierCode:n}=dZ(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,pc.jsx)(pc.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,pc.jsxs)(cu().Fragment,{children:[(0,pc.jsx)("span",{className:Dy.identifier,children:r?.coding?.[0]?.code===n?(0,pc.jsx)(Dv,{showIdentifierLabel:t,type:r,value:e}):(0,pc.jsx)(Db,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,pc.jsx)("span",{className:Dy.separator,children:"\xb7"})]},e)):""})}let DE={Female:fu,Male:fc,Other:fd,Unknown:fp},Dx=({gender:e})=>{let t=DE[e];return t?(0,pc.jsx)(t,{fill:"#525252"}):null},DD={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function D_({patient:e,renderedFrom:t}){var r;let n,o,a=Dc(e),i=e?.gender&&(o=DD[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iW(n,r),iconKey:o}),s=(0,cl.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,pc.jsxs)("div",{className:Dy.patientInfo,children:[(0,pc.jsx)("div",{className:pp()(Dy.row,Dy.patientNameRow),children:(0,pc.jsxs)("div",{className:Dy.flexRow,children:[(0,pc.jsx)("span",{className:Dy.patientName,children:a}),i&&(0,pc.jsxs)("div",{className:Dy.gender,children:[(0,pc.jsx)(Dx,{gender:i.iconKey}),(0,pc.jsx)("span",{children:i.displayText})]}),(0,pc.jsx)(ck,{className:Dy.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,pc.jsxs)("div",{className:Dy.demographics,children:[e.birthDate&&(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)("span",{children:Dg(e.birthDate)}),(0,pc.jsx)("span",{className:Dy.separator,children:"\xb7"}),(0,pc.jsx)("span",{children:EK(e.birthDate,{time:!1})}),(0,pc.jsx)("span",{className:Dy.separator,children:"\xb7"})]}),(0,pc.jsx)(Dw,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,pc.jsx)(ck,{className:Dy.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DS=r(1673);function Dk({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cl.useState)(!1),{extensions:i}=c_(r),s="tablet"===d$(),l=dV(()=>a(!1),o),u=(0,cl.useRef)(null),c=(0,cl.useRef)(null),d=(0,cl.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,m=(0,cl.useCallback)(()=>a(e=>!e),[]),h=(0,cl.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cl.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cl.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cl.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,pc.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,pc.jsxs)("div",{"data-overflow-menu":!0,className:pp()("cds--overflow-menu",pw),ref:l,children:[(0,pc.jsxs)("button",{className:pp()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},pD),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:m,onKeyDown:g,ref:u,children:[(0,pc.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iW("actions","Actions")})," ",(0,pc.jsx)(DS.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,pc.jsxs)("div",{className:pp()("cds--overflow-menu-options","cds--overflow-menu--flip",pE,{[px]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,pc.jsx)("ul",{className:pp()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,pc.jsx)(ck,{name:r,state:y},r)}),(0,pc.jsx)("span",{})]})]})})}var DC=r(6767),DP=r.n(DC);function DO(e){let{patientPhotoConceptUuid:t}=dl({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i2}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cW()(e?r:null,i5),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let DR=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cV.useTranslation)();return(0,pc.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pc.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,pc.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},DT="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function DN({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DO(e),[a,i]=(0,cl.useState)(null),[s,l]=(0,cl.useState)(!1),u=(0,cl.useMemo)(()=>DP().generate(e),[e]);(0,cl.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cl.useMemo)(()=>r||(a?iW("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iW("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,pc.jsx)(py.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,pc.jsx)(DR,{"aria-label":iW("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,pc.jsx)("div",{"aria-label":c,children:(0,pc.jsx)("img",{className:DT,src:a,alt:c,title:t})}):(0,pc.jsx)("div",{"aria-label":c,children:(0,pc.jsx)("div",{className:DT,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,pc.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Dj=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],DA=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),D$=DA,DI=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),DM=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),DL=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),DF=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),DB=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),DV=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),DU=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),DW=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),DH=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Dz=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),DK=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),DG=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),DZ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),DY=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Dq=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),DJ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),DX=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),DQ=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),D0=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),D1=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),D2=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),D4=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),D3=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),D6=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),D5=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),D9=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),D8=(0,cl.memo)((0,cl.forwardRef)(function(e,t){return(0,pc.jsx)(_r,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),D7=DH,_e=DQ,_t=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cl.useRef)(document.getElementById(e));return(0,cl.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pc.jsx)(c9,{value:o.current,fallback:t,children:(0,pc.jsx)(_r,{ref:n,pictogram:e,pictogramProps:r})})})),_r=(0,cl.memo)((0,cl.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,pc.jsx)("svg",{ref:r,className:pp()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,pc.jsx)("use",{href:`#${e}`})})})),_n=({children:e})=>"tablet"===d$()?(0,pc.jsx)(py.Layer,{children:e}):(0,pc.jsx)(pc.Fragment,{children:e}),_o=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,m]=(0,cl.useState)(r),[h,g]=(0,cl.useState)(!0),[y,v]=(0,cl.useState)(!1),b=(0,cl.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cl.useCallback)(()=>{v(!0),b()},[b]);return(0,cl.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cl.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,pc.jsx)(py.ActionableNotification,{actionButtonLabel:f,"aria-label":iW("closeSnackbar","Close snackbar"),className:pp()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iW("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},_a=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pc.jsx)(pc.Fragment,{children:t.map(e=>(0,pc.jsx)(_o,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_i=new x4,_s=0;function _l(e){e&&(0,cC.createRoot)(e).render((0,pc.jsx)(_a,{subject:_i}))}function _u(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_i.next({...e,id:_s++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _c=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cl.useCallback)(()=>{s(),t()},[t,s]);return(0,pc.jsx)("div",{children:(0,pc.jsx)(py.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_d=({subject:e})=>{let[t,r]=(0,cl.useState)([]),n=(0,cl.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cl.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,pc.jsx)(pc.Fragment,{children:t.map(e=>(0,pc.jsx)(_c,{toast:e,closeToast:()=>n(e)},e.id))})},_p=new x4,_f=0;function _m(e){e&&(0,cC.createRoot)(e).render((0,pc.jsx)(_d,{subject:_p}))}function _h(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!xX(t))?setTimeout(()=>{_p.next({...e,id:_f++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function _g(e,t=!1){if(t)return!0;let r=_E[e];return!r||!r()}function _y(e,t){let r=_O.getState()?.workspaceGroup,n=r?.name;n&&e===n&&_j(()=>{let n=_L(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),_O.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function _v(e,t){let{name:r,additionalProps:n}=t;u1(r);let o=()=>{_k(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>_b(r,n),closeWorkspaceGroup:!1})};_g(e.name)?o():_$("closing-workspace-launching-new-workspace",o,e.title??e.name)}function _b(e,t){let r=u1(e),n=_O.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void _y(n.name,()=>{_b(e,t)});let o=_O.getState().workspaceGroup?.name,a={...r,title:_I(r,t),closeWorkspace:(t={})=>_k(e,t),closeWorkspaceWithSavedChanges:t=>_k(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(_E[r]=n)},setTitle:(t,r)=>{a.title=t,a.titleNode=r,_O.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?a:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function i(e,t){_O.setState(r=>{let n=[e,...t??r.openWorkspaces],o=_N(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&_L(o,t);let s=_O.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==a.type);if(0===s.length)i(a);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];i({...t,additionalProps:a.additionalProps,...t.title===_I(t,t.additionalProps)&&{title:_I(a,a.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,_O.getState().openWorkspaces.filter(e=>e.type!=a.type)),_v(u,{name:e,additionalProps:t})):i(a);else _v(s[0],{name:e,additionalProps:t})}function _w({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){_C(t),_b(r,n),iK({to:e})}let _E={};function _x(e,t){_E[e]=t}function _D(e){return _E[e]}function __(){let e=_O.getState();_O.setState({...e,prompt:null})}let _S={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function _k(e,t={}){t={..._S,...t};let r=()=>{let r=_O.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=_O.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&_y(o),_E[e]=()=>!1,_O.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:_N(n?.[0])})),t?.onWorkspaceClose?.()};return _g(e,t?.ignoreChanges)?(r(),!0):(_$("closing-workspace",r,u1(e).title??e),!1)}function _C(e){_O.getState().context!=e&&_O.setState({context:e,openWorkspaces:[],prompt:null})}let _P={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},_O=F("workspace",_P);function _R(){return _O}function _T(e){let t=_O.getState();_O.setState({...t,workspaceWindowState:e})}function _N(e){return e?.preferredWindowSize??"normal"}function _j(e=()=>{},t=()=>!0){let r=_O.getState().openWorkspaces.filter(t).every(({name:e})=>_g(e)),n=()=>{_M(),e?.()};r?n():_$("closing-all-workspaces",n)}function _A(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=cg(_O);return(0,cl.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function _$(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:iW("unsavedChangesTitleText","Unsaved changes"),body:iW("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:iW("discard","Discard")};break;case"closing-all-workspaces":{let e=_O.getState().openWorkspaces.filter(({name:e})=>!_g(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:iW("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:iW("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:iW("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:iW("unsavedChangesTitleText","Unsaved changes"),body:iW("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{_O.setState(e=>({...e,prompt:null})),t?.()},confirmText:iW("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}_O.setState(e=>({...e,prompt:n}))}function _I(e,t){return t?.workspaceTitle??e.title}function _M(){_O.setState(_P)}function _L(e,t={}){if(!e||"default"===e)return;let r=V(e,{});return t&&r.setState(e=>({...e,...t})),r}let _F="-esm-cohort-builder__action-menu-button-module__container___Uwne-",_B="-esm-cohort-builder__action-menu-button-module__elementContainer___vWkQO",_V="-esm-cohort-builder__action-menu-button-module__active___D7Idw";function _U({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,pc.jsxs)(pc.Fragment,{children:[e({size:16}),t?(0,pc.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,pc.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__countTag___XJRiM",children:r})]})}let _W=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:a})=>{let i=d$(),{workspaces:s,workspaceWindowState:l}=_A(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===i||"phone"===i?(0,pc.jsxs)(py.Button,{className:pp()(_F,{[_V]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,pc.jsx)("span",{className:_B,children:(0,pc.jsx)(_U,{formOpenInTheBackground:d,getIcon:e,tagContent:a})}),(0,pc.jsx)("span",{children:t})]}):(0,pc.jsx)(py.IconButton,{align:"left","aria-label":r,className:pp()(_F,{[_V]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,pc.jsx)("div",{className:_B,children:(0,pc.jsx)(_U,{formOpenInTheBackground:d,getIcon:e,tagContent:a})})})};var _H=r(4535),_z=r(771),_K=/[\\^$.*+?()[\]{}|]/g,_G=RegExp(_K.source);let _Z=function(e){return(e=r0(e))&&_G.test(e)?e.replace(_K,"\\$&"):e};function _Y({contextKey:e}){let{prompt:t}=_A();return(0,cl.useEffect)(()=>{RegExp(`/${_Z(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,cl.useEffect)(()=>(_C(e),()=>{_C(null)}),[e]),(0,cl.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${_Z(e)}(/|$)`),a=new URL(n),i=o.test(a.pathname),s=_O.getState().openWorkspaces.every(({name:e})=>_g(e));i||(s?_M():(r?.(),_j(()=>{iK({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,pc.jsxs)(py.ComposedModal,{open:!0,onClose:__,children:[(0,pc.jsx)(py.ModalHeader,{title:t.title}),(0,pc.jsx)(py.ModalBody,{children:(0,pc.jsx)("p",{className:"-esm-cohort-builder__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,pc.jsxs)(py.ModalFooter,{children:[(0,pc.jsx)(py.Button,{kind:"secondary",onClick:__,children:t.cancelText??iW("cancel")}),(0,pc.jsx)(py.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??iW("confirm")})]})]}):null}function _q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_q(Object(r),!0).forEach(function(t){_Q(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _X(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _Q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _0(e){return(_0=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _1(e,t){return(_1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _2(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _4=function(e){var t=cl.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&_1(i,t);var r,n,o,a=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=_0(i);e=r?Reflect.construct(t,arguments,_0(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return _2(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),_Q(_2(t=a.call(this,e)),"handleRef",function(e){t.el=e}),_Q(_2(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),_Q(_2(t),"getParcelProps",function(){var e=_J(_J({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,_J({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cj&&cj.Consumer?cl.createElement(cj.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cl.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],_X(i.prototype,n),o&&_X(i,o),i}();_Q(_4,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function _3({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,cl.useState)(),o=function(e){let[t,r]=(0,cl.useState)({}),[n,o]=(0,cl.useState)(e);return(0,cl.useEffect)(()=>{n!==e&&o(e)},[e]),(0,cl.useEffect)(()=>{let e,t=_L(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,cl.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let a=(0,cl.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,pc.jsx)(_4,{config:r,mountParcel:ci,...a},e.name):(0,pc.jsx)(py.InlineLoading,{className:"-esm-cohort-builder__workspace-module__loader___v7QFg",description:`${iW("loading","Loading")} ...`})}function _6({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,cl.useState)(!1),a=(0,cl.useRef)(window.innerHeight),{featureName:i}=(0,cl.useContext)(cc),s=d$();(0,cl.useEffect)(()=>{let e=()=>{o(!dI(s)&&a.current>window.innerHeight),a.current!=window.innerHeight&&(a.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a]);let l=`action-menu-${t&&"default"!=t?t:i}-items-slot`;return(0,pc.jsx)("aside",{className:pp()("-esm-cohort-builder__action-menu-module__sideRail___Aa96v",{"-esm-cohort-builder__action-menu-module__withinWorkspace___2bJET":e,"-esm-cohort-builder__action-menu-module__sideRailHidden___Yb0w9":n,"-esm-cohort-builder__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,pc.jsx)("div",{className:"-esm-cohort-builder__action-menu-module__container___mzfAh",children:(0,pc.jsx)(ck,{className:"-esm-cohort-builder__action-menu-module__chartExtensions___DiJtm",name:l,state:r})})})}function _5({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let a=d$(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=_A(),u=l?.name,c=i[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,cl.useMemo)(()=>r||u&&!d,[u,d,r]);return da(!d&&!dI(a)),(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsxs)("div",{className:r?"-esm-cohort-builder__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-cohort-builder__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,pc.jsx)("aside",{className:pp()(t?"-esm-cohort-builder__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-cohort-builder__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-cohort-builder__workspace-module__hiddenRelative___qqT-4":d,"-esm-cohort-builder__workspace-module__narrowWorkspace___MMI1u":"narrow"===p,"-esm-cohort-builder__workspace-module__widerWorkspace___be-UT":"wider"===p,"-esm-cohort-builder__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===p}),children:(0,pc.jsx)("div",{className:pp()("-esm-cohort-builder__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-cohort-builder__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-cohort-builder__workspace-module__hiddenFixed___48wS9":d}),children:i.map((e,t)=>(0,pc.jsx)("div",{className:pp()("-esm-cohort-builder__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-cohort-builder__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,pc.jsx)(cl.Suspense,{fallback:null,children:(0,pc.jsx)(cV.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,pc.jsx)(_9,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,pc.jsx)(_Y,{contextKey:e})]}),f&&(0,pc.jsx)(_6,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function _9({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,cV.useTranslation)(),n=d$(),{workspaceWindowState:o,workspaceGroup:a}=_A(),i=a?.name,s="maximized"===o;(0,cl.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,cl.useContext)(cc),u=(0,cl.useCallback)(()=>{_T(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,cl.useMemo)(()=>e??{},[e]),m=(0,cl.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsxs)(py.Header,{"aria-label":iW("workspaceHeader","Workspace Header"),className:"-esm-cohort-builder__workspace-module__header___nACZO",children:[!dI(n)&&!c&&(0,pc.jsx)(py.HeaderMenuButton,{"aria-label":iW("close","Close"),renderMenuIcon:(0,pc.jsx)(pH,{}),onClick:()=>f()}),(0,pc.jsx)(py.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,pc.jsx)("div",{className:"-esm-cohort-builder__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,pc.jsxs)(py.HeaderGlobalBar,{className:"-esm-cohort-builder__workspace-module__headerButtons___heP0Q",children:[(0,pc.jsx)(ck,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,pc.jsx)(ck,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,pc.jsx)(ck,{name:`workspace-header-${l}-slot`,state:m}),dI(n)&&(0,pc.jsxs)(pc.Fragment,{children:[(d||s)&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":s?iW("minimize","Minimize"):iW("maximize","Maximize"),onClick:u,children:s?(0,pc.jsx)(_H.Xj,{}):(0,pc.jsx)(_H.hz,{})}),c&&!i?(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("hide","Hide"),onClick:()=>_T("hidden"),children:(0,pc.jsx)(pz,{})}):(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("close","Close"),onClick:()=>f?.(),children:(0,pc.jsx)(p7,{})})]}),"tablet"===n&&c&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("close","Close"),onClick:()=>f?.(),children:(0,pc.jsx)(_z.d3,{})})]})]}),(0,pc.jsx)("div",{className:pp()("-esm-cohort-builder__workspace-module__workspaceContent___oYdxI",{"-esm-cohort-builder__workspace-module__marginWorkspaceContent___7hwHu":!!p}),children:(0,pc.jsx)(_3,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let _8="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_7=new Uint8Array(16),Se=[];for(let e=0;e<256;++e)Se.push((e+256).toString(16).slice(1));let St=function(e,t,r){if(_8&&!t&&!e)return _8();let n=(e=e||{}).random??e.rng?.()??function(){if(!c){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(_7)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(Se[e[t+0]]+Se[e[t+1]]+Se[e[t+2]]+Se[e[t+3]]+"-"+Se[e[t+4]]+Se[e[t+5]]+"-"+Se[e[t+6]]+Se[e[t+7]]+"-"+Se[e[t+8]]+Se[e[t+9]]+"-"+Se[e[t+10]]+Se[e[t+11]]+Se[e[t+12]]+Se[e[t+13]]+Se[e[t+14]]+Se[e[t+15]]).toLowerCase()}(n)};async function Sr(e,t){let{openedGroup:r}=u4.getState();if(r){if(r.groupName===e&&Sa(r.props,t))return!0;else if(!await Si({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u4.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Sn(e){let{openedGroup:t,openedWindows:r}=u4.getState();if(t){if(r.length>0&&!(e||await Si({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u4.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function So(e,t=null,r=null,n=null){let o=u4.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u3(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=u6(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=u5(e);if(i&&(i.groupName!==l.name||!Sa(i.props,n)))return!!await Si({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sd(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Sa(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Sa(d.props,t)?((i||u!==o.openedWindows.length-1)&&u4.setState(Ss.restoreWindow(o,s)),!0):!!await Si({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sd(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Si({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sd(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sd(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Si({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u4.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sd(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Sa(e,t){return null==e||null==t||O(e,t)}function Si(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=u4.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=xq("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Ss={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=u5(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),a=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;a.splice(r,1),t&&a.length>0&&(i=!1)}else a[r]=n;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.registeredWorkspacesByName[t];if(!a)throw Error(`No workspace named "${t}" registered`);if(a.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let i=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==i)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==i?{...e,openedWorkspaces:[...u,Sd(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=u5(t);if(n<0)return e;let o={...e.openedWindows[n]},a=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(a<0)return e;o.openedWorkspaces[a]={...o.openedWorkspaces[a],hasUnsavedChanges:r};let i=[...e.openedWindows];return i[n]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function Sl(){return cy(u4,Ss)}let Su=()=>(0,cl.useContext)(cj),Sc=()=>Object.keys(u4.getState().registeredWorkspacesByName);function Sd(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:St()}}let Sp={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sf=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=d$(),{setWindowMaximized:o,hideWindow:a,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:m}=Sl(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=Su(),b=u5(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,cl.useEffect)(()=>{E?.hasUnsavedChanges!=r&&i(h,r??!1)},[E?.hasUnsavedChanges,r,h,i]),(0,cl.useEffect)(()=>{p[h]!==e&&f(h,e)},[p,h,e,f]),b<0||null==l||null==E)return null;let x=u[l.groupName];if(!x)throw Error(`Cannot find registered workspace group ${l.groupName}`);let D=d[h].window,_=c[D];if(!_)throw Error(`Cannot find registered workspace window ${D}`);let{icon:S,canMaximize:k}=_,C="closable"===x.persistence,P=!!S&&!C,{maximized:O}=w,R=_?.width??"narrow",T=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=b<s.length-1||m;return(0,pc.jsxs)("div",{className:pp()(Sp.workspaceOuterContainer,{[Sp.narrowWorkspace]:"narrow"===R,[Sp.widerWorkspace]:"wider"===R,[Sp.extraWideWorkspace]:"extra-wide"===R,[Sp.isActionMenuOpened]:T}),children:[(0,pc.jsx)("div",{className:pp()(Sp.workspaceSpacer,{[Sp.hidden]:N})}),(0,pc.jsx)("div",{className:pp()(Sp.workspaceMiddleContainer,{[Sp.maximized]:O,[Sp.hidden]:N,[Sp.isRootWorkspace]:g,[Sp.showActionMenu]:v}),children:(0,pc.jsxs)("div",{className:pp()(Sp.workspaceInnerContainer,{[Sp.maximized]:O,[Sp.hidden]:N,[Sp.isRootWorkspace]:g}),children:[(0,pc.jsxs)(py.Header,{"aria-label":iW("workspaceHeader"),className:Sp.header,children:[(0,pc.jsx)(py.HeaderName,{prefix:"",children:e}),(0,pc.jsx)("div",{className:Sp.overlayHeaderSpacer}),(0,pc.jsx)(py.HeaderGlobalBar,{className:Sp.headerButtons,children:dI(n)?(0,pc.jsxs)(pc.Fragment,{children:[(k||O)&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":O?iW("minimize"):iW("maximize"),onClick:()=>o(D,!O),children:O?(0,pc.jsx)(_H.Xj,{}):(0,pc.jsx)(_H.hz,{})}),P&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("hide"),onClick:()=>a(),children:(0,pc.jsx)(pz,{})}),!C&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("close"),onClick:()=>y({closeWindow:!0}),children:(0,pc.jsx)(p7,{})})]}):(0,pc.jsxs)(pc.Fragment,{children:[P&&(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("hide"),onClick:()=>a(),children:(0,pc.jsx)(_z.d3,{})}),(0,pc.jsx)(py.HeaderGlobalAction,{"aria-label":iW("close"),onClick:()=>{C?Sn():y({closeWindow:!0})},children:(0,pc.jsx)(p7,{})})]})})]}),(0,pc.jsx)("div",{className:pp()(Sp.workspaceContent),children:t})]})})]})},Sm="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",Sh="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",Sg="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",Sy="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function Sv({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,pc.jsxs)(pc.Fragment,{children:[e({size:16}),t?(0,pc.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,pc.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let Sb=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=d$(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Sl(),{extension:c}=(0,cl.useContext)(cc),d=i.findIndex(e=>e.windowName===c?.extensionId),p=i[d],f=null!=p,m=f&&(d<i.length-1||u),h=f&&!m,g=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)m?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;So(e,t,r)}};return"tablet"===a||"phone"===a?(0,pc.jsxs)(py.Button,{className:pp()(Sm,{[Sg]:f&&!h,[Sy]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,pc.jsx)("span",{className:Sh,children:(0,pc.jsx)(Sv,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,pc.jsx)("span",{children:t})]}):(0,pc.jsx)(py.IconButton,{align:"left","aria-label":t,className:pp()(Sm,{[Sg]:f&&!h,[Sy]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,pc.jsx)("div",{className:Sh,children:(0,pc.jsx)(Sv,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function Sw({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,pc.jsx)(py.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?p8:p6,children:e?iW("showLess","Show less"):iW("showMore","Show more")})}let SE={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},Sx=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i2}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cW()(t,i5),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cl.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsxs)("p",{className:SE.heading,children:[iW("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,pc.jsx)(py.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,pc.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EB(e?.startDate).getTime()-EB(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,pc.jsx)("li",{children:(0,pc.jsx)(cd,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,pc.jsx)("li",{children:"--"})})(),t.length>3&&(0,pc.jsx)("li",{className:SE.link,children:(0,pc.jsx)(cd,{to:`${window.spaBase}/home/patient-lists`,children:iW("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},SD=({patientId:e})=>{let{patient:t,isLoading:r}=dG(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,pc.jsx)(py.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)("p",{className:SE.heading,children:iW("address","Address")}),(0,pc.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,pc.jsxs)("li",{children:[iW(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,pc.jsxs)("li",{children:[iW(e,e),": ",t]},`address-${e}`)):(0,pc.jsx)("li",{children:"--"})})]})},S_=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=dl({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dp()(`${i2}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,i5);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cl.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cl.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iW(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)("p",{className:SE.heading,children:iW("contactDetails","Contact Details")}),t?(0,pc.jsx)(py.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,pc.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,pc.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,pc.jsx)("li",{children:"--"})})]})},SS=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i2}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cW()(e?t:null,i5),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)("p",{className:SE.heading,children:iW("relationships","Relationships")}),r?(0,pc.jsx)(py.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,pc.jsx)("ul",{children:t&&t.length>0?(0,pc.jsx)(pc.Fragment,{children:t.map(e=>(0,pc.jsxs)("li",{className:SE.relationship,children:[(0,pc.jsx)("div",{children:(0,pc.jsx)(cd,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,pc.jsx)("div",{children:e.relationshipType}),(0,pc.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iW("yearAbbreviation","yr"):iW("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,pc.jsx)("li",{children:"--"})})]})};function Sk({patientId:e,deceased:t}){return(0,pc.jsxs)("div",{className:pp()(SE.contactDetails,{[SE.deceased]:t}),children:[(0,pc.jsxs)("div",{className:SE.row,children:[(0,pc.jsx)("div",{className:SE.col,children:(0,pc.jsx)(SD,{patientId:e})}),(0,pc.jsx)("div",{className:SE.col,children:(0,pc.jsx)(S_,{patientUuid:e})})]}),(0,pc.jsxs)("div",{className:SE.row,children:[(0,pc.jsx)("div",{className:SE.col,children:(0,pc.jsx)(SS,{patientId:e})}),(0,pc.jsx)("div",{className:SE.col,children:(0,pc.jsx)(Sx,{patientUuid:e})})]})]})}function SC(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let SP="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SO({workspaceGroup:e,groupProps:t}){let r=d$(),{persistence:n}=e;return(0,pc.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,pc.jsxs)("div",{className:SP,children:["closable"==n&&dI(r)&&(0,pc.jsx)(py.IconButton,{align:"left",onClick:()=>Sn(),label:iW("close"),kind:"ghost",children:(0,pc.jsx)(p7,{})}),(0,pc.jsx)(cc.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,pc.jsx)(ck,{className:SP,name:e.name,state:{groupProps:t}})})]})})}function SR(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let ST=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:a})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Sl(),u=(0,cl.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Si({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Si({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:a}=r,i=a.findIndex(e=>e.workspaceName===o);-1===i||i!==a.length-1&&a.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Si({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:a[i+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:i&&i.props?i.props:null,workspaceMeta:u4.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:a},[t,s,i,r]);if(!e){let{registeredWorkspacesByName:e}=u4.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=u4.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,pc.jsxs)("div",{className:pp()(Sp.workspaceOuterContainer,{[Sp.narrowWorkspace]:"narrow"===u,[Sp.widerWorkspace]:"wider"===u,[Sp.extraWideWorkspace]:"extra-wide"===u,[Sp.isActionMenuOpened]:c}),children:[(0,pc.jsx)("div",{className:Sp.workspaceSpacer}),(0,pc.jsx)("div",{className:pp()(Sp.workspaceMiddleContainer,{[Sp.isRootWorkspace]:n,[Sp.showActionMenu]:a}),children:(0,pc.jsx)("div",{className:pp()(Sp.workspaceInnerContainer,{[Sp.isRootWorkspace]:n}),children:(0,pc.jsx)(py.InlineLoading,{className:Sp.loader,description:`${iW("loading")} ...`})})})]})}return(0,pc.jsx)(_4,{config:e,mountParcel:ci,...u},t.workspaceName)},SN=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,cl.useState)({}),{registeredWorkspacesByName:a}=u4.getState();return(0,cl.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=a[e.workspaceName];return[e.uuid,await d7(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,pc.jsx)(pc.Fragment,{children:r.map((o,a)=>(0,pc.jsx)(ST,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===a,isLeafWorkspace:a===r.length-1,showActionMenu:t},o.uuid))})};function Sj(e){e&&(0,cC.createRoot)(e).render((0,pc.jsx)(SA,{}))}function SA(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Sl();if((0,cl.useEffect)(()=>ls("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(Sn().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SR(t),a=SR(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,a,i)&&o(Sn().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,pc.jsxs)("div",{className:pp()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,pc.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,pc.jsx)(SN,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,pc.jsx)(SO,{workspaceGroup:o,groupProps:e.props})]})}function S$(e,t,r){if(null==e)return r;let n=Et(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Et(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SI(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SM(e){return!!e&&e.constructor===Object}var SL=r(7638);function SF(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function SB(e,t){return SL(function(e){let t=e.indexOf("-");if(t>=0){let r=SF(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SF(e)}(t),e,{includePrerelease:!0})}async function SV(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await SU(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SU(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function SW(e,t,r,n){}function SH(e){}function Sz(e){return Promise.resolve([])}function SK(e){return Promise.resolve([])}function SG(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function SZ(e){return()=>{}}function SY(){return!0}}}]);
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)})}})(e,t))}function pc(){pl.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pl){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",a=document.getElementById(o),i=`single-spa-application:${n}`;if(a){let e=document.createElement("div");e.id=i,a?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
+ To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?aP(e,()=>po(t.appName,t.component),function(e,{featureFlag:t}){return t?r=>!!ue(t)&&e(r):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?aA(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),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)}(n,t)}}let pd={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 pp(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<pd.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>pd.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>pd.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<pd.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<pd.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<pd.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>pd.SMALL_DESKTOP_MAX)}let pf=!1;function pm(){pf||(window.addEventListener("resize",pp),pp(),pf=!0)}var ph=r(4848),pg=r(6942),py=r.n(pg);function pv({title:e,children:t}){let r="tablet"===dB();return(0,ph.jsxs)("div",{className:py()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,ph.jsx)("h4",{children:e}),t]})}let pb=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],pw={primaryColor:{_type:nn.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[ou.oneOf(pb)]},secondaryColor:{_type:nn.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[ou.oneOf(pb)]}},pE={"Brand color #1":{_default:"#005d5d",_type:nn.String},"Brand color #2":{_default:"#004144",_type:nn.String},"Brand color #3":{_default:"#007d79",_type:nn.String},excludePatientIdentifierCodeTypes:{uuids:{_type:nn.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:nn.UUID}}},implementationName:{_type:nn.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:nn.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:nn.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:[ou.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:nn.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:nn.String}},diagnosisTags:pw};var px=r(9536);let pD={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},p_=e=>(0,ph.jsx)(px.TableBatchActions,{translateWithId:(e,t)=>{let r=pD[e];return r?iW(r,e,t):e},...e}),pS="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",pk="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",pC="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",pP="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",pO=(0,cf.createContext)(null);function pR(){let e=(0,cf.useContext)(pO);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function pT({menuTitle:e,children:t}){let[r,n]=cm().useState(!1),o=dK(()=>n(!1),r),a="tablet"===dB(),i=(0,cf.useCallback)(()=>n(e=>!e),[]),s=(0,cf.useRef)(null),l=(0,cf.useRef)(null),u=(0,cf.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,cf.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,cf.useMemo)(()=>({closeMenu:p}),[p]),m=(0,cf.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),h=cf.Children.toArray(t);(0,cf.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cf.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let a=o+t,i=a<0?r.length-1:a>=r.length?0:a;r[i]?.focus()},[]),y=h.map((e,t)=>(0,cf.isValidElement)(e)?(0,cf.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:g,index:t}):e);return(0,ph.jsxs)("div",{"data-overflow-menu":!0,className:py()("cds--overflow-menu",pS),ref:o,children:[(0,ph.jsx)("button",{className:py()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},pP),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,ph.jsxs)("div",{className:py()("cds--overflow-menu-options","cds--overflow-menu--flip",pk,{[pC]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,ph.jsx)("ul",{className:py()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,ph.jsx)(pO.Provider,{value:f,children:y})}),(0,ph.jsx)("span",{})]})]})}function pN(e){let t=(0,cf.useContext)(pO);return(0,ph.jsx)(px.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var pj=r(8168);(et=en||(en={})).Pop="POP",et.Push="PUSH",et.Replace="REPLACE";var pA=function(e){return e},p$="beforeunload";function pI(e){e.preventDefault(),e.returnValue=""}function pM(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}function pL(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}let pF=(0,cf.createContext)(null),pB=(0,cf.createContext)(null);function pV(e,t){if(!e)throw Error(t)}function pU(){return null!=(0,cf.useContext)(pB)}function pW(e){let{basename:t="/",children:r=null,location:n,navigationType:o=en.Pop,navigator:a,static:i=!1}=e;pU()&&pV(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cf.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=pL(n));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default"}=n,m=(0,cf.useMemo)(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=e.charAt(t.length);return r&&"/"!==r?null:e.slice(t.length)||"/"}(u,s);return null==e?null:{pathname:e,search:c,hash:d,state:p,key:f}},[s,u,c,d,p,f]);return null==m?null:(0,cf.createElement)(pF.Provider,{value:l},(0,cf.createElement)(pB.Provider,{children:r,value:{location:m,navigationType:o}}))}function pH(e){let{basename:t,children:r,window:n}=e,o=(0,cf.useRef)();null==o.current&&(o.current=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,n=r.history;function o(){var e=r.location,t=e.pathname,o=e.search,a=e.hash,i=n.state||{};return[i.idx,pA({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var a=null;r.addEventListener("popstate",function(){if(a)d.call(a),a=null;else{var e=en.Pop,t=o(),r=t[0],n=t[1];if(d.length){if(null!=r){var i=l-r;i&&(a={action:e,location:n,retry:function(){y(-1*i)}},y(i))}}else g(e)}});var i=en.Pop,s=o(),l=s[0],u=s[1],c=pM(),d=pM();function p(e){var t,r,n,o,a,i,s;return"string"==typeof e?e:(n=void 0===(r=(t=e).pathname)?"/":r,a=void 0===(o=t.search)?"":o,s=void 0===(i=t.hash)?"":i,a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n)}function f(e,t){return void 0===t&&(t=null),pA((0,pj.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?pL(e):e,{state:t,key:Math.random().toString(36).substr(2,8)}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},p(e)]}function h(e,t,r){return!d.length||(d.call({action:e,location:t,retry:r}),!1)}function g(e){i=e;var t=o();l=t[0],u=t[1],c.call({action:i,location:u})}function y(e){n.go(e)}return null==l&&(l=0,n.replaceState((0,pj.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:p,push:function e(t,o){var a=en.Push,i=f(t,o);if(h(a,i,function(){e(t,o)})){var s=m(i,l+1),u=s[0],c=s[1];try{n.pushState(u,"",c)}catch(e){r.location.assign(c)}g(a)}},replace:function e(t,r){var o=en.Replace,a=f(t,r);if(h(o,a,function(){e(t,r)})){var i=m(a,l),s=i[0],u=i[1];n.replaceState(s,"",u),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&r.addEventListener(p$,pI),function(){t(),d.length||r.removeEventListener(p$,pI)}}}}({window:n}));let a=o.current,[i,s]=(0,cf.useState)({action:a.action,location:a.location});return(0,cf.useLayoutEffect)(()=>a.listen(s),[a]),(0,cf.createElement)(pW,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let pz=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],pK=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),pG=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-add",iconProps:e})})),pZ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),pY=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),pq=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),pJ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),pX=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),pQ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),p0=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),p1=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),p2=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),p4=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),p3=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),p6=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),p5=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),p9=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),p8=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),p7=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),fe=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),ft=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),fr=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),fn=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),fo=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-close",iconProps:e})})),fa=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),fi=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),fs=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-document",iconProps:e})})),fl=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),fu=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-download",iconProps:e})})),fc=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),fd=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),fp=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),ff=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-events",iconProps:e})})),fm=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),fh=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),fg=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),fy=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),fv=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),fb=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-group",iconProps:e})})),fw=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),fE=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),fx=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),fD=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-information",iconProps:e})})),f_=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),fS=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),fk=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),fC=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),fP=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),fO=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-location",iconProps:e})})),fR=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),fT=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),fN=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),fj=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),fA=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),f$=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),fI=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-money",iconProps:e})})),fM=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),fL=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),fF=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),fB=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),fV=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-password",iconProps:e})})),fU=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),fW=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),fH=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),fz=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),fK=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),fG=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),fZ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),fY=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-report",iconProps:e})})),fq=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),fJ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-save",iconProps:e})})),fX=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-search",iconProps:e})})),fQ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),f0=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),f1=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),f2=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),f4=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),f3=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),f6=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),f5=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-table",iconProps:e})})),f9=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-time",iconProps:e})})),f8=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),f7=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),me=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),mt=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mr=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),mn=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),mo=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),ma=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mi=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-user",iconProps:e})})),ms=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),ml=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mu=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(mg,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mc=mu,md=fl,mp=fP,mf=fx,mm=f2,mh=(0,cf.memo)((0,cf.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cf.useRef)(e?document.getElementById(e):void 0);return(0,cf.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,ph.jsx)(dr,{value:o.current,fallback:t,children:(0,ph.jsx)(mg,{ref:n,icon:e,iconProps:r})})})),mg=(0,cf.memo)((0,cf.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},t);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,cf.useRef)(null);return(0,cf.useImperativeHandle)(r,()=>i.current),(0,cf.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,ph.jsx)("svg",{ref:i,className:py()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,ph.jsx)("use",{href:`#${e}`})})})),my=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cK.useTranslation)(),a=(pU()||pV(!1),(0,cf.useContext)(pB).location),i=(0,cf.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[a.pathname,e]);return(0,ph.jsx)("div",{children:(0,ph.jsx)(cg,{className:py()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,ph.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,ph.jsx)(mh,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,ph.jsx)("span",{children:o(t)})]})})},e)};function mv(e){return function({basePath:t}){return(0,ph.jsx)(pH,{children:(0,ph.jsx)(my,{basePath:t,...e})})}}function mb(e){let t=(0,cf.useRef)(null);return(0,cf.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mw(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let mE="u">typeof document?cm().useLayoutEffect:()=>{};function mx(e){let t=(0,cf.useRef)(null);return mE(()=>{t.current=e},[e]),(0,cf.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mD={prefix:String(Math.round(1e10*Math.random())),current:0},m_=cm().createContext(mD),mS=cm().createContext(!1),mk=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mC="function"==typeof cm().useId?function(e){let t=cm().useId(),[r]=(0,cf.useState)(mT()),n=r?"react-aria":`react-aria${mD.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cf.useContext)(m_),r=function(e=!1){let t=(0,cf.useContext)(m_),r=(0,cf.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cm().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mk.get(e);null==r?mk.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mk.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mP(){return!1}function mO(){return!0}function mR(e){return()=>{}}function mT(){return"function"==typeof cm().useSyncExternalStore?cm().useSyncExternalStore(mR,mP,mO):(0,cf.useContext)(mS)}let mN=!!("u">typeof window&&window.document&&window.document.createElement),mj=new Map;function mA(e){let[t,r]=(0,cf.useState)(e),n=(0,cf.useRef)(null),o=mC(t),a=(0,cf.useRef)(null);if(i&&i.register(a,o),mN){let e=mj.get(o);e&&!e.includes(n)?e.push(n):mj.set(o,[n])}return mE(()=>()=>{i&&i.unregister(a),mj.delete(o)},[o]),(0,cf.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function m$(e=[]){let t=mA(),[r,n]=function(e){let[t,r]=(0,cf.useState)(e),n=(0,cf.useRef)(null),o=mx(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});mE(()=>{n.current&&o()});let a=mx(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cf.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return mE(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(i=new FinalizationRegistry(e=>{mj.delete(e)}));let mI=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mM(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mw(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mI(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mj.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mj.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mL=Symbol("default");function mF({values:e,children:t}){for(let[r,n]of e)t=cm().createElement(r.Provider,{value:n},t);return t}function mB(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cf.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=u?u:a,"data-rac":""}},[t,r,n,o,a,i,s])}function mV(e,t){let r=(0,cf.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mL;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function mU(e,t,r){let{ref:n,...o}=mV(r,e.slot)||{},a=mb((0,cf.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(t,n),[t,n])),i=mM(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},a="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...a}}:i.style={...o.style,...e.style}),[i,a]}function mW(e=!0){let[t,r]=(0,cf.useState)(e),n=(0,cf.useRef)(!1),o=(0,cf.useCallback)(e=>{n.current=!0,r(!!e)},[]);return mE(()=>{n.current||r(!1)},[]),[o,t]}function mH(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mz=(0,cf.createContext)(null),mK=null;function mG(e,t="assertive",r=7e3){mK?mK.announce(e,t,r):(mK=new mZ,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mK.announce(e,t,r):setTimeout(()=>{(null==mK?void 0:mK.isAttached())&&(null==mK||mK.announce(e,t,r))},100))}class mZ{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mY=new Set(["id"]),mq=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mJ=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mX=/^(data-.*)$/;function mQ(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mY.has(t)||r&&mq.has(t)||n&&mJ.has(t)||(null==o?void 0:o.has(t))||mX.test(t))&&(a[t]=e[t]);return a}let m0=["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"])'],m1=m0.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";m0.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let m2=m0.join(':not([hidden]):not([tabindex="-1"]),');function m4(e){return e.matches(m1)}function m3(e){return e.matches(m2)}let m6=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},m5=e=>e&&"window"in e&&e.window===e?e:m6(e).defaultView||window;function m9(e){if(function(){if(null==m8){m8=!1;try{document.createElement("div").focus({get preventScroll(){return m8=!0,!0}})}catch{}}return m8}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let m8=null;function m7(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function he(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function ht(e){let t=(0,cf.useRef)({isFocused:!1,observer:null});mE(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mx(t=>{null==e||e(t)});return(0,cf.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(m7(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}let hr=!1;function hn(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function ho(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function ha(e){let t=null;return()=>(null==t&&(t=e()),t)}let hi=ha(function(){return ho(/^Mac/i)}),hs=ha(function(){return ho(/^iPhone/i)}),hl=ha(function(){return ho(/^iPad/i)||hi()&&navigator.maxTouchPoints>1}),hu=ha(function(){return hs()||hl()});ha(function(){return hi()||hu()});let hc=ha(function(){return hn(/AppleWebKit/i)&&!hd()}),hd=ha(function(){return hn(/Chrome/i)}),hp=ha(function(){return hn(/Android/i)}),hf=ha(function(){return hn(/Firefox/i)}),hm=new Map,hh=new Set;function hg(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hm.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hm.delete(r.target)),0===hm.size)){for(let e of hh)e();hh.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hm.get(r.target);n||(n=new Set,hm.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hy(e){requestAnimationFrame(()=>{0===hm.size?e():hh.add(e)})}"u">typeof document&&("loading"!==document.readyState?hg():document.addEventListener("DOMContentLoaded",hg));let hv="default",hb="",hw=new WeakMap;function hE(e){if(hu())"disabled"===hv&&(hv="restoring",setTimeout(()=>{hy(()=>{if("restoring"===hv){let t=m6(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hb||""),hb="",hv="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hw.has(e)){let t=hw.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hw.delete(e)}}let hx=cm().createContext({register:()=>{}});function hD(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function h_(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hS(e,t,r){var n=hD(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function hk(e,t){mE(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hC(){let e=(0,cf.useRef)(new Map),t=(0,cf.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),r=(0,cf.useCallback)((t,r,n,o)=>{var a;let i=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cf.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cf.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hx.displayName="PressResponderContext";function hP(e,t){return!!t&&!!e&&e.contains(t)}function hO(e){return e.target}function hR(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hf()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hi()?a=!0:i=!0);let u=hc()&&hi()&&!hl()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hR.isOpening=r,m9(e),e.dispatchEvent(u),hR.isOpening=!1}function hT(e){return 0===e.mozInputSource&&!!e.isTrusted||(hp()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hR.isOpening=!1;var hN=r(1779),hj=r.n(hN),hA=new WeakMap;class h${continuePropagation(){hS(this,hA,!1)}get shouldStopPropagation(){var e;return e=hD(this,hA,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;h_(this,hA,{writable:!0,value:void 0}),hS(this,hA,!0);let a=null!=(o=null==n?void 0:n.target)?o:r.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,u,c=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,c=r.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=l}}let hI=Symbol("linkClicked");function hM(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,cf.useContext)(hx);if(t){let{register:r,...n}=t;e=mM(n,e),r()}return hk(t,e.ref),e}(e),[m,h]=(0,cf.useState)(!1),g=(0,cf.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hC(),b=mx((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new h$("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mx((e,n,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let t=new h$("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new h$("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mx((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new h$("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mx(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hB(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hE(t.target),t.disposables))r();t.disposables=[]}}),D=mx(e=>{c&&x(e)}),_=mx(e=>{null==i||i(e)}),S=mx((e,t)=>{if(i){let r=new MouseEvent("click",e);he(r,t),i(m7(r))}}),k=(0,cf.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(hF(t.nativeEvent,t.currentTarget)&&hP(t.currentTarget,hO(t.nativeEvent))){var n;hV(hO(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=b(t,"keyboard");let n=t.currentTarget;y(m6(t.currentTarget),"keyup",mw(t=>{hF(t,n)&&!t.repeat&&hP(n,hO(t))&&e.target&&E(hB(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hi()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||hP(t.currentTarget,hO(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hR.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hT(t.nativeEvent))){let e=b(t,"virtual"),n=E(t,"virtual"),o=w(t,"virtual");_(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual";r=w(hB(t.currentTarget,t),n,!0),e.isOverTarget=!1,_(t),x(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,o;if(e.isPressed&&e.target&&hF(t,e.target)){hV(hO(t),t.key)&&t.preventDefault();let r=hO(t),o=hP(e.target,hO(t));w(hB(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hL(e.target)&&hP(e.target,r)&&!t[hI]&&(t[hI]=!0,hR(e.target,t,!1)),e.isPressed=!1,null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!hP(t.currentTarget,hO(t.nativeEvent)))return;if(o=t.nativeEvent,!hp()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(hu()){if("default"===hv){let t=m6(e);hb=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hv="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hw.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hO(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m6(t.currentTarget),"pointerup",r,!1),y(m6(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(hP(t.currentTarget,hO(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!m4(e);)e=e.parentElement;let t=m5(e),r=t.document.activeElement;if(!r||r===e)return;hr=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,m9(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,m9(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),hr=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{hP(t.currentTarget,hO(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hB(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hB(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(hP(e.target,hO(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(m9(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else x(t);e.isOverTarget=!1}},n=e=>{x(e)};t.onDragStart=e=>{hP(e.currentTarget,hO(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cf.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof m5(e).Element&&"auto"===m5(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,cf.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hE(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mM(f,k)}}function hL(e){return"A"===e.tagName&&e.hasAttribute("href")}function hF(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof m5(t).HTMLInputElement&&!hW(t,r)||t instanceof m5(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hL(t))&&"Enter"!==r)}function hB(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n}}function hV(e,t){return e instanceof HTMLInputElement?!hW(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hL(e))}let hU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hW(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hU.has(e.type)}let hH=null,hz=new Set,hK=new Map,hG=!1,hZ=!1,hY={Tab:!0,Escape:!0};function hq(e,t){for(let r of hz)r(e,t)}function hJ(e){hG=!0,e.metaKey||!hi()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hH="keyboard",hq("keyboard",e))}function hX(e){hH="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hG=!0,hq("pointer",e))}function hQ(e){hT(e)&&(hG=!0,hH="virtual")}function h0(e){e.target!==window&&e.target!==document&&!hr&&e.isTrusted&&(hG||hZ||(hH="virtual",hq("virtual",e)),hG=!1,hZ=!1)}function h1(){hr||(hG=!1,hZ=!0)}function h2(e){if("u"<typeof window||hK.get(m5(e)))return;let t=m5(e),r=m6(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hG=!0,n.apply(this,arguments)},r.addEventListener("keydown",hJ,!0),r.addEventListener("keyup",hJ,!0),r.addEventListener("click",hQ,!0),t.addEventListener("focus",h0,!0),t.addEventListener("blur",h1,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",hX,!0),r.addEventListener("pointermove",hX,!0),r.addEventListener("pointerup",hX,!0)),t.addEventListener("beforeunload",()=>{h4(e)},{once:!0}),hK.set(t,{focus:n})}let h4=(e,t)=>{let r=m5(e),n=m6(e);t&&n.removeEventListener("DOMContentLoaded",t),hK.has(r)&&(r.HTMLElement.prototype.focus=hK.get(r).focus,n.removeEventListener("keydown",hJ,!0),n.removeEventListener("keyup",hJ,!0),n.removeEventListener("click",hQ,!0),r.removeEventListener("focus",h0,!0),r.removeEventListener("blur",h1,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",hX,!0),n.removeEventListener("pointermove",hX,!0),n.removeEventListener("pointerup",hX,!0)),hK.delete(r))};function h3(){return"pointer"!==hH}"u">typeof document&&("loading"!==(d=m6(void 0)).readyState?h2(void 0):d.addEventListener("DOMContentLoaded",()=>{h2(void 0)}));let h6=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function h5(e){let t=m6(e),r=((e=document)=>e.activeElement)(t);"virtual"===hH?hy(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&m9(e)}):m9(e)}function h9(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cf.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=ht(a),s=(0,cf.useCallback)(e=>{let t=m6(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hO(e.nativeEvent)&&(r&&r(e),o&&o(!0),i(e))},[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?a:void 0}}}function h8(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}let h7=cm().createContext(null);function ge(e,t){let{focusProps:r}=h9(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:h8(e.onKeyDown),onKeyUp:h8(e.onKeyUp)}},o=mM(r,n),a=function(e){let t=(0,cf.useContext)(h7)||{};hk(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cf.useRef)(e.autoFocus);(0,cf.useEffect)(()=>{s.current&&t.current&&h5(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mM({...o,tabIndex:l},i)}}function gt(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cf.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hC(),l=(0,cf.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,a,s]),u=ht(l),c=(0,cf.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m6(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hO(e.nativeEvent)){n&&n(e),o&&o(!0),a.current.isFocusWithin=!0,u(e);let r=e.currentTarget;i(t,"focus",e=>{if(a.current.isFocusWithin&&!hP(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});he(n,r),l(m7(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function gr(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cf.useRef)({isFocused:!1,isFocusVisible:r||h3()}),[i,s]=(0,cf.useState)(!1),[l,u]=(0,cf.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cf.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cf.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},h2(),(0,cf.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m6(null==r?void 0:r.target),i="u">typeof window?m5(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?m5(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?m5(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?m5(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h6.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hY[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h3())};return hz.add(e),()=>{hz.delete(e)}},[]);let{focusProps:p}=h9({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=gt({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?f:p}}cm().forwardRef(function(e,t){let{children:r,...n}=e,o=mb(t),a={...n,ref:o};return cm().createElement(h7.Provider,{value:a},r)});let gn=!1,go=0;function ga(e){"touch"===e.pointerType&&(gn=!0,setTimeout(()=>{gn=!1},50))}function gi(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",ga),go++,()=>{!(--go>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",ga)}}function gs(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cf.useState)(!1),s=(0,cf.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cf.useEffect)(gi,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hC(),{hoverProps:c,triggerHoverEnd:d}=(0,cf.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=n=>{gn&&"mouse"===n.pointerType||((n,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!n.currentTarget.contains(n.target))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(m6(n.target),"pointerover",t=>{s.isHovered&&s.target&&!hP(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:a}),r&&r(!0),i(!0)})(n,n.pointerType)},a.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cf.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let gl=(0,cf.createContext)(!1);function gu(e){let t=(t,r)=>(0,cf.useContext)(gl)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cf.forwardRef)(t)}let gc=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gd=(0,cf.createContext)({}),gp=gu(function(e,t){var r;[e,t]=mU(e,t,gd);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:a,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:m,rel:h,type:g="button"}=e;r="button"===n?{type:g,disabled:o}:{role:"button",href:"a"!==n||o?void 0:f,target:"a"===n?m:void 0,type:"input"===n?g:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?h:void 0};let{pressProps:y,isPressed:v}=hM({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=ge(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mM(b,y,mQ(e,{labelable:!0}));return{isPressed:v,buttonProps:mM(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=gr(e),{hoverProps:c,isHovered:d}=gs({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(n.isPressed||i)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=mB({...e,values:p,defaultClassName:"react-aria-Button"}),m=mA(a.id),h=mA(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cf.useRef)(o);return(0,cf.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mG(e,"assertive"):y.current&&l&&!o&&mG(e,"assertive"),y.current=o},[o,l,g,m]),cm().createElement("button",{...mQ(e,{propNames:gc}),...mM(a,s,c),...f,type:"submit"===a.type&&o?"button":a.type,id:m,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cm().createElement(mz.Provider,{value:{id:h}},f.children))});(0,cf.createContext)(null),(0,cf.createContext)(null),(0,cf.createContext)(null),(0,cf.createContext)(null),(0,cf.createContext)(null);let gf=(0,cf.createContext)({}),gm=(0,cf.createContext)({}),gh=(0,cf.forwardRef)(function(e,t){[e,t]=mU(e,t,gm);let{elementType:r="span",...n}=e;return cm().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gy=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gv(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gg.has(t.script)}let t=e.split("-")[0];return gy.has(t)}let gb=Symbol.for("react-aria.i18n.locale");function gw(){let e="u">typeof window&&window[gb]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gv(e)?"rtl":"ltr"}}let gE=gw(),gx=new Set;function gD(){for(let e of(gE=gw(),gx))e(gE)}function g_(){let e=mT(),[t,r]=(0,cf.useState)(gE);return((0,cf.useEffect)(()=>(0===gx.size&&window.addEventListener("languagechange",gD),gx.add(r),()=>{gx.delete(r),0===gx.size&&window.removeEventListener("languagechange",gD)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gS=cm().createContext(null);function gk(e){let{locale:t,children:r}=e,n=g_(),o=cm().useMemo(()=>t?{locale:t,direction:gv(t)?"rtl":"ltr"}:n,[n,t]);return cm().createElement(gS.Provider,{value:o},r)}function gC(){let e=g_();return(0,cf.useContext)(gS)||e}var gP={};function gO(e,t){return e-t*Math.floor(e/t)}function gR(e,t,r,n){let o=(t=gN(e,t))-1,a=-2;return r<=2?a=0:gT(t)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+a+n)}function gT(e){return e%4==0&&(e%100!=0||e%400==0)}function gN(e,t){return"BC"===e?1-t:t}function gj(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gP={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let gA={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 g${fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gO(t,146097),o=Math.floor(n/36524),a=gO(n,36524),i=Math.floor(a/1461),s=Math.floor(gO(a,1461)/365),[l,u]=gj(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gR(l,u,1,1),d=2;e<gR(l,u,3,1)?d=0:gT(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-gR(l,u,p,1)+1;return new g4(l,u,p,f)}toJulianDay(e){return gR(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gA[gT(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gT(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function gI(e,t){let r=e.copy(),n="hour"in r?gK(r,t):0;gM(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gL(r),gF(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gL(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gL(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var a,i;let e=null==(a=(i=r.calendar).isInverseEra)?void 0:a.call(i,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gM(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function gL(e){for(;e.month<1;)gM(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gM(e,1)}function gF(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 gB(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gF(e)}function gV(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gU(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gB(r),r}function gW(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gH(r),r}function gH(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 gz(e,t){let r=e%t;return r<0&&(r+=t),r}function gK(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gz(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gz(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gz(e.minute,60),r=Math.floor(e.hour/24),e.hour=gz(e.hour,24),r}function gG(e,t){let r=e.copy();return gK(r,t),r}function gZ(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=gq(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gB(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=gq(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gq(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=gq(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gB(o),o}function gY(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,a=0,i=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;a=12*!!e,i=e?23:11}o.hour=gq(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=gq(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=gq(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=gq(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function gq(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gJ(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?ya(gI(yu(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):ye(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),yc(ys(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gX(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 gQ(e){let t,r=yc(e,new g$);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function g0(e){return`${gQ(e)}T${gX(e)}`}function g1(e){let t,r="object"==typeof e[0]?e.shift():new g$;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var g2=new WeakMap;class g4{copy(){return this.era?new g4(this.calendar,this.era,this.year,this.month,this.day):new g4(this.calendar,this.year,this.month,this.day)}add(e){return gI(this,e)}subtract(e){return gI(this,gV(e))}set(e){return gU(this,e)}cycle(e,t,r){return gZ(this,e,t,r)}toDate(e){return yi(this,e)}toString(){return gQ(this)}compare(e){return yb(this,e)}constructor(...e){h_(this,g2,{writable:!0,value:void 0});let[t,r,n,o,a]=g1(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gB(this)}}var g3=new WeakMap;class g6{copy(){return new g6(this.hour,this.minute,this.second,this.millisecond)}add(e){return gG(this,e)}subtract(e){return gG(this,gV(e))}set(e){return gW(this,e)}cycle(e,t,r){return gY(this,e,t,r)}toString(){return gX(this)}compare(e){var t,r;return t=this,r=e,yw(t)-yw(r)}constructor(e=0,t=0,r=0,n=0){h_(this,g3,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gH(this)}}var g5=new WeakMap;class g9{copy(){return this.era?new g9(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new g9(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gI(this,e)}subtract(e){return gI(this,gV(e))}set(e){return gU(gW(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gZ(this,e,t,r);default:return gY(this,e,t,r)}}toDate(e,t){return yi(this,e,t)}toString(){return g0(this)}compare(e){var t,r;let n=yb(this,e);return 0===n?(t=this,r=yu(e),yw(t)-yw(r)):n}constructor(...e){h_(this,g5,{writable:!0,value:void 0});let[t,r,n,o,a]=g1(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gB(this)}}var g8=new WeakMap;class g7{copy(){return this.era?new g7(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new g7(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gJ(this,e)}subtract(e){return gJ(this,gV(e))}set(e,t){let r,n;return 0===(n=gW(gU(r=yu(this),e),e)).compare(r)?this:yc(ys(ya(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if((null==n?void 0:n.hourCycle)===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let a=yu(e),i=yc(gW(a,{hour:t}),new g$),s=[ya(i,e.timeZone,"earlier"),ya(i,e.timeZone,"later")].filter(t=>ys(t,e.timeZone).day===i.day)[0],l=yc(gW(a,{hour:o}),new g$),u=[ya(l,e.timeZone,"earlier"),ya(l,e.timeZone,"later")].filter(t=>ys(t,e.timeZone).day===l.day).pop(),c=ye(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return yc(ys(c=36e5*gq(d,r,Math.floor(s/36e5),Math.floor(u/36e5),null==n?void 0:n.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gY(e,t,r,n);case"era":case"year":case"month":case"day":return yc(ys(ya(gZ(yu(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(ye(e)-e.offset)}toString(){var e;let t,r,n;return`${g0(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=e%36e5/6e4,`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof g7){var r,n;return e.timeZone===t?e:(r=e,n=t,yc(ys(ye(r)-r.offset,n),r.calendar))}return ys(ya(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){h_(this,g8,{writable:!0,value:void 0});let[t,r,n,o,a]=g1(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,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,gB(this)}}function ye(e){return yt(gN((e=yc(e,new g$)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function yt(e,t,r,n,o,a,i){let s=new Date;return s.setUTCHours(n,o,a,i),s.setUTCFullYear(e,t-1,r),s.getTime()}function yr(e,t){if("UTC"===t)return 0;if(e>0&&t===yx())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yo(e,t);return yt(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let yn=new Map;function yo(e,t){let r=yn.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),yn.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function ya(e,t,r="compatible"){var n,o,a;let i=yu(e);if("UTC"===t)return ye(i);if(t===yx()&&"compatible"===r){i=yc(i,new g$);let e=new Date,t=gN(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=ye(i),l=yr(s-864e5,t),u=yr(s+864e5,t),c=(n=i,((o=s-l)==(a=s-u)?[o]:[o,a]).filter(e=>{var r;let o;return r=n,o=yo(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function yi(e,t,r="compatible"){return new Date(ya(e,t,r))}function ys(e,t){let r=yr(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new g7(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function yl(e){return new g4(e.calendar,e.era,e.year,e.month,e.day)}function yu(e,t){let r=0,n=0,o=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:a}=t),new g9(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function yc(e,t){if(ym(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gB(n),n}let yd={"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 yp(e,t){return t=yc(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yf(e,t){return ym(e.calendar,t.calendar)&&yp(e,t)}function ym(e,t){var r,n,o,a;return null!=(a=null!=(o=null==(r=e.isEqual)?void 0:r.call(e,t))?o:null==(n=t.isEqual)?void 0:n.call(t,e))?a:e.identifier===t.identifier}let yh={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yg(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yh[r]:(n=function(e){if(Intl.Locale){let t=yk.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yk.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yd[n]||0))%7;return o<0&&(o+=7),o}function yy(e){return ys(Date.now(),e)}function yv(e){return yl(yy(e))}function yb(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yw(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yE=null;function yx(){return null==yE&&(yE=new Intl.DateTimeFormat().resolvedOptions().timeZone),yE}function yD(e){return e.subtract({days:e.day-1})}function y_(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yS(e,t,r){let n=yg(e,t,r);return e.subtract({days:n})}let yk=new Map;function yC(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yP(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yO=Symbol.for("react-aria.i18n.locale"),yR=Symbol.for("react-aria.i18n.strings");class yT{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yO];if(void 0===p){let e=window[yR];if(!e)return null;for(let r in p={},e)p[r]=new yT({[t]:e[r]},t)}let r=null==p?void 0:p[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yN=new Map,yj=new Map;class yA{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,a=yN.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yN.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yj.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yj.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let y$=new WeakMap;function yI(e,t){let r;return t&&yT.getGlobalDictionaryForPackage(t)||((r=y$.get(e))||(r=new yT(e),y$.set(e,r)),r)}function yM(e,t){let{locale:r}=gC(),n=yI(e,t);return(0,cf.useMemo)(()=>new yA(r,n),[r,n])}let yL=new Map;class yF{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yW&&(yW="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yW&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yV(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,t={}){this.formatter=yV(e,t),this.options=t}}let yB={true:{ja:"h11"},false:{}};function yV(e,t={}){if("boolean"==typeof t.hour12&&(null==yU&&(yU="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yU)){let r=yB[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=null!=r?r:n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yL.has(r))return yL.get(r);let n=new Intl.DateTimeFormat(e,t);return yL.set(r,n),n}let yU=null,yW=null;function yH(e,t){let r=(0,cf.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yz(e){e=yH(null!=e?e:{},yK);let{locale:t}=gC();return(0,cf.useMemo)(()=>new yF(t,e),[t,e])}function yK(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}function yG(e){return e&&e.__esModule?e.default:e}let yZ=new WeakMap;function yY(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function yq(e,t,r,n){let o=yM(yG(gP),"@react-aria/calendar"),a=yY(e)||yY(t),i=yz({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yz({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cf.useMemo)(()=>{if(yp(e,yD(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yp(t,y_(e)))return i.format(a.toDate(r));if(yp(t,y_(t)))return n?yJ(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?yJ(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function yJ(e,t,r,n,o){let a=e.formatRangeToParts(r.toDate(o),n.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let t=a[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yX(e,t){let r=(0,cf.useRef)(!0),n=(0,cf.useRef)(null);(0,cf.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cf.useEffect)(()=>{let o=n.current;r.current?r.current=!1:(!o||t.some((e,t)=>!Object.is(e,o[t])))&&e(),n.current=t},t)}function yQ(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mA(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function y0(e,t){var r,n;let o,a,i,s,l,u=yM((r=gP)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=mQ(e),d=yq(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=yq(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yX(()=>{t.isFocused||mG(p)},[p]);let f=(i=yM(yG(gP),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yz({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yY(o)||yY(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cf.useMemo)(()=>{if(!l&&o&&a)if(yp(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yJ(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));yX(()=>{f&&mG(f,"polite",4e3)},[f]);let m=m$([!!e.errorMessage,e.isInvalid,e.validationState]);yZ.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,cf.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cf.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mM(c,yQ({id:e.id,"aria-label":[e["aria-label"],p].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:m},title:d}}let y1={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function y2(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cf.useState)(!1),{focusWithinProps:a}=gt({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cf.useMemo)(()=>n?t:t?{...y1,...t}:y1,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cm().createElement(r,mM(a,i),t)}function y4(e,t,r,n){let o=mx(r),a=null==r;(0,cf.useEffect)(()=>{if(a||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,a,o])}let y3=0,y6=new Map;function y5(e){let[t,r]=(0,cf.useState)();return mE(()=>{if(!e)return;let t=y6.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y3++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},y6.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y6.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function y9(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function y8(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[n];break}t=t.offsetParent}return o}function y7(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)y9(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=y8(e,t,"left"),n=y8(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:p,scrollPaddingLeft:f}=getComputedStyle(e),m=i+parseInt(u,10),h=s+parseInt(l,10),g=m+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(p,10)||0,w=parseInt(d,10)||0,E=parseInt(f,10)||0;r<=i+E?i=r-parseInt(u,10)-E:r+o>g-w&&(i+=r+o-g+w),n<=h+v?s=n-parseInt(l,10)-v:n+a>y-b&&(s+=n+a-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var r,n,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(r=e.scrollIntoView)||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(o=t.containingElement)||null==(n=o.scrollIntoView)||n.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function ve(e,t){let r=e;for(y9(r,t)&&(r=r.parentElement);r&&!y9(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class vt extends g${fromJulianDay(e){let t=super.fromJulianDay(e);return new g4(this,gN(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vr(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(vr(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function vr(e){let[t,r]=gj(e.year+-543);return new g4(t,r,e.month,e.day)}function vn(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vo(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-vn(e,r,1,1))/30),o=t+1-vn(e,r,n,1);return[r,n,o]}function va(e){return Math.floor(e%4/3)}function vi(e,t){return t%13!=0?30:va(e)+5}class vs{fromJulianDay(e){let[t,r,n]=vo(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g4(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),vn(1723856,t,e.month,e.day)}getDaysInMonth(e){return vi(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+va(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vl extends vs{fromJulianDay(e){let[t,r,n]=vo(1723856,e);return new g4(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vu extends vs{fromJulianDay(e){let[t,r,n]=vo(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g4(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vn(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vi(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 vc=765433;function vd(e){return 7>gO(7*e+1,19)}function vp(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gO(3*(r+1),7)&&(r+=1),r}function vf(e){let t,r;return vp(e)+(t=vp(e-1),r=vp(e),vp(e+1)-r==356?2:+(r-t==382))}function vm(e){return vf(e+1)-vf(e)}function vh(e,t){if(t>=6&&!vd(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vm(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vd(e):30}class vg{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vc*19+234)/235)+1,n=vf(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vf(--r)));let a=1,i=0;for(;i<o;)i+=vh(r,a),a++;let s=o-(i-=vh(r,--a));return new g4(this,r,a,s)}toJulianDay(e){let t=vf(e.year);for(let r=1;r<e.month;r++)t+=vh(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vh(e.year,e.month)}getMonthsInYear(e){return vd(e.year)?13:12}getDaysInYear(e){return vm(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vd(t.year)&&!vd(e.year)&&t.month>6?e.month--:!vd(t.year)&&vd(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vy extends g${fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gR(o.era,o.year,1,1);if(i<80?(a--,i+=(t=gT(o.year-1)?31:30)+155+90+10):(t=gT(o.year)?31:30,i-=80),i<t)r=1,n=i+1;else{let e=i-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new g4(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gj(e.year+78);return(gT(o)?(t=31,r=gR(n,o,3,21)):(t=30,r=gR(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gT(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 vv(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vb(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vv(t,n,1,1)))/29.5)+1),a=r-vv(t,n,o,1)+1;return new g4(e,n,o,a)}function vw(e){return(14+11*e)%30<11}class vE{fromJulianDay(e){return vb(this,1948440,e)}toJulianDay(e){return vv(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vw(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vw(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vx extends vE{fromJulianDay(e){return vb(this,1948439,e)}toJulianDay(e){return vv(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vD(e){return 460322+l[e-1300]}function v_(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function vS(e,t){let r=vD(e);for(let n=1;n<t;n++)r+=v_(e,n);return r}function vk(e){return l[e+1-1300]-l[e-1300]}class vC extends vE{fromJulianDay(e){let t=e-1948440,r=vD(1300),n=vD(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vD(++e)+1;let o=vk(e);if(n===o){r=12;break}if(n<o){let t=v_(e,r);for(r=1;n>t;)n-=t,t=v_(e,++r);break}}return new g4(this,e,r,t-vS(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vS(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):v_(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vk(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let r=1;r<=12;r++)e+=v_(t,r)}}}}let vP=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vO=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vR=[1867,1911,1925,1988,2018],vT=["meiji","taisho","showa","heisei","reiwa"];function vN(e){let t=vP.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?vP.length-1:0===t?0:t-1}function vj(e){let t=vR[vT.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g4(e.year+t,e.month,e.day)}class vA extends g${fromJulianDay(e){let t=super.fromJulianDay(e),r=vN(t);return new g4(this,vT[r],t.year-vR[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vj(e))}balanceDate(e){let t=vj(e),r=vN(t);vT[r]!==e.era&&(e.era=vT[r],e.year=t.year-vR[r]),this.constrainDate(e)}constrainDate(e){let t=vT.indexOf(e.era),r=vO[t];if(null!=r){let[n,o,a]=r,i=n-vR[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){let[,r,n]=vP[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return vT}getYearsInEra(e){let t=vT.indexOf(e.era),r=vP[t],n=vP[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(vj(e))}getMinimumMonthInYear(e){let t=v$(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=v$(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function v$(e){if(1===e.year)return vP[vT.indexOf(e.era)]}let vI=[0,31,62,93,124,155,186,216,246,276,306,336];class vM{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),a=n-vI[o]+1;return new g4(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vI[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gO(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vL(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vF(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vB extends g${fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vF(gN(t.era,t.year));return new g4(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vV(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vF(vL(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vV(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vV(e){let[t,r]=gj(vL(e));return new g4(t,r,e.month,e.day)}function vU(e){switch(e){case"buddhist":return new vt;case"ethiopic":return new vs;case"ethioaa":return new vl;case"coptic":return new vu;case"hebrew":return new vg;case"indian":return new vy;case"islamic-civil":return new vE;case"islamic-tbla":return new vx;case"islamic-umalqura":return new vC;case"japanese":return new vA;case"persian":return new vM;case"roc":return new vB;default:return new g$}}function vW(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vH(e,t,r,n,o){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;let i=vz(e,t,r).subtract(a);return vG(e,i,t,r,n,o)}function vz(e,t,r,n,o){let a=e;if(t.years)a=yD(e.subtract({months:e.month-1}));else t.months?a=yD(e):t.weeks&&(a=yS(e,r));return vG(e,a,t,r,n,o)}function vK(e,t,r,n,o){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vz(e,t,r).subtract(a);return vG(e,i,t,r,n,o)}function vG(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yP(t,vz(yl(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=yC(t,vK(yl(a),r,n));e&&(t=e)}return t}function vZ(e,t,r){if(t){let r=yP(e,yl(t));r&&(e=r)}if(r){let t=yC(e,yl(r));t&&(e=t)}return e}function vY(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function vq(e,t,r){let[n,o]=(0,cf.useState)(e||t),a=(0,cf.useRef)(void 0!==e),i=void 0!==e;(0,cf.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cf.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(s,e)&&r(e,...t),i||(s=e)};"function"==typeof e?o((r,...o)=>{let a=e(i?s:r,...o);return(n(a,...t),i)?r:a}):(i||o(e),n(e,...t))},[i,s,r]);return[s,l]}function vJ(e){var t,r,n;let o=(0,cf.useMemo)(()=>new yF(e.locale),[e.locale]),a=(0,cf.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:p,pageBehavior:f="visible",firstDayOfWeek:m}=e,h=(0,cf.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vq(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cf.useMemo)(()=>g?yc(yl(g),h):null,[g,h]),b=(0,cf.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=vq((0,cf.useMemo)(()=>e.focusedValue?vZ(yc(yl(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cf.useMemo)(()=>vZ(e.defaultFocusedValue?yc(yl(e.defaultFocusedValue),h):v||yc(yv(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cf.useState)(()=>{switch(d){case"start":return vz(w,l,i,u,c);case"end":return vK(w,l,i,u,c);default:return vH(w,l,i,u,c)}}),[_,S]=(0,cf.useState)(e.autoFocus||!1),k=(0,cf.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[C,P]=(0,cf.useState)(h);if(!ym(h,C)){let e=yc(w,h);D(vH(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vZ(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vY(e=vZ(e,u,c),x,p))&&(e=yc(e,(null==g?void 0:g.calendar)||new g$),g&&"hour"in g?y(g.set(e)):y(e))}}vW(w,u,c)?E(vZ(w,u,c)):0>w.compare(x)?D(vK(w,l,i,u,c)):w.compare(k)>0&&D(vz(w,l,i,u,c));let T=(0,cf.useMemo)(()=>!!v&&(!!(p&&p(v))||vW(v,u,c)),[v,p,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cf.useMemo)(()=>"visible"===f?l:vX(l),[f,l]);return{isDisabled:null!=(r=e.isDisabled)&&r,isReadOnly:null!=(n=e.isReadOnly)&&n,value:v,setValue:R,visibleRange:{start:x,end:k},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:N?"invalid":null,isValueInvalid:N,setFocusedDate(e){O(e),S(!0)},focusNextDay(){O(w.add({days:1}))},focusPreviousDay(){O(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&O(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&O(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(j);E(vZ(w.add(j),u,c)),D(vz(vG(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vZ(w.subtract(j),u,c)),D(vz(vG(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yS(w,i)):(l.months||l.years)&&O(yD(w))},focusSectionEnd(){l.days?O(k):l.weeks?O(yS(w,i,void 0).add({days:6})):(l.months||l.years)&&O(y_(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?O(w.add({months:1})):(l.months||l.years)&&O(w.add({years:1})):O(w.add(vX(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?O(w.subtract({months:1})):(l.months||l.years)&&O(w.subtract({years:1})):O(w.subtract(vX(l)))},selectFocusedDate(){p&&p(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vW(e,u,c),isSelected(e){return null!=v&&yp(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yp(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(k)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return yp(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return yp(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yg(r=yS(r,i,m),i,m);for(let e=0;e<o;e++)n.push(null);for(;n.length<7;){n.push(r);let e=r.add({days:1});if(yp(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function vX(e){let t={...e};for(let r in e)t[r]=1;return t}function vQ(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:yl(e),end:yl(t)}):null}function v0(e,t){return(e=yc(e,(null==t?void 0:t.calendar)||new g$),t&&"hour"in t)?t.set(e):e}function v1(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let v2=(0,cf.createContext)(null),v4=(0,cf.createContext)(null),v3=(0,cf.createContext)(null),v6=(0,cf.createContext)(null),v5=(0,cf.forwardRef)(function(e,t){[e,t]=mU(e,t,v2);let{locale:r}=gC(),n=vJ({...e,locale:r,createCalendar:e.createCalendar||vU}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=y0(e,n),u=mB({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cm().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cm().createElement(mF,{values:[[gd,{slots:{previous:a,next:i}}],[gf,{"aria-hidden":!0,level:2,children:l}],[v3,n],[v2,e],[gm,{slots:{errorMessage:s}}]]},cm().createElement(y2,null,cm().createElement("h2",null,o["aria-label"])),u.children,cm().createElement(y2,null,cm().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),v9=(0,cf.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mU(e,t,v4);let{locale:s}=gC(),l=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vq(t,r||null,n),[p,f]=(0,cf.useState)(null),m="center";if(c&&c.start&&c.end){let e=vH(yl(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cf.useRef)(null),[g,y]=(0,cf.useState)(null),v=(0,cf.useMemo)(()=>yP(s,null==g?void 0:g.start),[s,g]),b=(0,cf.useMemo)(()=>yC(l,null==g?void 0:g.end),[l,g]),w=vJ({...u,value:c&&c.start,createCalendar:o,locale:a,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:m}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:v1(t,w,-1),end:v1(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cf.useState)(w.visibleRange);yf(w.visibleRange.start,x.start)&&yf(w.visibleRange.end,x.end)||(E(p),D(w.visibleRange));let _=e=>{e?(f(e),E(e)):(f(null),E(null))},S=p?vQ(p,w.focusedDate):c&&vQ(c.start,c.end),k=t=>{if(e.isReadOnly)return;let r=vY(vZ(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(p){let e=vQ(p,r);e&&d({start:v0(e.start,null==c?void 0:c.start),end:v0(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[C,P]=(0,cf.useState)(!1),{isDateUnavailable:O}=e,R=(0,cf.useMemo)(()=>!!c&&!p&&(!!(O&&(O(c.start)||O(c.end)))||vW(c.start,s,l)||vW(c.end,s,l)),[O,c,p,s,l]),T=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:_,highlightedRange:S,validationState:T?"invalid":null,isValueInvalid:T,selectFocusedDate(){k(w.focusedDate)},selectDate:k,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,r;return w.isInvalid(e)||vW(e,null==(t=h.current)?void 0:t.start,null==(r=h.current)?void 0:r.end)},isDragging:C,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vU}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:f}=(r=e,n=t,o=y0(r,l),a=(0,cf.useRef)(!1),y4(i=(0,cf.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y4(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&n.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},y4(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mB({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cm().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cm().createElement(mF,{values:[[gd,{slots:{previous:c,next:d}}],[gf,{"aria-hidden":!0,level:2,children:f}],[v6,l],[v4,e],[gm,{slots:{errorMessage:p}}]]},cm().createElement(y2,null,cm().createElement("h2",null,u["aria-label"])),m.children,cm().createElement(y2,null,cm().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v8=(0,cf.createContext)(null),v7=(0,cf.forwardRef)(function(e,t){var r,n;let o=(0,cf.useContext)(v3),a=(0,cf.useContext)(v6),i=mV(v2),s=mV(v4),l=null!=o?o:a,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==i?void 0:i.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f,weeksInMonth:m}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=gC(),s=yq(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yZ.get(t),c=yQ({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yz({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=gC(),f=(0,cf.useMemo)(()=>{let e=yS(yv(t.timeZone),p,a);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[p,t.timeZone,d,a]),m=(r=n.calendar.getDaysInMonth(n),Math.ceil((yg(yD(n),p,a)+r)/7));return{gridProps:mM(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:m}}({startDate:u,endDate:y_(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cm().createElement(v8.Provider,{value:{headerProps:p,weekDays:f,startDate:u,weeksInMonth:m}},cm().createElement("table",{...mQ(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cm().createElement(cm().Fragment,null,cm().createElement(be,null,e=>cm().createElement(bt,null,e)),cm().createElement(br,null,e.children))))}),be=(0,cf.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cf.useContext)(v8);return cm().createElement("thead",{...mQ(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cm().createElement("tr",null,i.map((e,t)=>cm().cloneElement(r(e),{key:t}))))}),bt=(0,cf.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cm().createElement("th",{...mQ(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),br=(0,cf.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cf.useContext)(v3),i=(0,cf.useContext)(v6),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cf.useContext)(v8);return cm().createElement("tbody",{...mQ(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cm().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cm().cloneElement(r(e),{key:t}):cm().createElement("td",{key:t})))))}),bn=(0,cf.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cf.useContext)(v3),s=(0,cf.useContext)(v6),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cf.useContext)(v8))?n:{startDate:l.visibleRange.start},c=(0,cf.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yZ.get(t),u=yM((n=gP)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yz({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yY(a),timeZone:t.timeZone}),d=t.isSelected(a),p=t.isCellFocused(a);i=i||t.isCellDisabled(a);let f=t.isCellUnavailable(a),m=!i&&!f,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&a.compare(t.highlightedRange.start)>=0&&0>=a.compare(t.highlightedRange.end):t.value&&yp(t.value,a));h&&(d=!0),a=yH(a,yf);let g=(0,cf.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yp(a,yv(t.timeZone)),v=(0,cf.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yp(a,t.value.start)||yp(a,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&yp(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yp(a,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,a,t,l]),b="";"anchorDate"in t&&p&&!t.isReadOnly&&m&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=y5(b),E=(0,cf.useRef)(!1),x=(0,cf.useRef)(!1),D=(0,cf.useRef)(void 0),{pressProps:_,isPressed:S}=hM({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!m||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(a);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(yp(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yp(a,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}}let r=()=>{t.setDragging(!0),D.current=void 0,t.selectDate(a),t.setFocusedDate(a),E.current=!0};"touch"===e.pointerType?D.current=setTimeout(r,200):r()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(a),t.setFocusedDate(a))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(a),t.setFocusedDate(a)),"anchorDate"in t))if(x.current)t.setAnchorDate(a);else if(t.anchorDate&&!E.current)t.selectDate(a),t.setFocusedDate(a);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(a),t.setFocusedDate(a));else{t.selectDate(a);let e=a.add({days:1});t.isInvalid(e)&&(e=a.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});i||(o=yp(a,t.focusedDate)?0:-1),(0,cf.useEffect)(()=>{p&&r.current&&(m9(r.current),"pointer"!==hH&&document.activeElement===r.current&&y7(r.current,{containingElement:ve(r.current)}))},[p,r]);let k=yz({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),C=(0,cf.useMemo)(()=>k.formatToParts(g).find(e=>"day"===e.type).value,[k,g]);return{cellProps:{role:"gridcell","aria-disabled":!m||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mM(_,{onFocus(){i||t.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!m||void 0,"aria-label":v,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&m&&t.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:p,isSelected:d,isDisabled:i,isUnavailable:f,isOutsideVisibleRange:0>a.compare(t.visibleRange.start)||a.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:C}}({date:e},l,c),{hoverProps:m,isHovered:h}=gs({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=gr();y&&(y=f.isFocused);let v=(o=u,a=yc(a=e,o.calendar),o=yD(o),a=yD(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yp(e,l.highlightedRange.start),w=yp(e,l.highlightedRange.end));let E=mB({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...f}}),x={"data-focused":f.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return cm().createElement("td",{...d,ref:r},cm().createElement("div",{...mM(mQ(t),p,g,m,x,E),ref:c}))}),bo=(0,cf.createContext)({}),ba=(0,cf.forwardRef)(function(e,t){var r,n;[e,t]=mU(e,t,bo);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=gs({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:m}=gr({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mB({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cm().createElement("div",{...mM(u,m,c),...h,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},h.children)}),bi=(0,cf.createContext)({}),bs=gu(function(e,t){[e,t]=mU(e,t,bi);let{hoverProps:r,isHovered:n}=gs(e),{isFocused:o,isFocusVisible:a,focusProps:i}=gr({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mB({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cm().createElement("input",{...mM((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),i,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var bl={};bl={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let bu=cm().createContext(null),bc="react-aria-focus-scope-restore",bd=null;function bp(e){var t,r,n,o,a,i,s,l,u,c;let d,p,f,m,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,cf.useRef)(null),w=(0,cf.useRef)(null),E=(0,cf.useRef)([]),{parentNode:x}=(0,cf.useContext)(bu)||{},D=(0,cf.useMemo)(()=>new bC({scopeRef:E}),[E]);mE(()=>{let e=x||bP.root;if(bP.getTreeNode(e.scopeRef)&&bd&&!by(bd,e.scopeRef)){let t=bP.getTreeNode(bd);t&&(e=t)}e.addChild(D),bP.addNode(D)},[D,x]),mE(()=>{let e=bP.getTreeNode(E);e&&(e.contain=!!g)},[g]),mE(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,r=[],n=e=>e.stopPropagation();for(;t&&t!==w.current;)r.push(t),t.addEventListener(bc,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bc,n)}},[h]),mE(()=>{if(r||n)return;let e=t.current,o=m6(e?e[0]:void 0),a=e=>{let r=hO(e);bh(r,t.current)?bd=t:bg(r)||(bd=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[t=E,r=y,n=g]),o=E,a=g,d=(0,cf.useRef)(void 0),p=(0,cf.useRef)(void 0),mE(()=>{let e=o.current;if(!a){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=m6(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bm(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bh(r,n))return;let a=bD(bf(n),{tabbable:!0},n);if(!r)return;a.currentNode=r;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&bv(i,!0)},n=e=>{(!bd||by(bd,o))&&bh(hO(e),o.current)?(bd=o,d.current=hO(e)):bm(o)&&!bg(hO(e),o)?d.current?d.current.focus():bd&&bd.current&&bw(bd.current):bm(o)&&(d.current=hO(e))},i=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=hH,n=("virtual"===r||null===r)&&hp()&&hd(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bm(o)&&!bg(a,o)){bd=o;let t=hO(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bd.current&&bw(bd.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),mE(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),i=E,s=y,l=g,f=(0,cf.useRef)("u">typeof document?((e=document)=>e.activeElement)(m6(i.current?i.current[0]:void 0)):null),mE(()=>{let e=i.current,t=m6(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bd||by(bd,i))&&bh(((e=document)=>e.activeElement)(t),i.current)&&(bd=i)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[i,l]),mE(()=>{let e=m6(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bm(i)||t.isComposing)return;let r=e.activeElement;if(!bg(r,i)||!bE(i))return;let n=bP.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bD(e.body,{tabbable:!0});a.currentNode=r;let s=t.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!bg(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bg(s,i));(t.preventDefault(),t.stopPropagation(),s)?bv(s,!0):bg(o)?bv(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mE(()=>{var e;let t=m6(i.current?i.current[0]:void 0);if(!s)return;let r=bP.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=bP.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bg(n,i)||n===t.body&&bE(i))){let e=bP.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bx(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bP.getTreeNode(t.scopeRef))return void bx(bb(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cm().useRef(c),(0,cf.useEffect)(()=>{m.current&&(bd=u,!bh(((e=document)=>e.activeElement)(m6(u.current?u.current[0]:void 0)),bd.current)&&u.current&&bw(u.current)),m.current=!1},[u]),(0,cf.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m6(E.current?E.current[0]:void 0)),t=null;if(bh(e,E.current)){for(let r of bP.traverse())r.scopeRef&&bh(e,r.scopeRef.current)&&(t=r);t===bP.getTreeNode(E)&&(bd=t.scopeRef)}},[E]),mE(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bP.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bd||by(E,bd))&&(!n||bP.getTreeNode(n))&&(bd=n),bP.removeTreeNode(E)},[E]);let _=(0,cf.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m6(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bD(bf(n),{tabbable:a,accept:s},n);c.currentNode=bh(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bv(d,!0),d},focusPrevious(t={}){var r;let n=e.current,{from:o,tabbable:a,wrap:i,accept:s}=t,l=o||((e=document)=>e.activeElement)(m6(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bD(bf(n),{tabbable:a,accept:s},n);c.currentNode=bh(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bv(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bD(bf(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bv(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bD(bf(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bv(i,!0),i}}},[]),S=(0,cf.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cm().createElement(bu.Provider,{value:S},cm().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cm().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function bf(e){return e[0].parentElement}function bm(e){let t=bP.getTreeNode(bd);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bh(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bg(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bP.traverse(bP.getTreeNode(t)))if(r&&bh(e,r.current))return!0;return!1}function by(e,t){var r;let n=null==(r=bP.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bv(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{h5(e)}catch{}}function bb(e,t=!0){let r=e[0].previousElementSibling,n=bf(e),o=bD(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bD(n=bf(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function bw(e,t=!0){bv(bb(e,t))}function bE(e){let t=bP.getTreeNode(bd);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bx(e){e.dispatchEvent(new CustomEvent(bc,{bubbles:!0,cancelable:!0}))&&bv(e)}function bD(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m3:m4,s=m6((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(n=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var n;return(null==t||null==(n=t.from)?void 0:n.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=m5(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||bh(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(n,o,a));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function b_(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m6(n)),u=bD(n,{tabbable:a,accept:s});n.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=n,c=u.nextNode()),c&&bv(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:a=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(m6(n)),u=bD(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bS(u);return e&&bv(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bS(u);if(!e)return null;c=e}return c&&bv(c,!0),null!=c?c:null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bD(n,{tabbable:o,accept:a}).nextNode();return i&&bv(i,!0),i},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:a=t.accept}=r,i=bS(bD(n,{tabbable:o,accept:a}));return i&&bv(i,!0),null!=i?i:null}}}function bS(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bk{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let o=new bC({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&bh(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new bk;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!=(t=null==(e=n.parent)?void 0:e.scopeRef)?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new bC({scopeRef:null}),this.fastMap.set(null,this.root)}}class bC{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let bP=new bk;function bO(e,t,r){let{direction:n}=gC(),o=(0,cf.useMemo)(()=>b_(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bD(t.current,{tabbable:!0});if(r&&(n.currentNode=r,r=n.previousNode()),!r){let e;do(e=n.lastChild())&&(r=e);while(e)}for(;null==r?void 0:r.hasAttribute("data-placeholder");){let e=n.previousNode();if(e&&e.hasAttribute("data-placeholder"))r=e;else break}r&&r.focus()},{pressProps:i}=hM({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mM(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!r))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bR(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===n){if(t.current){let e=a.target,r=bR(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bR(e,t,r){let n=bD(e,{tabbable:!0}),o=n.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<i&&(a=o,i=s),o=n.nextNode()}return a}function bT(e,t,r){let n=(0,cf.useRef)(t),o=mx(()=>{r&&r(n.current)});(0,cf.useEffect)(()=>{var t;let r=null==e||null==(t=e.current)?void 0:t.form;return null==r||r.addEventListener("reset",o),()=>{null==r||r.removeEventListener("reset",o)}},[e,o])}function bN(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:a="label"}=e;t=mA(t);let i=mA(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:yQ({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=m$([!!t,!!r,n,o]),l=m$([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mM(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bj(e,t,r){let{validationBehavior:n,focus:o}=e;mE(()=>{if("native"===n&&(null==r?void 0:r.current)&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mx(()=>{t.resetValidation()}),i=mx(e=>{var n,a;t.displayValidation.isInvalid||t.commitValidation();let i=null==r||null==(n=r.current)?void 0:n.form;!e.defaultPrevented&&r&&i&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(!r.validity.valid)return r}return null}(i)===r.current&&(o?o():null==(a=r.current)||a.focus(),hH="keyboard",hq("keyboard",null)),e.preventDefault()}),s=mx(()=>{t.commitValidation()});(0,cf.useEffect)(()=>{let e=null==r?void 0:r.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",a)}},[r,i,s,a,n])}let bA=new WeakMap,b$="__role_"+Date.now(),bI="__focusManager_"+Date.now();function bM(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=bN({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,cf.useRef)(null),{focusWithinProps:m}=gt({...e,onFocusWithin(r){var n;f.current=t.value,null==(n=e.onFocus)||n.call(e,r)},onBlurWithin:r=>{var n;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),null==(n=e.onBlur)||n.call(e,r)},onFocusWithinChange:e.onFocusChange}),h=yM((o=bl)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=y5(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[b$]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bI],E=(0,cf.useMemo)(()=>w||b_(r),[w,r]),x=bO(t,r,"presentation"===e[b$]);bA.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cf.useRef)(e.autoFocus);a="presentation"===e[b$]?{role:"presentation"}:mM(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cf.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),bT(e.inputRef,t.value,t.setValue),bj({...e,focus(){E.focusFirst()}},t,e.inputRef);let _={type:"hidden",name:e.name,value:(null==(n=t.value)?void 0:n.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(_.type="text",_.hidden=!0,_.required=e.isRequired,_.onChange=()=>{});let S=mQ(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mM(S,a,x,m,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:_,descriptionProps:d,errorMessageProps:p,isInvalid:i,validationErrors:s,validationDetails:l}}var bL={};bL={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let bF={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bB={...bF,customError:!0,valid:!1},bV={isInvalid:!1,validationDetails:bF,validationErrors:[]},bU=(0,cf.createContext)({}),bW="__formValidationState"+Date.now();function bH(e){if(e[bW]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bW];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;r&&(t||(t="invalid"===r));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bB}:null,u=(0,cf.useMemo)(()=>i&&null!=o?bK(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bz(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cf.useContext)(bU),d=(0,cf.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bz(c[e])):bz(c[n]):[],[c,n]),[p,f]=(0,cf.useState)(c),[m,h]=(0,cf.useState)(!1);c!==p&&(f(c),h(!1));let g=(0,cf.useMemo)(()=>bK(m?[]:d),[m,d]),y=(0,cf.useRef)(bV),[v,b]=(0,cf.useState)(bV),w=(0,cf.useRef)(bV),[E,x]=(0,cf.useState)(!1);return(0,cf.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bG(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bV,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bG(v,e)?y.current=e:b(e)},resetValidation(){bG(bV,w.current)||(w.current=bV,b(bV)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bz(e){return e?Array.isArray(e)?e:[e]:[]}function bK(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bB}:null}function bG(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function bZ(...e){let t=new Set,r=!1,n={...bF};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||(r=o.isInvalid),n)n[e]||(n[e]=o.validationDetails[e])}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let bY=new yT((er=bL)&&er.__esModule?er.default:er);function bq(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bJ(e,t,r,n,o){let a=null!=e&&null!=r&&e.compare(r)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==n?void 0:n(e))||!1,l=a||i||s,u=[];if(l){let e=bq(),n=new yA(e,yT.getGlobalDictionaryForPackage("@react-stately/datepicker")||bY),l=new yF(e,b0({},o)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),a&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bX={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bQ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function b0(e,t){var r;e={...t.shouldForceLeadingZeros?bQ:bX,...e};let n=t.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(r=t.maxGranularity)?r:"year");a<0&&(a=0);let i=o.indexOf(n);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===a&&(s.era="short"),s}function b1(e){return e&&"hour"in e?e:new g6}function b2(e,t){return null===e?null:e?yc(e,t):void 0}function b4(e,t,r,n){if(e)return b2(e,r);let o=yc(yy(null!=n?n:yx()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?yl(o):n?o:yu(o)}function b3(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,a]=(0,cf.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&a([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let b6=new yT({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),b5={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},b9={year:5,month:2,day:7,hour:2,minute:15,second:15},b8={dayperiod:"dayPeriod"};function b7(e){var t,r;let{locale:n,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,p=e.value||e.defaultValue||e.placeholderValue||null,[f,m]=b3(p,e.granularity),h=m||"UTC";if(p&&!(f in p))throw Error("Invalid granularity "+f+" for value "+p.toString());let g=(0,cf.useMemo)(()=>new yF(n),[n]),y=(0,cf.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=vq(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cf.useMemo)(()=>{var e;return null!=(e=b2(v,y))?e:null},[v,y]),[E,x]=(0,cf.useState)(()=>b4(e.placeholderValue,f,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cf.useMemo)(()=>{var t;return{granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:m,hideTimeZone:a,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,m,a,D]),S=(0,cf.useMemo)(()=>b0({},_),[_]),k=(0,cf.useMemo)(()=>new yF(n,S),[n,S]),C=(0,cf.useMemo)(()=>k.resolvedOptions(),[k]),P=(0,cf.useMemo)(()=>k.formatToParts(new Date).filter(e=>b5[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[k]),[O,R]=(0,cf.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cf.useRef)(null),N=(0,cf.useRef)(y);(0,cf.useEffect)(()=>{ym(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?yc(t,y):b4(e.placeholderValue,f,y,m)))},[y,f,O,m,e.placeholderValue]),v&&Object.keys(O).length<Object.keys(P).length&&R(O={...P}),null==v&&Object.keys(O).length===Object.keys(P).length&&(R(O={}),x(b4(e.placeholderValue,f,y,m)));let j=w&&Object.keys(O).length>=Object.keys(P).length?w:E,A=t=>{if(e.isDisabled||e.isReadOnly)return;let r=Object.keys(O),n=Object.keys(P);null==t?(b(null),x(b4(e.placeholderValue,f,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=yc(t,(null==p?void 0:p.calendar)||new g$)):x(t),T.current=null},$=(0,cf.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cf.useMemo)(()=>(function(e,t,r,n,o,a,i,s){let l=["hour","minute","second"],u=r.formatToParts(e),c=[];for(let e of u){var d,p;let r=b5[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=b5[e.type]&&!t[e.type],f=b5[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?b6.getStringForLocale(d,i):"––"):null,m={type:b8[e.type]||e.type,text:u?f:e.value,...we(o,e.type,n),isPlaceholder:u,placeholder:f,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"⁦",...we(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"⁩",...we(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"⁩",...we(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(m)}return c})($,O,k,C,j,y,n,f),[$,O,k,C,j,y,n,f]);P.era&&O.year&&!O.era?(O.era=!0,R({...O})):!P.era&&O.era&&(delete O.era,R({...O}));let M=e=>{O[e]=!0,"year"===e&&P.era&&(O.era=!0),R({...O})},L=(e,t)=>{if(O[e])A(function(e,t,r,n){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,r,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,r,{round:"hour"!==t,hourCycle:n.hour12?12:24})}throw Error("Unknown segment: "+t)}(j,e,t,C));else{M(e);let t=Object.keys(O),r=Object.keys(P);(t.length>=r.length||t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod)&&A(j)}},F=(0,cf.useMemo)(()=>bJ(v,u,c,d,_),[v,u,c,d,_]),B=bH({...e,value:v,builtinValidation:F}),V=B.displayValidation.isInvalid,U=e.validationState||(V?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:k,validationState:U,isInvalid:V,granularity:f,maxGranularity:null!=(r=e.maxGranularity)?r:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,b9[e]||1)},decrementPage(e){L(e,-(b9[e]||1))},setSegment(e,t){M(e),A(function(e,t,r,n){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:r})}if("hour"in e&&"number"==typeof r)switch(t){case"dayPeriod":{let t=e.hour,n=t>=12;if(r>=12===n)return e;return e.set({hour:n?t-12:t+12})}case"hour":if(n.hour12){let t=e.hour>=12;t||12!==r||(r=0),t&&r<12&&(r+=12)}case"minute":case"second":return e.set({[t]:r})}throw Error("Unknown segment: "+t)}(j,e,t,C))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(O),r=Object.keys(P);t.length===r.length-1&&P.dayPeriod&&!O.dayPeriod&&(R(O={...P}),A(j.copy()))},clearSegment(t){delete O[t],T.current=t,R({...O});let r=b4(e.placeholderValue,f,y,m),n=j;if("dayPeriod"===t&&"hour"in j&&"hour"in r){let e=j.hour>=12,t=r.hour>=12;e&&!t?n=j.set({hour:j.hour-12}):!e&&t&&(n=j.set({hour:j.hour+12}))}else"hour"===t&&"hour"in j&&j.hour>=12&&O.dayPeriod?n=j.set({hour:r.hour+12}):t in j&&(n=j.set({[t]:r[t]}));b(null),A(n)},formatValue:e=>w?new yF(n,b0(e,_)).format($):"",getDateFormatter:(e,t)=>new yF(e,b0({},{..._,...t}))}}function we(e,t,r){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(r.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let wt=(0,cf.createContext)(null),wr=(0,cf.createContext)(null),wn=(0,cf.createContext)(null),wo=(0,cf.forwardRef)(function(e,t){let r=(0,cf.useContext)(wr),n=(0,cf.useContext)(wn);return r||n?cm().createElement(wi,{...e,ref:t}):cm().createElement(wa,{...e,ref:t})}),wa=(0,cf.forwardRef)((e,t)=>{let[r,n]=mU({slot:e.slot},t,wt),{locale:o}=gC(),a=b7({...r,locale:o,createCalendar:vU}),i=(0,cf.useRef)(null),{fieldProps:s,inputProps:l}=bM({...r,inputRef:i},a,n);return cm().createElement(mF,{values:[[wr,a],[bi,{...l,ref:i}],[bo,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cm().createElement(wi,e))}),wi=(0,cf.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cf.useContext)(wr),a=(0,cf.useContext)(wn),i=null!=o?o:a;return cm().createElement(cm().Fragment,null,cm().createElement(ba,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,cf.cloneElement)(n(e),{key:t}))),cm().createElement(bs,null))}),ws=(0,cf.createContext)({});function wl({children:e}){let t=(0,cf.useMemo)(()=>({register:()=>{}}),[]);return cm().createElement(hx.Provider,{value:t},e)}cm().forwardRef(({children:e,...t},r)=>{let n=(0,cf.useRef)(!1),o=(0,cf.useContext)(hx);r=mb(r||(null==o?void 0:o.ref));let a=mM(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hk(o,r),(0,cf.useEffect)(()=>{n.current||(n.current=!0)},[]),cm().createElement(hx.Provider,{value:a},e)});let wu=cm().createContext(null);function wc(e){var t;let r=mT(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[a,i]=(0,cf.useState)(!1),s=(0,cf.useMemo)(()=>({contain:a,setContain:i}),[a,i]),{getContainer:l}=null!=(t=(0,cf.useContext)(ws))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=cm().createElement(bp,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!o},u)),u=cm().createElement(wu.Provider,{value:s},cm().createElement(wl,null,u)),hj().createPortal(u,n)}let wd=(0,cf.createContext)(null),wp=(0,cf.createContext)(null),wf=(0,cf.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mU(e,t,wd);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=m$();a=e["aria-label"]?void 0:a;let i=(0,cf.useRef)(!1);return(0,cf.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){h5(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),h5(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),mE(()=>{null==n||n(!0)},[n=null==(r=(0,cf.useContext)(wu))?void 0:r.setContain]),{dialogProps:{...mQ(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,cf.useContext)(wp);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mB({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cm().createElement("section",{...mQ(e),...n,...i,ref:t,slot:e.slot||void 0},cm().createElement(mF,{values:[[gf,{slots:{[mL]:{},title:{...o,level:2}}}],[gd,{slots:{[mL]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wm=(0,cf.createContext)(null),wh=(0,cf.forwardRef)(function(e,t){let r=(0,cf.useContext)(wm);return(null==r?void 0:r.isInvalid)?cm().createElement(wg,{...e,ref:t}):null}),wg=(0,cf.forwardRef)((e,t)=>{let r=(0,cf.useContext)(wm),n=mQ(e),o=mB({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cm().createElement(gh,{slot:"errorMessage",...n,...o,ref:t})}),wy=(0,cf.createContext)(null),wv=(0,cf.createContext)({}),wb=gu(function(e,t){[e,t]=mU(e,t,wv);let{elementType:r="label",...n}=e;return cm().createElement(r,{className:"react-aria-Label",...n,ref:t})}),ww=(0,cf.createContext)({placement:"bottom"}),wE=new WeakMap,wx=[];function wD(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function w_(e,t){let r=e,n=t.toString(),o=n.indexOf("."),a=o>=0?n.length-o:0;if(a>0){let e=Math.pow(10,a);r=Math.round(r*e)/e}return r}function wS(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=w_(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&a>r&&(a=Math.floor(w_(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(w_((r-t)/n,n))*n),a=w_(a,n)}let wk={top:"top",bottom:"top",left:"left",right:"left"},wC={top:"bottom",bottom:"top",left:"right",right:"left"},wP={top:"left",left:"top"},wO={top:"height",left:"width"},wR={width:"totalWidth",height:"totalHeight"},wT={},wN="u">typeof document?window.visualViewport:null;function wj(e){var t,r,n,o,a;let i=0,s=0,l=0,u=0,c=0,d=0,p={},f=(null!=(t=null==wN?void 0:wN.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wN?void 0:wN.width)?r:l,s=null!=(n=null==wN?void 0:wN.height)?n:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,wN&&(c=wN.offsetTop,d=wN.offsetLeft)}else({width:i,height:s,top:c,left:d}=wL(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=i,u=s;return hc()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(p.top=0,p.left=0,c=null!=(o=null==wN?void 0:wN.pageTop)?o:0,d=null!=(a=null==wN?void 0:wN.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function wA(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wO[e]],c=n.scroll[wk[e]]+a,d=u+n.scroll[wk[e]]-a,p=t-l+i[e]-n[wk[e]],f=t-l+r+i[e]-n[wk[e]];return p<c?c-p:f>d?Math.max(d-f,c-p):0}function w$(e){if(wT[e])return wT[e];let[t,r]=e.split(" "),n=wk[t]||"right",o=wP[n];wk[r]||(r="center");let a=wO[n],i=wO[o];return wT[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},wT[e]}function wI(e,t,r,n,o,a,i,s,l,u){var c,d,p,f,m;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=n,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(p=r[w])?p:0))/2:g!==v&&(E[v]+=(null!=(f=e[w])?f:0)-(null!=(m=r[w])?m:0)),E[v]+=a;let x=e[v]-r[w]+l+u,D=e[v]+e[w]-l-u;if(E[v]=wD(E[v],x,D),h===y){let r=s?i[b]:t[wR[b]];E[wC[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function wM(e,t,r,n,o,a){var i,s,l;let{placement:u,axis:c,size:d}=a;return u===c?Math.max(0,r[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=n[c])?s:0)-n[wC[c]]-o):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-r[c]-r[d]-(null!=(l=n[c])?l:0)-n[wC[c]]-o)}function wL(e){let{top:t,left:r,width:n,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+a-s,left:r+i-l,width:n,height:o}}function wF(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:o,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:o,height:a}}else{r=wL(e);let n=wL(t),o=window.getComputedStyle(t);n.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function wB(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let wV=new WeakMap;function wU(e){let{ref:t,box:r,onResize:n}=e;(0,cf.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&n()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[n,t,r])}let wW="u">typeof document?window.visualViewport:null;function wH(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wz=[],wK="u">typeof document&&window.visualViewport,wG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wZ=0;function wY(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wq(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wJ(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=ve(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect().top,n=r.getBoundingClientRect().top;n>t+r.clientHeight&&(e.scrollTop+=n-t)}r=e.parentElement}}var wX={};function wQ(e){var t;let{onDismiss:r,...n}=e,o=yQ(n,yM((t=wX)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cm().createElement(y2,null,cm().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function w0(e,t,r){mE(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{n||(0,hN.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w1(e){let[t,r]=vq(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cf.useCallback)(()=>{r(!0)},[r]),o=(0,cf.useCallback)(()=>{r(!1)},[r]),a=(0,cf.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}wX={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let w2=(0,cf.createContext)(null),w4=(0,cf.createContext)(null),w3=(0,cf.forwardRef)(function(e,t){[e,t]=mU(e,t,w2);let r=(0,cf.useContext)(wp),n=w1(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=function(e,t){let[r,n]=(0,cf.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w0(e,o,(0,cf.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,i=(0,cf.useContext)(gl),{direction:s}=gC();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cm().createElement(cm().Fragment,null,t)}return!o||o.isOpen||a?cm().createElement(w6,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w6({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cf.useRef)(null),[s,l]=(0,cf.useState)(0),c=(0,cf.useRef)(null),d=(0,cf.useContext)(w4),p=d&&"SubmenuTrigger"===n.trigger;mE(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:m,arrowProps:h,placement:g}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:p}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,cf.useEffect)(()=>{if(o&&!wz.includes(t))return wz.push(t),()=>{let e=wz.indexOf(t);e>=0&&wz.splice(e,1)}},[o,t]);let l=()=>{wz[wz.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cf.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mx(e=>{r&&wH(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mx(e=>{r&&r(e)});(0,cf.useEffect)(()=>{let e=a.current;if(n)return;let r=m6(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wH(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",i,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",i,!0),r.removeEventListener("pointerup",n,!0)}}},[t,n,i,s])}({ref:t,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(wz[wz.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wz[wz.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=gt({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bg(e.relatedTarget,bd))&&(!s||s(e.relatedTarget))&&(null==r||r())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:f,arrowProps:m,placement:h}=function(e){var t,r,n;let{direction:o}=gC(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:p="u">typeof document?document.body:null,offset:f=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,cf.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,p,f,m,g,o,v,b,a],D=(0,cf.useRef)(null==wW?void 0:wW.scale);(0,cf.useEffect)(()=>{g&&(D.current=null==wW?void 0:wW.scale)},[g]);let _=(0,cf.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!p||(null==wW?void 0:wW.scale)!==D.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let n=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==n?void 0:n.top)?t:0)-o.top}).offset>o.height/2&&(x.type="bottom",x.offset=(null!=(r=null==n?void 0:n.bottom)?r:0)-o.bottom)}let _=s.current;!v&&s.current&&(_.style.top="0px",_.style.bottom="",_.style.maxHeight=(null!=(y=null==(n=window.visualViewport)?void 0:n.height)?y:window.innerHeight)+"px");let S=function(e){var t,r,n,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:m,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wB(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wB(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wL(s):wF(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=wL(l),D={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};x.width+=(null!=(t=D.left)?t:0)+(null!=(r=D.right)?r:0),x.height+=(null!=(n=D.top)?n:0)+(null!=(o=D.bottom)?o:0);let _={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wj(p),k=wj(v),C="BODY"===p.tagName?wL(v):wF(v,p);return"HTML"===v.tagName&&"BODY"===p.tagName&&(k.scroll.top=0,k.scroll.left=0),function(e,t,r,n,o,a,i,s,l,u,c,d,p,f,m,h){var g,y,v,b,w,E,x,D,_,S,k,C,P,O;let R,T,N,j=w$(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wI(t,s,r,j,c,d,u,p,m,h),B=c,V=wM(s,u,t,o,a+c,j);if(i&&n[A]>V){let e=w$(`${wC[M]} ${L}`),n=wI(t,s,r,e,c,d,u,p,m,h);wM(s,u,t,o,a+c,e)>V&&(j=e,F=n,B=c)}let U="bottom";"top"===j.axis?"top"===j.placement?U="top":"bottom"===j.placement&&(U="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?U="bottom":"bottom"===j.crossPlacement&&(U="top"));let W=wA($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=U,R=p?u.height:s[wR.height],T=null!=w.top?u.top+w.top:u.top+(R-(null!=(D=w.bottom)?D:0)-E),N="top"!==x?Math.max(0,s.height+s.top+(null!=(_=s.scroll.top)?_:0)-T-((null!=(S=o.top)?S:0)+(null!=(k=o.bottom)?k:0)+a)):Math.max(0,T+E-(s.top+(null!=(C=s.scroll.top)?C:0))-((null!=(P=o.top)?P:0)+(null!=(O=o.bottom)?O:0)+a)),Math.min(s.height-2*a,N));f&&f<H&&(H=f),r.height=Math.min(r.height,H),W=wA($,(F=wI(t,s,r,j,B,d,u,p,m,h))[$],r[I],s,l,a,u),F[$]+=W;let z={},K=t[$]+.5*t[I]-F[$]-o[wk[$]],G=m/2+h,Z="left"===wk[$]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(v=o.top)?v:0)+(null!=(b=o.bottom)?b:0),Y=r[I]-Z-m/2-h,q=wD(K,t[$]+m/2-(F[$]+o[wk[$]]),t[$]+t[I]-m/2-(F[$]+o[wk[$]]));return z[$]=wD(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:j.placement}}(i,E,x,_,D,c,d,S,k,C,f,m,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===o?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:p,offset:f,crossOffset:m,maxHeight:v,arrowSize:a,arrowBoundaryOffset:b});if(S.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(S.position).forEach(e=>_.style[e]=S.position[e]+"px"),_.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),r=e[x.type]-t[x.type];l.current.scrollTop+=r-x.offset}E(S)}},x);mE(_,x),mE(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wU({ref:s,onResize:_}),wU({ref:i,onResize:_});let S=(0,cf.useRef)(!1);mE(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wW||wW.addEventListener("resize",t),null==wW||wW.addEventListener("scroll",r),()=>{null==wW||wW.removeEventListener("resize",t),null==wW||wW.removeEventListener("scroll",r)}},[_]);let k=(0,cf.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cf.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=n||wV.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:g,onClose:y&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(r=null==w?void 0:w.placement)?r:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:_}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:a&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;mE(()=>{if(!t){let e,t,r,n;return 1==++wZ&&(u=hu()?(r=null,n=mw(wq(document,"touchstart",r=>{((e=ve(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wY(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),wq(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),wq(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),wq(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wG.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=mw(wq(window,"scroll",()=>{window.scrollTo(0,0)}),wY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wY(document.documentElement,"overflow","hidden"),wY(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wK&&(wK.height<window.innerHeight?requestAnimationFrame(()=>{wJ(n)}):wK.addEventListener("resize",()=>wJ(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):mw(wY(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wY(document.documentElement,"overflow","hidden"))),()=>{0==--wZ&&u()}}},[t])}({isDisabled:a||!t.isOpen}),mE(()=>{if(t.isOpen&&n.current){if(!a)return function(e,t=document.body){let r=new Set(e),n=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||e.parentElement&&n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var t;let r=null!=(t=wE.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wE.set(e,r+1))};wx.length&&wx[wx.length-1].disconnect(),o(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&o(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:r,hiddenNodes:n,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return wx.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wE.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wE.delete(e)):wE.set(e,t-1))}s===wx[wx.length-1]?(wx.pop(),wx.length&&wx[wx.length-1].observe()):wx.splice(wx.indexOf(s),1)}}([null!=(r=null==o?void 0:o.current)?r:n.current]);var e,r,i=null!=(e=null==o?void 0:o.current)?e:n.current;let t=wx[wx.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mM(d,f),arrowProps:m,underlayProps:p,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:p?d:c},e),y=n.popoverRef,v=function(e,t=!0){let[r,n]=(0,cf.useState)(!0),o=r&&t;return mE(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w0(e,o,(0,cf.useCallback)(()=>n(!1),[])),o}(y,!!g)||n.isEntering||!1,b=mB({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[E,x]=(0,cf.useState)(!1);mE(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cf.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&h5(y.current)},[E,y]);let D={...f.style,...b.style},_=cm().createElement("div",{...mM(mQ(n),f),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:y,slot:n.slot||void 0,style:D,dir:n.dir,"data-trigger":n.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!n.isNonModal&&cm().createElement(wQ,{onDismiss:e.close}),cm().createElement(ww.Provider,{value:{...h,placement:g,ref:i}},b.children),cm().createElement(wQ,{onDismiss:e.close}));return p?cm().createElement(wc,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cm().createElement(wc,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cm().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cm().createElement("div",{ref:c,style:{display:"contents"}},cm().createElement(w4.Provider,{value:c},_)))}function w5(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let w9=(0,cf.createContext)(null),w8=(0,cf.createContext)(null),w7=(0,cf.createContext)(null),Ee=(0,cf.createContext)(null),Et=(0,cf.forwardRef)(function(e,t){var r,n;[e,t]=mU(e,t,w9);let{validationBehavior:o}=mV(wy)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w1(e),[n,o]=vq(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b3(a,e.granularity),l=null!=n?n.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,p]=(0,cf.useState)(null),[f,m]=(0,cf.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let h=(null==n?void 0:n.calendar.identifier)==="gregory"&&"BC"===n.era,g=(0,cf.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,cf.useMemo)(()=>bJ(n,y,v,b,g),[n,y,v,b,g]),E=bH({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(yl(e)):yu(e,t)),p(null),m(null),E.commitValidation()};return{...E,value:n,setValue:o,dateValue:d,timeValue:f,setDateValue:t=>{let n="function"==typeof c?c():c;u?f||n?_(t,f||b1(e.defaultValue||e.placeholderValue)):p(t):(o(t),E.commitValidation()),n&&r.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):m(e)},granularity:i,hasTime:u,...r,setOpen(t){!t&&!n&&d&&u&&_(d,f||b1(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yF(e,b0(t,g)).format(l):"",getDateFormatter:(e,t)=>new yF(e,b0({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cf.useRef)(null),[l,u]=mW(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:m,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n;let o=mA(),a=mA(),i=mA(),s=yM((n=bl)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:m}=bN({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bO(t,r),g=p["aria-labelledby"]||p.id,{locale:y}=gC(),v=t.formatValue(y,{month:"long"}),b=y5(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=mQ(e),x=(0,cf.useMemo)(()=>b_(r),[r]),D=(0,cf.useRef)(!1),{focusWithinProps:_}=gt({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(a);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;D.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!D.current){var r,n;D.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}});return{groupProps:mM(E,h,p,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...p,id:i,[b$]:"presentation","aria-describedby":w,value:t.value,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[bW]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:m,buttonProps:{...b,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...mH(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cf.useState)(null),E=(0,cf.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wU({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=gr({within:!0}),S=mB({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=mQ(e);return delete k.id,cm().createElement(mF,{values:[[w7,i],[bo,{...c,ref:s,isInvalid:i.isInvalid}],[wt,p],[gd,{...f,isPressed:i.isOpen}],[wv,{...d,ref:l,elementType:"span"}],[v2,h],[wp,i],[w2,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wd,m],[gm,{slots:{description:g,errorMessage:y}}],[wm,v]]},cm().createElement("div",{...x,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),Er=(0,cf.forwardRef)(function(e,t){var r,n;[e,t]=mU(e,t,w8);let{validationBehavior:o}=mV(wy)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w1(e),[a,i]=vq(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cf.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let u=a||s,c=e=>{l(e||{start:null,end:null}),w5(e)?i(e):i(null)},[d,p]=b3((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),f="hour"===d||"minute"===d||"second"===d,m=null==(n=e.shouldCloseOnSelect)||n,[h,g]=(0,cf.useState)(null),[y,v]=(0,cf.useState)(null);u&&w5(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(yl(e.start)):yu(e.start,t.start),end:"timeZone"in t.end?t.end.set(yl(e.end)):yu(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;f?w5(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||b1(e.placeholderValue),end:(null==y?void 0:y.end)||b1(e.placeholderValue)}):g(t):w5(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{w5(h)&&w5(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(r=u.end)?void 0:r.calendar.identifier)==="gregory"&&"BC"===u.end.era,D=(0,cf.useMemo)(()=>({granularity:d,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,x]),{minValue:_,maxValue:S,isDateUnavailable:k}=e,C=(0,cf.useMemo)(()=>{var e,t;let r;return r=bZ(bJ(null!=(e=null==u?void 0:u.start)?e:null,_,S,k,D),bJ(null!=(t=null==u?void 0:u.end)?t:null,_,S,k,D)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(r=bZ(r,{isInvalid:!0,validationErrors:[(yT.getGlobalDictionaryForPackage("@react-stately/datepicker")||bY).getStringForLocale("rangeReversed",bq())],validationDetails:{...bF,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,k,D]),P=bH({...e,value:a,name:(0,cf.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:C}),O=P.displayValidation.isInvalid,R=e.validationState||(O?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:f,setDate(e,t){var r,n;"start"===e?w({start:t,end:null!=(r=null==h?void 0:h.end)?r:null}):w({start:null!=(n=null==h?void 0:h.start)?n:null,end:t})},setTime(e,t){var r,n;"start"===e?E({start:t,end:null!=(r=null==y?void 0:y.end)?r:null}):E({start:null!=(n=null==y?void 0:y.start)?n:null,end:t})},setDateTime(e,t){var r,n;"start"===e?c({start:t,end:null!=(r=null==u?void 0:u.end)?r:null}):c({start:null!=(n=null==u?void 0:u.start)?n:null,end:t})},setDateRange:w,setTimeRange:E,...o,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&w5(h)&&f&&b(h,{start:(null==y?void 0:y.start)||b1(e.placeholderValue),end:(null==y?void 0:y.end)||b1(e.placeholderValue)}),o.setOpen(t)},validationState:R,isInvalid:O,formatValue(t,r){let n;if(!u||!u.start||!u.end)return null;let o="timeZone"in u.start?u.start.timeZone:void 0,a=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=b0(r,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(o||"UTC"),d=u.end.toDate(i||"UTC"),p=new yF(t,l);if(o===i&&a===s&&0!==u.start.compare(u.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=p}else n=new yF(t,b0(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yF(e,b0({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cf.useRef)(null),[l,u]=mW(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:m,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,r){var n,o,a,i,s,l;let u=yM((l=bl)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:f,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bN({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=gC(),b=t.formatValue(v,{month:"long"}),w=y5(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},D=mA(),_=mA(),S=bO(t,r),k=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,cf.useMemo)(()=>b_(r,{accept:e=>e.id!==D}),[r,D]),P={[bI]:C,[b$]:"presentation","aria-describedby":k,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},O=mQ(e),R=(0,cf.useRef)(!1),{focusWithinProps:T}=gt({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let r=document.getElementById(_);if(!(null==r?void 0:r.contains(t.relatedTarget))){var n,o;R.current=!1,null==(n=e.onBlur)||n.call(e,t),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:t=>{if(!R.current){var r,n;R.current=!0,null==(r=e.onFocus)||r.call(e,t),null==(n=e.onFocusChange)||n.call(e,!0)}}}),N=(0,cf.useRef)(bV),j=(0,cf.useRef)(bV);return{groupProps:mM(O,S,m,w,T,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...f,onClick:()=>{C.focusFirst()}},buttonProps:{...w,id:D,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${D} ${y}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:_,"aria-labelledby":`${D} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(n=t.value)?void 0:n.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bW]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bZ(e,j.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(o=t.value)?void 0:o.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bW]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bZ(N.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=t.dateRange)?void 0:a.start)&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:c,validationErrors:d,validationDetails:p}}({...mH(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cf.useState)(null),x=(0,cf.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wU({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=gr({within:!0}),k=mB({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=mQ(e);return delete C.id,cm().createElement(mF,{values:[[Ee,i],[bo,{...c,ref:s,isInvalid:i.isInvalid}],[gd,{...m,isPressed:i.isOpen}],[wv,{...d,ref:l,elementType:"span"}],[v4,g],[wp,i],[w2,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wd,h],[wt,{slots:{start:p,end:f}}],[gm,{slots:{description:y,errorMessage:v}}],[wm,b]]},cm().createElement("div",{...D,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function En(e){return cm().createElement(gk,e)}function Eo(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof g4||e instanceof g9||e instanceof g7)return t?yc(e,t):e;{let r=d3()(e).toDate(),n=new g4(r.getFullYear(),r.getMonth()+1,r.getDate());return t?yc(n,t):n}}function Ea(e){if(e)return e.toDate(yx())}function Ei(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Es(e){let t=e??"",r=Ei(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function El(){let e=window.i18next.language,t=Ei(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;eo=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;eo=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Eu=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(eo||"en-US"),Ec=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Ed={};for(let e=1;e<100;e++)Ed[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Ep={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},Ef="[1234567890一二三四五六七八九〇\\d]",Em={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},Eh={},Eg={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Ey={zone:Eg,year:Ed,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},Ev={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(Eg).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},Eb={...Ev,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},Ew={},EE=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Eu){return Ew[t.toLowerCase()]||(Ew[t.toLowerCase()]=new e(t)),Ew[t.toLowerCase()]}constructor(e=Eu){this.locale=e,this.lookups={...Ey},this.vars={...Ev};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=Em:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(Eh[e])return Eh[e];if("fullwide"===e||"hanidec"===e)return{group:Ef,lookup:{...Em}};let t=Ep[e];if(!t)return{group:"\\d",lookup:{...Em}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return Eh[e]={group:`[${r}-${n}]`,lookup:o},Eh[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Eb)Eb.hasOwnProperty(r)&&(this.vars[r]=Eb[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[r+o+(a<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=i}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*a}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},Ex=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],ED={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},E_=()=>new Date;function ES(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var Ek=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let a=e.handler(o);if(a){for(let[e,t]of Object.entries(a))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},EC=["year","month","day","hour","minute","second","millisecond","offset"],EP={};function EO(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var ER=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],ET={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...ER],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:ER,id:ER,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function EN(e,t=Eu){let r=function(e){if(!EP[e]){var t,r;let n,o,a=EE.factory(e);EP[e]=new Ek({doneChecker:EO,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:ES(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:ES(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:ES(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Ef}{2,4})\\s*\u5E74\\s*(${Ef}{1,2})\\s*\u6708\\s*(${Ef}{1,2})\\s*\u65E5$`),handler:ES(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:ES(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:ES(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=E_(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?ED[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=E_();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:ES(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:ES(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:ES(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:ES(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:ES(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:ES(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:ES(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:ES(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:ES(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:ES(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:ES(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:ES(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:ES(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:ES(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:ES(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:ES(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:ES(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:ES(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:ES(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:ES(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:ES(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:ES(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:ES(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:ES(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:ES(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:ES(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:ES(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:ES(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:ES(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:ES(["offset"])}],o=a.baseName.slice(0,5),Ex.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(EC.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Ed[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return EP[e]}(t),n=function(e,t){let r=ET[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function Ej(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Ec(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new Ec(t.valueOf()-60*e.offset*1e3):t}function EA(e,t=Eu){let r=EN(e,t),n=r.invalid?new Ec(NaN):Ej(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function E$(e,t=Eu){return e instanceof Date?new Ec(e.valueOf()):"number"==typeof e?new Ec(e):EA(e,t)}Date.fromString=Ec.fromString=EA,Date.fromAny=Ec.fromAny=E$,"u">typeof window&&(window.anyDateParser={fromString:EA,fromAny:E$,fromObject:Ej,attempt:EN});var EI=r(5238),EM=r(3826);let EL=function(e){return null==e};function EF(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}d4.extend(d6),d4.extend(EM),d4.extend(EI);let EB="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EV(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&d4(e,EB).isValid()}function EU(e){return d4(e).isToday()}function EW(e){return EV(e)?d4(e,EB).toDate():null}function EH(e,t=!1){let r=d4(e);return t&&(r=r.utc()),r.format(EB)}function Ez(e){return d4(e).toDate()}var EK=new WeakMap;let EG=new class{register(e,t){EF(this,EK).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EF(this,EK).has(t))return EF(this,EK).get(t)}if(e.language&&EF(this,EK).has(e.language))return EF(this,EK).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EF(this,EK).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EK,{writable:!0,value:new Map})}};function EZ(e,t){EG.register(e,t)}function EY(e){let t=e??El();return EG.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let Eq={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EJ(e,t={}){let r=EN(e,El());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EL(r.day)&&EL(r.month)&&(r=Object.assign({},nr(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nr(r,"day"),{date:r.day}));let n=d4().set(r).toDate();return EL(r.year)&&(t.year=!1),EL(r.month)&&(t.month=!1),EL(r.date)&&(t.day=!1),EX(n,t)}function EX(e,t){let r,n=t?.locale??El(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...Eq,...{noToday:"am"===o.language},...t},f={calendar:a??EY(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},m=d4(e).isToday();if(m&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&c&&l&&(t=t.map(EQ("-"))),"wide"==i&&(t=t.map(EQ(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||m&&"for today"===s)&&(r+=`, ${E0(e)}`),r}let EQ=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E0(e){return e.toLocaleTimeString(El(),{hour:"2-digit",minute:"2-digit"})}function E1(e,t){return EX(e,{...t,time:!0})}function E2(e,t){let r=EY("string"==typeof t?new Intl.Locale(t):t);return r?yc(e,vU(r)):e}function E4(e,t){return new Intl.DurationFormat(El(),t).format(e)}function E3(e,t){if(null==e)return null;if("string"==typeof e){let r=EN(e,El());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nr(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nr(r,"day"),...{date:r.day}}),d4(t).set(r))}return d4(e)}let E6=["years","months","days","hours","minutes","seconds"],E5={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},E9={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function E8(e,t=d4(),r){let n,o=d4(t),a=E3(e,o);if(null==a)return null;if("string"==typeof r){let e=E5[r]??r;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?E5[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E6.indexOf(r);for(let o=0;o<E6.length;o++){let a=E6[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):E5[s]??s,function(e,t,r,n){let o=E6.indexOf(r),a=E6.indexOf(n),i=E6.slice(o,a+1),s={},l=e;for(let e of i){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(a,o,e,t??e)}let u=(n=function(e){let t={...E9};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[E5[r]??r]=n);return t}(i),o.diff(a,"seconds")<n.seconds?"seconds":o.diff(a,"minutes")<n.minutes?"minutes":o.diff(a,"hours")<n.hours?"hours":o.diff(a,"days")<n.days?"days":o.diff(a,"months")<n.months?"months":"years");return{[u]:o.diff(a,u)}}let E7={style:"short",localeMatcher:"lookup"};function xe(e,t=d4(),r){let n=E8(e,t,r);return null==n?null:E4(n,"object"==typeof r&&r.formatOptions?{...E7,...r.formatOptions}:E7)}let xt=(0,cf.createContext)(null);function xr(){let e=df({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cf.useMemo)(()=>{let t=El();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cf.useMemo)(()=>{let e=EY(t);return void 0!==e?vU(e):void 0},[t]),n=(0,cf.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cf.useMemo)(()=>r?yc(yv(yx()),r):yv(yx()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xn=new g4(1793,1,1);var xo={};function xa(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xo={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xi=r(137);function xs(e={}){let{locale:t}=gC();return(0,cf.useMemo)(()=>new(0,xi.K)(t,e),[t,e])}var xl={};function xu(e){var t;let r=(0,cf.useRef)(void 0),{value:n,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:m,onIncrementToMax:h}=e,g=yM((t=xl)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cf.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cf.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cf.useEffect)(()=>{y.current&&(mK&&mK.clear("assertive"),mG(w,"assertive"))},[w]);let E=mx(e=>{clearTimeout(r.current),null==c||c(),r.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n<i)&&E(60)},e)}),x=mx(e=>{clearTimeout(r.current),null==p||p(),r.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n>a)&&x(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:_,removeAllGlobalListeners:S}=hC();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":w,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),null==p||p());break;case"Home":m&&(e.preventDefault(),null==m||m());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),_(window,"contextmenu",D)},onPressEnd:()=>{clearTimeout(r.current),S()},onFocus:v,onBlur:b}}}xl={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};var xc=r(7120);function xd(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),a=r.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));t=Math.round(t*i),r=Math.round(r*i),n=("+"===e?t+r:t-r)/i}return n}let xp=(0,cf.createContext)(null),xf=(0,cf.createContext)(null),xm=(0,cf.forwardRef)(function(e,t){var r,n;[e,t]=mU(e,t,xp);let{validationBehavior:o}=mV(wy)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=gC(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===n||isNaN(n)?wD(a,t,r):wS(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wD(i,t,r):wS(i,t,r,n));let[d,p]=vq(a,isNaN(i)?NaN:i,s),[f,m]=(0,cf.useState)(()=>isNaN(d)?"":new(0,xi.K)(l,o).format(d)),h=(0,cf.useMemo)(()=>new(0,xc.d)(l,o),[l,o]),g=(0,cf.useMemo)(()=>h.getNumberingSystem(f),[h,f]),y=(0,cf.useMemo)(()=>new(0,xi.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cf.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cf.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bH({...e,value:d}),E=void 0===n||isNaN(n)?1:n;"percent"===v.style&&(void 0===n||isNaN(n))&&(E=.01);let[x,D]=(0,cf.useState)(d),[_,S]=(0,cf.useState)(l),[k,C]=(0,cf.useState)(o);Object.is(d,x)&&l===_&&o===k||(m(b(d)),D(d),S(l),C(o));let P=(0,cf.useMemo)(()=>h.parse(f),[h,f]),O=(e,n=0)=>{if(isNaN(P))return wS(isNaN(n)?0:n,t,r,E);{let n=wS(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:wS(xd(e,P,E),t,r,E)}},R=(0,cf.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||wS(P,t,r,E)>P||xd("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cf.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||wS(P,t,r,E)<P||xd("-",P,E)>=t),[u,c,t,r,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,r),increment:()=>{let e=O("+",t);e===d&&m(b(e)),p(e),w.commitValidation()},incrementToMax:()=>{null!=r&&(p(wS(r,t,r,E)),w.commitValidation())},decrement:()=>{let e=O("-",r);e===d&&m(b(e)),p(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),w.commitValidation())},canIncrement:R,canDecrement:T,minValue:t,maxValue:r,numberValue:P,setNumberValue:p,setInputValue:m,inputValue:f,commit:()=>{let e;if(!f.length){p(NaN),m(void 0===a?"":b(d));return}isNaN(P)?m(b(d)):(e=void 0===n||isNaN(n)?wD(P,t,r):wS(P,t,r,n),p(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cf.useRef)(null),[u,c]=mW(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:m,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,r){var n,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:p,maxValue:f,autoFocus:m,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:D,isWheelDisabled:_,...S}=e,{increment:k,incrementToMax:C,decrement:P,decrementToMin:O,numberValue:R,inputValue:T,commit:N,commitValidation:j}=t,A=yM((o=xo)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mA(i),{focusProps:I}=h9({onBlur(){N()}}),M=xs(g),L=(0,cf.useMemo)(()=>M.resolvedOptions(),[M]),F=xs({...g,currencySign:void 0}),B=(0,cf.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:V,incrementButtonProps:U,decrementButtonProps:W}=xu({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:f,minValue:p,onIncrement:k,onIncrementToMax:C,onDecrement:P,onDecrementToMin:O,value:R,textValue:B}),[H,z]=(0,cf.useState)(!1),{focusWithinProps:K}=gt({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cf.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y4(t,"wheel",n?void 0:o)}({onScroll:(0,cf.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?k():e.deltaY<0&&P())},[P,k]),isDisabled:_||u||c||!H},r);let G=(null!=(n=L.maximumFractionDigits)?n:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";hs()?Z?Y="text":G&&(Y="decimal"):hp()&&(Z?Y="numeric":G&&(Y="decimal"));let q=mQ(e),J=(0,cf.useCallback)(e=>{"Enter"===e.key?(N(),j()):e.continuePropagation()},[N,j]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:er,descriptionProps:en,errorMessageProps:eo}=function(e,t,r){let n=mx(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cf.useEffect)(()=>{if(!xa()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xa()?null:e=>{let r=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=vq(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=ge(e,t),d=bH({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bN({...e,isInvalid:p,errorMessage:e.errorMessage||f}),b=mQ(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bT(t,l,u),bj(e,d,t),(0,cf.useEffect)(()=>{if(t.current instanceof m5(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mM(b,"input"===r?w:void 0,{disabled:n,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cm().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:p,validationErrors:f,validationDetails:m}}(e,r),c=(0,cf.useRef)(null);return{inputProps:mM(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:m,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bW]:t,value:T,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:$,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,cf.useMemo)(()=>mw(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);bT(r,t.numberValue,t.setNumberValue);let ea=mM(V,I,er,{role:null,"aria-roledescription":hu()?null:A.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ea["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==r.current&&("mouse"===e.pointerType?null==(t=r.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(a=null!=e.label?et.id:e["aria-labelledby"]);let el=mA(),eu=mA(),ec=mM(U,{"aria-label":l||A.format("increase",{fieldLabel:es}).trim(),id:a&&!l?el:null,"aria-labelledby":a&&!l?`${el} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=mM(W,{"aria-label":s||A.format("decrease",{fieldLabel:es}).trim(),id:a&&!s?eu:null,"aria-labelledby":a&&!s?`${eu} ${a}`:null,"aria-controls":$,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:ea,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:eo,descriptionProps:en,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...mH(e),label:c,validationBehavior:a},s,l),b=mB({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mQ(e);return delete w.id,cm().createElement(mF,{values:[[xf,s],[bo,p],[bi,{...f,ref:l}],[wv,{...d,ref:u}],[gd,{slots:{increment:m,decrement:h}}],[gm,{slots:{description:g,errorMessage:y}}],[wm,v]]},cm().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&cm().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xh(e,t){return Number.parseInt(EX(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xg=(0,cf.forwardRef)(function(e,t){let{className:r}=e,n=(0,cf.useContext)(v3),o=(0,cf.useContext)(v6),a=n??o,i=(0,cf.useContext)(xt),s=yx(),l=EX(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xh(a.visibleRange.start.toDate(s),i),c=a.maxValue?xh(a.maxValue.toDate(s),i):void 0,d=a.minValue?xh(a.minValue.toDate(s),i):void 0,p=(0,cf.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,ph.jsxs)("span",{ref:t,className:r,children:[(0,ph.jsx)("span",{children:l}),(0,ph.jsxs)(xm,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,ph.jsx)(bs,{}),(0,ph.jsxs)(ba,{children:[(0,ph.jsx)(gp,{slot:"increment",children:(0,ph.jsx)(p3,{size:8})}),(0,ph.jsx)(gp,{slot:"decrement",children:(0,ph.jsx)(p1,{size:8})})]})]})]})}),xy="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xv="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xb="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",xw="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xE="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xx="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",xD="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",x_="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xS({children:e}){let t=(0,cf.useContext)(w7),r=(0,cf.useContext)(Ee),n=t??r,o=dK(()=>n?.close());return(0,ph.jsx)(wf,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xk=(0,cf.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,ph.jsx)(w3,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,ph.jsx)(xS,{children:(0,ph.jsxs)(a?v9:v5,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,ph.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,ph.jsx)(gp,{className:py()(xE,xx),slot:"previous",children:(0,ph.jsx)(ft,{size:16})}),(0,ph.jsx)(xg,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,ph.jsx)(gp,{className:py()(xE,xx),slot:"next",children:(0,ph.jsx)(fr,{size:16})})]}),(0,ph.jsx)(v7,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,ph.jsx)(bn,{className:py()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xC=(0,cf.forwardRef)(function(e,t){let r=(0,cf.useContext)(w7),[n,o]=mU({slot:e.slot},t,wt),{locale:a}=gC(),i=b7({...n,locale:a,createCalendar:vU}),s=(0,cf.useRef)(null),{fieldProps:l,inputProps:u}=bM({...n,inputRef:s},i,o),c=(0,cf.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,ph.jsxs)(mF,{values:[[wr,i],[bi,{...u,ref:s}],[bo,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,ph.jsx)(ba,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,r)=>(0,cf.cloneElement)(e.children(t),{key:r}))}),(0,ph.jsx)(bs,{})]})}),xP=(0,cf.forwardRef)(function(e,t){let r=(0,cf.useContext)(w7),n=(0,cf.useContext)(Ee);return(r??n).isInvalid?(0,ph.jsx)(mu,{ref:t,size:16,...e}):(0,ph.jsx)(p0,{ref:t,size:16,...e})});class xO{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xR=new Map,xT=(0,cf.forwardRef)(function({segment:e,...t},r){let n=(0,cf.useContext)(wr),o=mb(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cf.useRef)(""),{locale:l,direction:u}=gC(),c=function(){var e;let{locale:t}=gC(),r=yI((e=bl)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cf.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xO(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:m}=bA.get(t),h=e.isPlaceholder?"":e.text,g=(0,cf.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yz({month:"long",timeZone:g.timeZone}),v=yz({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=xu({value:e.value,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,cf.useMemo)(()=>new(0,xc.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&m.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:x}=(n=function(e){let{locale:t}=gC(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xR.has(r))return xR.get(r);let n=new Intl.Collator(t,e);return xR.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cf.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),a=(0,cf.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),i=(0,cf.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let a=e.slice(r,r+o);if(0===n.compare(t,a))return!0}return!1},[n]),(0,cf.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yz({hour:"numeric",hour12:!0}),_=(0,cf.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cf.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),k=yz({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,cf.useMemo)(()=>{if("era"!==e.type)return[];let r=yc(new g4(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[k,t.calendar,e.type]),P=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(x(_,r))t.setSegment("dayPeriod",0);else if(x(S,r))t.setSegment("dayPeriod",12);else break;m.focusNext();break;case"era":{let e=C.find(e=>x(e.formatted,r));e&&(t.setSegment("era",e.era),m.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),a=o,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=w.parse(r));break;case"h12":i=!1,o>12&&(a=w.parse(r))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=w.parse(r));if(isNaN(o))return;let l=0!==a||i;l&&t.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",l&&m.focusNext()):s.current=n}}};y4((0,cf.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=r.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(r.current)});let O=(0,cf.useRef)("");y4(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":O.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&P(n.data)}}),y4(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=O.current),null!=n&&(x(_,n)||x(S,n))&&P(n))}),mE(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=hu()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cf.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let T=mA(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=yQ({"aria-label":`${j}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:mM(b,A,{id:T,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(cm().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(hi()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),E()}},onFocus:()=>{s.current="",r.current&&y7(r.current,{containingElement:ve(r.current)});let e=window.getSelection();null==e||e.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:i,isFocused:s,isFocusVisible:l}=gr(),{hoverProps:u,isHovered:c}=gs({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cf.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:i||{}}):r,u="function"==typeof n?n({...s,defaultChildren:a}):null==n?a:n,{className:e??o,style:l||i?{...i,...l}:void 0,children:u??a,"data-rac":""}},[t,r,n,o,a,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,cf.useCallback)(e=>{e.stopPropagation()},[]);return(0,ph.jsx)("span",{...mM(mQ(t),a,i,u),...d,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),xN={short:!1,size:"md"},xj=(0,cf.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:m,short:h,size:g,value:y,...v}={...xN,...e},{calendar:b,intlLocale:w,today_:E}=xr(),x=(0,cf.useId)(),D=!!(u??l),_=(0,cf.useMemo)(()=>Eo(n,b),[n,b]),S=(0,cf.useMemo)(()=>Eo(y,b,!0),[y,b]),k=(0,cf.useMemo)(()=>Eo(d,b),[d,b]),C=(0,cf.useMemo)(()=>Eo(p??xn,b),[p,b]),P=(0,cf.useMemo)(()=>a||s,[a,s]),O=(0,cf.useMemo)(()=>(m&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>f?.(Ea(e)))),[m,f]);return(0,ph.jsx)(En,{locale:w.toString(),children:(0,ph.jsx)("div",{className:py()("cds--form-item",r),children:(0,ph.jsx)(mF,{values:[[xt,w]],children:(0,ph.jsxs)(Et,{className:py()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:o,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:O,children:[(0,ph.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,ph.jsx)(wb,{className:py()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,ph.jsxs)(ba,{className:xy,children:[(0,ph.jsx)(xC,{id:D?x:void 0,ref:t,className:py()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-cohort-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-cohort-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-cohort-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,ph.jsx)(xT,{className:xv,segment:e}):(0,ph.jsx)(cm().Fragment,{})}),(0,ph.jsx)(gp,{className:py()(xE,{[xD]:"sm"===g,[xx]:"md"===g||!g||0===g.length,[x_]:"lg"===g}),children:(0,ph.jsx)(xP,{})})]}),(0,ph.jsx)(wh,{className:xw,children:i})]}),(0,ph.jsx)(xk,{variant:"single",today_:E})]})})})})}),xA=(0,cf.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:m,...h},g){let{calendar:y,intlLocale:v,today_:b}=xr(),w=(0,cf.useId)(),E=!!(s??i),x=(0,cf.useMemo)(()=>{if(m)return{start:Eo(m[0],y,!1),end:Eo(m[1],y,!1)}},[m,y]),D=(0,cf.useMemo)(()=>{if(t)return{start:Eo(t[0],y,!1),end:Eo(t[1],y,!1)}},[t,y]),_=(0,cf.useMemo)(()=>Eo(c??xn,y,!0),[c,y]),S=(0,cf.useMemo)(()=>Eo(u,y,!0),[u,y]),k=(0,cf.useMemo)(()=>r||a,[r,a]),C=(0,cf.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([Ea(e.start),Ea(e.end)]))),[p,d]);return(0,ph.jsx)(En,{locale:v.toString(),children:(0,ph.jsx)("div",{className:py()("cds--form-item",e),children:(0,ph.jsx)(mF,{values:[[xt,v]],children:(0,ph.jsx)(Er,{id:E?w:void 0,className:py()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:o,...h,onChange:C,children:(0,ph.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,ph.jsx)(wb,{className:py()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,ph.jsxs)(ba,{className:xy,children:[(0,ph.jsxs)("div",{className:py()("-esm-cohort-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-cohort-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===f,"-esm-cohort-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===f||!f||0===f.length,"-esm-cohort-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===f}),children:[(0,ph.jsx)(wo,{className:py()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xb),slot:"start",children:e=>(0,ph.jsx)(xT,{className:xv,segment:e})}),(0,ph.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,ph.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,ph.jsx)(wo,{className:py()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xb),slot:"end",children:e=>(0,ph.jsx)(xT,{className:xv,segment:e})})]}),(0,ph.jsx)(gp,{className:py()(xE,{[xD]:"sm"===f,[xx]:"md"===f||!f||0===f.length,[x_]:"lg"===f}),children:(0,ph.jsx)(xP,{})})]}),(0,ph.jsx)(wh,{className:xw,children:n}),(0,ph.jsx)(xk,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),x$=({diagnoses:e})=>{let{diagnosisTags:t}=df({externalModuleName:"@openmrs/esm-styleguide"});return(0,ph.jsx)("div",{className:"-esm-cohort-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,a=t[1===r?"primaryColor":"secondaryColor"];return(0,ph.jsx)(px.Tag,{type:a,children:o},n)})})},xI={action:"-esm-cohort-builder__empty-card-module__action___l4wUo",content:"-esm-cohort-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-cohort-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-cohort-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-cohort-builder__empty-card-module__tile___vS3Sj"},xM=({width:e="64",height:t="64"})=>(0,ph.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,ph.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xL=e=>{let t="tablet"===dB(),r=e.launchForm;return(0,ph.jsx)(px.Layer,{className:xI.layer,children:(0,ph.jsxs)(px.Tile,{className:xI.tile,children:[(0,ph.jsx)("div",{className:t?xI.tabletHeading:xI.desktopHeading,children:(0,ph.jsx)("h4",{children:e.headerTitle})}),(0,ph.jsx)(xM,{}),(0,ph.jsx)("p",{className:xI.content,children:iW("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,ph.jsx)("p",{className:xI.action,children:r&&(0,ph.jsx)(px.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iW("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xF=({error:e,headerTitle:t})=>{let r="tablet"===dB();return(0,ph.jsx)(px.Layer,{children:(0,ph.jsxs)(px.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,ph.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,ph.jsx)("h4",{children:t})}),(0,ph.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iW("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,ph.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iW("errorCopy")})]})})},xB=xF,xV=cm().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dW(),i=window.location??{pathname:""},s=cP(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,ph.jsxs)(px.SideNav,{"aria-label":iW("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,ph.jsx)(cT,{name:"global-nav-menu-slot"}),r?(0,ph.jsx)(dr,{value:o,fallback:(0,ph.jsx)(cT,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,ph.jsx)(ch.Provider,{value:o,children:(0,ph.jsx)(cT,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),xU=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cf.useState)(""),s=(0,cf.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dy()(t,i5,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cf.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:m}=function(e,t=0,r=""){let n=dh(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dN()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let a=`${i4}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),r&&i.append("_getpagesoffset",""+r*t),e&&i.append("_tag",e),"string"==typeof n&&""!==n&&i.append("name:contains",n),a+i.toString()},i5);return(0,cf.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(r,n,a),h=(0,cf.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cf.useCallback)(e=>{o(),i(e.trim())},[o]),y=dG((0,cf.useCallback)(()=>{!p&&d&&m(e=>e+1)},[p,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)(px.Search,{"aria-describedby":f?`${s}-error`:void 0,labelText:iW("searchForLocation"),id:s,placeholder:iW("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,ph.jsx)(px.InlineNotification,{kind:"error",subtitle:iW("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iW("error","Error")})}),(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,ph.jsx)(px.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,ph.jsx)(px.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,ph.jsx)(px.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,ph.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,ph.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iW("noResultsToDisplay")})})}),p&&(0,ph.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,ph.jsx)(px.InlineLoading,{description:iW("loading")})})]})})]})},xW=F("modalState",{modalContainer:null,modalStack:[]}),xH=0;async function xz(e,t,r={}){let n=u0(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=xH++;o=await cu({...i,name:`${t}-${s}`},{...r,domElement:e})}else k(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function xK(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xG(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xZ(e){return e.find(e=>!xK(e))}function xY(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xq=window.getComputedStyle(document.body).overflow;function xJ({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xQ),document.body.style.overflow="hidden",t.style.visibility="unset");let r=xZ(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",xz(r,e.modalName,e.props).then(n=>{xK(e)?xG(e.modalName,n):n?(e.parcel=n,t.prepend(r),xY(e,xZ(xW.getState().modalStack)===e),n.mountPromise.then(()=>{xK(e)||(e.state="MOUNTED")},t=>{k(t),e.parcel=null,xX(e)})):xX(e)},t=>{k(t),xX(e)});break}case"MOUNTING":case"MOUNTED":xY(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xG(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xW.getState();xW.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xq,removeEventListener("keydown",xQ)}function xX(e){if(xK(e))return;e.state="TO_BE_DELETED";let t=xW.getState();xW.setState({...t,modalStack:[...t.modalStack]})}function xQ(e){"Escape"===e.key&&function(){let[e]=xW.getState().modalStack;e&&xX(e)}()}function x0(e){xW.subscribe(xJ),xW.setState({...xW.getState(),modalContainer:e})}function x1(e,t={},r=()=>{}){let n=()=>{let e=xW.getState().modalStack.find(e=>e.onClose===r);e&&xX(e)};if(u0(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=xW.getState()).modalStack],xW.setState({...a,modalStack:i})}else k(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var x2=Object.prototype.hasOwnProperty;let x4=function(e){if(null==e)return!0;if(tr(e)&&(te(e)||"string"==typeof e||"function"==typeof e.splice||ti(e)||th(e)||e7(e)))return!e.length;var t=rm(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e4(e))return!t3(e).length;for(var r in e)if(x2.call(e,r))return!1;return!0},x3=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,ph.jsx)(px.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},x6=({subject:e})=>{let[t,r]=(0,cf.useState)([]);return(0,cf.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ph.jsx)(ph.Fragment,{children:t.map(e=>(0,ph.jsx)(x3,{notification:e},e.id))})},x5=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cf.useState)(t);return(0,ph.jsx)(px.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iW("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iW("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},x9=({subject:e})=>{let[t,r]=(0,cf.useState)([]);return(0,cf.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ph.jsx)(ph.Fragment,{children:t.map(e=>(0,ph.jsx)(x5,{notification:e},e.id))})};class x8{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"listeners",new Set)}}let x7=new x8,De=0,Dt=new x8,Dr=0;function Dn(e){e&&(0,cN.createRoot)(e).render((0,ph.jsx)(x6,{subject:x7}))}function Do(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!x4(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{x7.next({...e,id:De++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function Da(e){e&&(0,cN.createRoot)(e).render((0,ph.jsx)(x9,{subject:Dt}))}function Di(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!x4(t))?setTimeout(()=>{Dt.next({...e,id:Dr++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Ds=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Dl=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Du={container:"-esm-cohort-builder__numeric-observation-module__container___+Kqi9",card:"-esm-cohort-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-cohort-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-cohort-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-cohort-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-cohort-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-cohort-builder__numeric-observation-module__critically-low___h9797",high:"-esm-cohort-builder__numeric-observation-module__high___0-YpP",low:"-esm-cohort-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-cohort-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-cohort-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-cohort-builder__numeric-observation-module__label___0DGA5",value:"-esm-cohort-builder__numeric-observation-module__value___ohqoh",units:"-esm-cohort-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-cohort-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-cohort-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-cohort-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-cohort-builder__numeric-observation-module__arrow___Agoh9"},Dc=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cf.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i2}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i2}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dy()(r,i5),i=n?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||n?void 0:a,s),d=o??u,p=(0,cf.useMemo)(()=>{if(n)return n?"--"===n?"normal":Ds.includes(n)?n.toLowerCase():Dl.includes(n)?n:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[n,d,e,c])??"normal",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,m="normal"!==p,h=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:iW("notAvailable","Not available"),w=py()({[Du["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[Du["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[Du.low]:"low"===p,[Du.high]:"high"===p,[Du["off-scale-low"]]:"off_scale_low"===p,[Du["off-scale-high"]]:"off_scale_high"===p}),E=py()({[Du.container]:!0,[Du.card]:!0,[Du["critical-value"]]:f,[Du["abnormal-value"]]:m&&!f}),x=py()({[Du.cell]:!0,[w]:!0});return"cell"===i?(0,ph.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,ph.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,ph.jsxs)("div",{className:Du["label-container"],children:[(0,ph.jsx)("span",{id:h,className:Du.label,children:r}),m&&(0,ph.jsx)("span",{className:Du[p.replace("_","-")],title:iW("abnormalValue","Abnormal value")})]}),(0,ph.jsxs)("div",{className:Du["value-container"],children:[(0,ph.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Du.value,children:b}),v&&t&&(0,ph.jsx)("span",{id:y,className:Du.units,children:t})]})]})},Dd="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",Dp=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,ph.jsx)("div",{className:py()(Dd,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,ph.jsx)("div",{className:py()(Dd,n),...o,children:(0,ph.jsx)(Df,{title:t,illustration:r})})}},Df=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cf.useState)(null);return(0,cf.useEffect)(()=>{nK("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,ph.jsxs)("div",{className:py()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,ph.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,ph.jsx)("p",{children:iW(n.implementationName)}),(0,ph.jsx)("p",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},Dm=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dq(t,e,n,a),u="tablet"===dB(),c=iW("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,ph.jsx)(ph.Fragment,{children:e>0&&(0,ph.jsxs)("div",{className:py()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,ph.jsxs)("div",{children:[c,o&&(0,ph.jsx)(cg,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iW("seeAll","See all")})]}),(0,ph.jsx)(px.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iW("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Dh(e){return Dy(Db(e,"usual","official"))}function Dg(e){return Dh(e)}function Dy(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Dv(e){return Dy(e)}function Db(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function Dw(e,t=d4()){let r=d4(t),n=E3(e,r);if(null==n)return null;let o=r.diff(n,"hours"),a=r.diff(n,"days"),i=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(a<2)u.hours=o;else if(i<4)u.days=a;else if(l<1){let e=r.subtract(i,"weeks").diff(n,"days");u.weeks=i,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DE(e,t=d4()){let r=Dw(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E4(r,n)}let Dx={container:"-esm-cohort-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-cohort-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-cohort-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-cohort-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-cohort-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-cohort-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-cohort-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-cohort-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-cohort-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-cohort-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-cohort-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-cohort-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-cohort-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-cohort-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-cohort-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-cohort-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-cohort-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-cohort-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-cohort-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function DD({showIdentifierLabel:e,type:t,value:r}){return(0,ph.jsx)("span",{className:Dx.primaryIdentifier,children:(0,ph.jsxs)(px.Tag,{className:Dx.tag,type:"gray",children:[e&&t?.text&&(0,ph.jsxs)("span",{className:Dx.label,children:[t.text,": "]}),(0,ph.jsx)("span",{className:Dx.value,children:r})]})})}function D_({showIdentifierLabel:e,type:t,value:r}){return(0,ph.jsxs)(px.FormLabel,{className:Dx.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,ph.jsxs)("span",{className:Dx.label,children:[t?.text,": "]}),(0,ph.jsx)("span",{className:Dx.value,children:r})]})}function DS({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=df(),{primaryIdentifierCode:n}=dQ(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,ph.jsx)(ph.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,ph.jsxs)(cm().Fragment,{children:[(0,ph.jsx)("span",{className:Dx.identifier,children:r?.coding?.[0]?.code===n?(0,ph.jsx)(DD,{showIdentifierLabel:t,type:r,value:e}):(0,ph.jsx)(D_,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,ph.jsx)("span",{className:Dx.separator,children:"\xb7"})]},e)):""})}let Dk={Female:fm,Male:fh,Other:fg,Unknown:fy},DC=({gender:e})=>{let t=Dk[e];return t?(0,ph.jsx)(t,{fill:"#525252"}):null},DP={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function DO({patient:e,renderedFrom:t}){var r;let n,o,a=Dh(e),i=e?.gender&&(o=DP[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iW(n,r),iconKey:o}),s=(0,cf.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,ph.jsxs)("div",{className:Dx.patientInfo,children:[(0,ph.jsx)("div",{className:py()(Dx.row,Dx.patientNameRow),children:(0,ph.jsxs)("div",{className:Dx.flexRow,children:[(0,ph.jsx)("span",{className:Dx.patientName,children:a}),i&&(0,ph.jsxs)("div",{className:Dx.gender,children:[(0,ph.jsx)(DC,{gender:i.iconKey}),(0,ph.jsx)("span",{children:i.displayText})]}),(0,ph.jsx)(cT,{className:Dx.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,ph.jsxs)("div",{className:Dx.demographics,children:[e.birthDate&&(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)("span",{children:DE(e.birthDate)}),(0,ph.jsx)("span",{className:Dx.separator,children:"\xb7"}),(0,ph.jsx)("span",{children:EJ(e.birthDate,{time:!1})}),(0,ph.jsx)("span",{className:Dx.separator,children:"\xb7"})]}),(0,ph.jsx)(DS,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,ph.jsx)(cT,{className:Dx.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DR=r(1673);function DT({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cf.useState)(!1),{extensions:i}=cO(r),s="tablet"===dB(),l=dK(()=>a(!1),o),u=(0,cf.useRef)(null),c=(0,cf.useRef)(null),d=(0,cf.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,m=(0,cf.useCallback)(()=>a(e=>!e),[]),h=(0,cf.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cf.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),a=o<0?t.length-1:o>=t.length?0:o;t[a]?.focus()}},[h,o]);(0,cf.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cf.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,ph.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,ph.jsxs)("div",{"data-overflow-menu":!0,className:py()("cds--overflow-menu",pS),ref:l,children:[(0,ph.jsxs)("button",{className:py()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},pP),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:m,onKeyDown:g,ref:u,children:[(0,ph.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iW("actions","Actions")})," ",(0,ph.jsx)(DR.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,ph.jsxs)("div",{className:py()("cds--overflow-menu-options","cds--overflow-menu--flip",pk,{[pC]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,ph.jsx)("ul",{className:py()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,ph.jsx)(cT,{name:r,state:y},r)}),(0,ph.jsx)("span",{})]})]})})}var DN=r(6767),Dj=r.n(DN);function DA(e){let{patientPhotoConceptUuid:t}=df({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i2}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cZ()(e?r:null,i5),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let D$=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cK.useTranslation)();return(0,ph.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ph.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,ph.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},DI="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function DM({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DA(e),[a,i]=(0,cf.useState)(null),[s,l]=(0,cf.useState)(!1),u=(0,cf.useMemo)(()=>Dj().generate(e),[e]);(0,cf.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(i(e),l(!1))},r.onerror=()=>{t||(i(null),l(!1))},r.src=e,()=>{t=!0}}i(null),l(!1)},[n?.imageSrc]);let c=(0,cf.useMemo)(()=>r||(a?iW("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iW("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,ph.jsx)(px.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,ph.jsx)(D$,{"aria-label":iW("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,ph.jsx)("div",{"aria-label":c,children:(0,ph.jsx)("img",{className:DI,src:a,alt:c,title:t})}):(0,ph.jsx)("div",{"aria-label":c,children:(0,ph.jsx)("div",{className:DI,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,ph.jsx)("span",{className:"-esm-cohort-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let DL=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],DF=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),DB=DF,DV=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),DU=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),DW=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),DH=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Dz=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),DK=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),DG=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),DZ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),DY=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Dq=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),DJ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),DX=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),DQ=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),D0=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),D1=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),D2=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),D4=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),D3=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),D6=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),D5=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),D9=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),D8=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),D7=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_e=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),_t=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_r=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_n=(0,cf.memo)((0,cf.forwardRef)(function(e,t){return(0,ph.jsx)(_s,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_o=DY,_a=D3,_i=(0,cf.memo)((0,cf.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cf.useRef)(document.getElementById(e));return(0,cf.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,ph.jsx)(dr,{value:o.current,fallback:t,children:(0,ph.jsx)(_s,{ref:n,pictogram:e,pictogramProps:r})})})),_s=(0,cf.memo)((0,cf.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,ph.jsx)("svg",{ref:r,className:py()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,ph.jsx)("use",{href:`#${e}`})})})),_l=({children:e})=>"tablet"===dB()?(0,ph.jsx)(px.Layer,{children:e}):(0,ph.jsx)(ph.Fragment,{children:e}),_u=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==n,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,m]=(0,cf.useState)(r),[h,g]=(0,cf.useState)(!0),[y,v]=(0,cf.useState)(!1),b=(0,cf.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cf.useCallback)(()=>{v(!0),b()},[b]);return(0,cf.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cf.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,ph.jsx)(px.ActionableNotification,{actionButtonLabel:f,"aria-label":iW("closeSnackbar","Close snackbar"),className:py()("-esm-cohort-builder__snackbar-module__slideIn___TqSN-",{"-esm-cohort-builder__snackbar-module__animated___+XPKT":h,"-esm-cohort-builder__snackbar-module__slideOut___1cFIY":y}),kind:n,lowContrast:a,onActionButtonClick:()=>{o(),w(),i&&m(i)},onClose:b,statusIconDescription:iW("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},_c=({subject:e})=>{let[t,r]=(0,cf.useState)([]),n=(0,cf.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cf.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ph.jsx)(ph.Fragment,{children:t.map(e=>(0,ph.jsx)(_u,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_d=new x8,_p=0;function _f(e){e&&(0,cN.createRoot)(e).render((0,ph.jsx)(_c,{subject:_d}))}function _m(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_d.next({...e,id:_p++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _h=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cf.useCallback)(()=>{s(),t()},[t,s]);return(0,ph.jsx)("div",{children:(0,ph.jsx)(px.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_g=({subject:e})=>{let[t,r]=(0,cf.useState)([]),n=(0,cf.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cf.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,ph.jsx)(ph.Fragment,{children:t.map(e=>(0,ph.jsx)(_h,{toast:e,closeToast:()=>n(e)},e.id))})},_y=new x8,_v=0;function _b(e){e&&(0,cN.createRoot)(e).render((0,ph.jsx)(_g,{subject:_y}))}function _w(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!x4(t))?setTimeout(()=>{_y.next({...e,id:_v++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function _E(e,t=!1){if(t)return!0;let r=_k[e];return!r||!r()}function _x(e,t){let r=_A.getState()?.workspaceGroup,n=r?.name;n&&e===n&&_L(()=>{let n=_W(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),_A.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function _D(e,t){let{name:r,additionalProps:n}=t;u5(r);let o=()=>{_T(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>__(r,n),closeWorkspaceGroup:!1})};_E(e.name)?o():_B("closing-workspace-launching-new-workspace",o,e.title??e.name)}function __(e,t){let r=u5(e),n=_A.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void _x(n.name,()=>{__(e,t)});let o=_A.getState().workspaceGroup?.name,a={...r,title:_V(r,t),closeWorkspace:(t={})=>_T(e,t),closeWorkspaceWithSavedChanges:t=>_T(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(_k[r]=n)},setTitle:(t,r)=>{a.title=t,a.titleNode=r,_A.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?a:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function i(e,t){_A.setState(r=>{let n=[e,...t??r.openWorkspaces],o=_M(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&_W(o,t);let s=_A.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==a.type);if(0===s.length)i(a);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];i({...t,additionalProps:a.additionalProps,...t.title===_V(t,t.additionalProps)&&{title:_V(a,a.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,_A.getState().openWorkspaces.filter(e=>e.type!=a.type)),_D(u,{name:e,additionalProps:t})):i(a);else _D(s[0],{name:e,additionalProps:t})}function _S({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){_N(t),__(r,n),iK({to:e})}let _k={};function _C(e,t){_k[e]=t}function _P(e){return _k[e]}function _O(){let e=_A.getState();_A.setState({...e,prompt:null})}let _R={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function _T(e,t={}){t={..._R,...t};let r=()=>{let r=_A.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=_A.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&_x(o),_k[e]=()=>!1,_A.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:_M(n?.[0])})),t?.onWorkspaceClose?.()};return _E(e,t?.ignoreChanges)?(r(),!0):(_B("closing-workspace",r,u5(e).title??e),!1)}function _N(e){_A.getState().context!=e&&_A.setState({context:e,openWorkspaces:[],prompt:null})}let _j={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},_A=F("workspace",_j);function _$(){return _A}function _I(e){let t=_A.getState();_A.setState({...t,workspaceWindowState:e})}function _M(e){return e?.preferredWindowSize??"normal"}function _L(e=()=>{},t=()=>!0){let r=_A.getState().openWorkspaces.filter(t).every(({name:e})=>_E(e)),n=()=>{_U(),e?.()};r?n():_B("closing-all-workspaces",n)}function _F(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=cE(_A);return(0,cf.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function _B(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:iW("unsavedChangesTitleText","Unsaved changes"),body:iW("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:iW("discard","Discard")};break;case"closing-all-workspaces":{let e=_A.getState().openWorkspaces.filter(({name:e})=>!_E(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:iW("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:iW("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:iW("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:iW("unsavedChangesTitleText","Unsaved changes"),body:iW("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{_A.setState(e=>({...e,prompt:null})),t?.()},confirmText:iW("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}_A.setState(e=>({...e,prompt:n}))}function _V(e,t){return t?.workspaceTitle??e.title}function _U(){_A.setState(_j)}function _W(e,t={}){if(!e||"default"===e)return;let r=V(e,{});return t&&r.setState(e=>({...e,...t})),r}let _H="-esm-cohort-builder__action-menu-button-module__container___Uwne-",_z="-esm-cohort-builder__action-menu-button-module__elementContainer___vWkQO",_K="-esm-cohort-builder__action-menu-button-module__active___D7Idw";function _G({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,ph.jsxs)(ph.Fragment,{children:[e({size:16}),t?(0,ph.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,ph.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__countTag___XJRiM",children:r})]})}let _Z=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:a})=>{let i=dB(),{workspaces:s,workspaceWindowState:l}=_F(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===i||"phone"===i?(0,ph.jsxs)(px.Button,{className:py()(_H,{[_K]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,ph.jsx)("span",{className:_z,children:(0,ph.jsx)(_G,{formOpenInTheBackground:d,getIcon:e,tagContent:a})}),(0,ph.jsx)("span",{children:t})]}):(0,ph.jsx)(px.IconButton,{align:"left","aria-label":r,className:py()(_H,{[_K]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,ph.jsx)("div",{className:_z,children:(0,ph.jsx)(_G,{formOpenInTheBackground:d,getIcon:e,tagContent:a})})})};var _Y=r(4535),_q=r(771),_J=/[\\^$.*+?()[\]{}|]/g,_X=RegExp(_J.source);let _Q=function(e){return(e=r0(e))&&_X.test(e)?e.replace(_J,"\\$&"):e};function _0({contextKey:e}){let{prompt:t}=_F();return(0,cf.useEffect)(()=>{RegExp(`/${_Q(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,cf.useEffect)(()=>(_N(e),()=>{_N(null)}),[e]),(0,cf.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${_Q(e)}(/|$)`),a=new URL(n),i=o.test(a.pathname),s=_A.getState().openWorkspaces.every(({name:e})=>_E(e));i||(s?_U():(r?.(),_L(()=>{iK({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,ph.jsxs)(px.ComposedModal,{open:!0,onClose:_O,children:[(0,ph.jsx)(px.ModalHeader,{title:t.title}),(0,ph.jsx)(px.ModalBody,{children:(0,ph.jsx)("p",{className:"-esm-cohort-builder__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,ph.jsxs)(px.ModalFooter,{children:[(0,ph.jsx)(px.Button,{kind:"secondary",onClick:_O,children:t.cancelText??iW("cancel")}),(0,ph.jsx)(px.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??iW("confirm")})]})]}):null}function _1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_1(Object(r),!0).forEach(function(t){_3(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_1(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _4(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _6(e){return(_6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _5(e,t){return(_5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _9(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _8=function(e){var t=cf.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&_5(i,t);var r,n,o,a=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=_6(i);e=r?Reflect.construct(t,arguments,_6(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return _9(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),_3(_9(t=a.call(this,e)),"handleRef",function(e){t.el=e}),_3(_9(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),_3(_9(t),"getParcelProps",function(){var e=_2(_2({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,_2({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return cL&&cL.Consumer?cf.createElement(cL.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cL&&cL.Consumer?cf.createElement(cL.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cf.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],_4(i.prototype,n),o&&_4(i,o),i}();_3(_8,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function _7({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,cf.useState)(),o=function(e){let[t,r]=(0,cf.useState)({}),[n,o]=(0,cf.useState)(e);return(0,cf.useEffect)(()=>{n!==e&&o(e)},[e]),(0,cf.useEffect)(()=>{let e,t=_W(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,cf.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let a=(0,cf.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,ph.jsx)(_8,{config:r,mountParcel:cd,...a},e.name):(0,ph.jsx)(px.InlineLoading,{className:"-esm-cohort-builder__workspace-module__loader___v7QFg",description:`${iW("loading","Loading")} ...`})}function Se({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,cf.useState)(!1),a=(0,cf.useRef)(window.innerHeight),{featureName:i}=(0,cf.useContext)(ch),s=dB();(0,cf.useEffect)(()=>{let e=()=>{o(!dV(s)&&a.current>window.innerHeight),a.current!=window.innerHeight&&(a.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a]);let l=`action-menu-${t&&"default"!=t?t:i}-items-slot`;return(0,ph.jsx)("aside",{className:py()("-esm-cohort-builder__action-menu-module__sideRail___Aa96v",{"-esm-cohort-builder__action-menu-module__withinWorkspace___2bJET":e,"-esm-cohort-builder__action-menu-module__sideRailHidden___Yb0w9":n,"-esm-cohort-builder__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,ph.jsx)("div",{className:"-esm-cohort-builder__action-menu-module__container___mzfAh",children:(0,ph.jsx)(cT,{className:"-esm-cohort-builder__action-menu-module__chartExtensions___DiJtm",name:l,state:r})})})}function St({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let a=dB(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=_F(),u=l?.name,c=i[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,cf.useMemo)(()=>r||u&&!d,[u,d,r]);return dc(!d&&!dV(a)),(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsxs)("div",{className:r?"-esm-cohort-builder__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-cohort-builder__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,ph.jsx)("aside",{className:py()(t?"-esm-cohort-builder__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-cohort-builder__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-cohort-builder__workspace-module__hiddenRelative___qqT-4":d,"-esm-cohort-builder__workspace-module__narrowWorkspace___MMI1u":"narrow"===p,"-esm-cohort-builder__workspace-module__widerWorkspace___be-UT":"wider"===p,"-esm-cohort-builder__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===p}),children:(0,ph.jsx)("div",{className:py()("-esm-cohort-builder__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-cohort-builder__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-cohort-builder__workspace-module__hiddenFixed___48wS9":d}),children:i.map((e,t)=>(0,ph.jsx)("div",{className:py()("-esm-cohort-builder__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-cohort-builder__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,ph.jsx)(cf.Suspense,{fallback:null,children:(0,ph.jsx)(cK.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,ph.jsx)(Sr,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,ph.jsx)(_0,{contextKey:e})]}),f&&(0,ph.jsx)(Se,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function Sr({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,cK.useTranslation)(),n=dB(),{workspaceWindowState:o,workspaceGroup:a}=_F(),i=a?.name,s="maximized"===o;(0,cf.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,cf.useContext)(ch),u=(0,cf.useCallback)(()=>{_I(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,cf.useMemo)(()=>e??{},[e]),m=(0,cf.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsxs)(px.Header,{"aria-label":iW("workspaceHeader","Workspace Header"),className:"-esm-cohort-builder__workspace-module__header___nACZO",children:[!dV(n)&&!c&&(0,ph.jsx)(px.HeaderMenuButton,{"aria-label":iW("close","Close"),renderMenuIcon:(0,ph.jsx)(pY,{}),onClick:()=>f()}),(0,ph.jsx)(px.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,ph.jsx)("div",{className:"-esm-cohort-builder__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,ph.jsxs)(px.HeaderGlobalBar,{className:"-esm-cohort-builder__workspace-module__headerButtons___heP0Q",children:[(0,ph.jsx)(cT,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,ph.jsx)(cT,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,ph.jsx)(cT,{name:`workspace-header-${l}-slot`,state:m}),dV(n)&&(0,ph.jsxs)(ph.Fragment,{children:[(d||s)&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":s?iW("minimize","Minimize"):iW("maximize","Maximize"),onClick:u,children:s?(0,ph.jsx)(_Y.Xj,{}):(0,ph.jsx)(_Y.hz,{})}),c&&!i?(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("hide","Hide"),onClick:()=>_I("hidden"),children:(0,ph.jsx)(pq,{})}):(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("close","Close"),onClick:()=>f?.(),children:(0,ph.jsx)(fo,{})})]}),"tablet"===n&&c&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("close","Close"),onClick:()=>f?.(),children:(0,ph.jsx)(_q.d3,{})})]})]}),(0,ph.jsx)("div",{className:py()("-esm-cohort-builder__workspace-module__workspaceContent___oYdxI",{"-esm-cohort-builder__workspace-module__marginWorkspaceContent___7hwHu":!!p}),children:(0,ph.jsx)(_7,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let Sn="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),So=new Uint8Array(16),Sa=[];for(let e=0;e<256;++e)Sa.push((e+256).toString(16).slice(1));let Si=function(e,t,r){if(Sn&&!t&&!e)return Sn();let n=(e=e||{}).random??e.rng?.()??function(){if(!c){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(So)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(Sa[e[t+0]]+Sa[e[t+1]]+Sa[e[t+2]]+Sa[e[t+3]]+"-"+Sa[e[t+4]]+Sa[e[t+5]]+"-"+Sa[e[t+6]]+Sa[e[t+7]]+"-"+Sa[e[t+8]]+Sa[e[t+9]]+"-"+Sa[e[t+10]]+Sa[e[t+11]]+Sa[e[t+12]]+Sa[e[t+13]]+Sa[e[t+14]]+Sa[e[t+15]]).toLowerCase()}(n)};async function Ss(e,t){let{openedGroup:r}=u8.getState();if(r){if(r.groupName===e&&Sc(r.props,t))return!0;else if(!await Sd({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u8.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Sl(e){let{openedGroup:t,openedWindows:r}=u8.getState();if(t){if(r.length>0&&!(e||await Sd({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u8.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Su(e,t=null,r=null,n=null){let o=u8.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=u7(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=ce(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=ct(e);if(i&&(i.groupName!==l.name||!Sc(i.props,n)))return!!await Sd({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u8.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Sg(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Sc(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Sc(d.props,t)?((i||u!==o.openedWindows.length-1)&&u8.setState(Sp.restoreWindow(o,s)),!0):!!await Sd({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u8.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sg(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Sd({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u8.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Sg(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u8.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Sg(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Sd({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(u8.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Sg(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Sc(e,t){return null==e||null==t||O(e,t)}function Sd(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=u8.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=x1("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Sp={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],a={...o[n],maximized:r};return o[n]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=ct(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),a=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;a.splice(r,1),t&&a.length>0&&(i=!1)}else a[r]=n;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let a=e.registeredWorkspacesByName[t];if(!a)throw Error(`No workspace named "${t}" registered`);if(a.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let i=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==i)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==i?{...e,openedWorkspaces:[...u,Sg(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=ct(t);if(n<0)return e;let o={...e.openedWindows[n]},a=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(a<0)return e;o.openedWorkspaces[a]={...o.openedWorkspaces[a],hasUnsavedChanges:r};let i=[...e.openedWindows];return i[n]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function Sf(){return cx(u8,Sp)}let Sm=()=>(0,cf.useContext)(cL),Sh=()=>Object.keys(u8.getState().registeredWorkspacesByName);function Sg(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Si()}}let Sy={workspaceOuterContainer:"-esm-cohort-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-cohort-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-cohort-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-cohort-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-cohort-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-cohort-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-cohort-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-cohort-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-cohort-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-cohort-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-cohort-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-cohort-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-cohort-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-cohort-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-cohort-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-cohort-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-cohort-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-cohort-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-cohort-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-cohort-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},Sv=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=dB(),{setWindowMaximized:o,hideWindow:a,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:m}=Sf(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=Sm(),b=ct(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,cf.useEffect)(()=>{E?.hasUnsavedChanges!=r&&i(h,r??!1)},[E?.hasUnsavedChanges,r,h,i]),(0,cf.useEffect)(()=>{p[h]!==e&&f(h,e)},[p,h,e,f]),b<0||null==l||null==E)return null;let x=u[l.groupName];if(!x)throw Error(`Cannot find registered workspace group ${l.groupName}`);let D=d[h].window,_=c[D];if(!_)throw Error(`Cannot find registered workspace window ${D}`);let{icon:S,canMaximize:k}=_,C="closable"===x.persistence,P=!!S&&!C,{maximized:O}=w,R=_?.width??"narrow",T=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=b<s.length-1||m;return(0,ph.jsxs)("div",{className:py()(Sy.workspaceOuterContainer,{[Sy.narrowWorkspace]:"narrow"===R,[Sy.widerWorkspace]:"wider"===R,[Sy.extraWideWorkspace]:"extra-wide"===R,[Sy.isActionMenuOpened]:T}),children:[(0,ph.jsx)("div",{className:py()(Sy.workspaceSpacer,{[Sy.hidden]:N})}),(0,ph.jsx)("div",{className:py()(Sy.workspaceMiddleContainer,{[Sy.maximized]:O,[Sy.hidden]:N,[Sy.isRootWorkspace]:g,[Sy.showActionMenu]:v}),children:(0,ph.jsxs)("div",{className:py()(Sy.workspaceInnerContainer,{[Sy.maximized]:O,[Sy.hidden]:N,[Sy.isRootWorkspace]:g}),children:[(0,ph.jsxs)(px.Header,{"aria-label":iW("workspaceHeader"),className:Sy.header,children:[(0,ph.jsx)(px.HeaderName,{prefix:"",children:e}),(0,ph.jsx)("div",{className:Sy.overlayHeaderSpacer}),(0,ph.jsx)(px.HeaderGlobalBar,{className:Sy.headerButtons,children:dV(n)?(0,ph.jsxs)(ph.Fragment,{children:[(k||O)&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":O?iW("minimize"):iW("maximize"),onClick:()=>o(D,!O),children:O?(0,ph.jsx)(_Y.Xj,{}):(0,ph.jsx)(_Y.hz,{})}),P&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("hide"),onClick:()=>a(),children:(0,ph.jsx)(pq,{})}),!C&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("close"),onClick:()=>y({closeWindow:!0}),children:(0,ph.jsx)(fo,{})})]}):(0,ph.jsxs)(ph.Fragment,{children:[P&&(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("hide"),onClick:()=>a(),children:(0,ph.jsx)(_q.d3,{})}),(0,ph.jsx)(px.HeaderGlobalAction,{"aria-label":iW("close"),onClick:()=>{C?Sl():y({closeWindow:!0})},children:(0,ph.jsx)(fo,{})})]})})]}),(0,ph.jsx)("div",{className:py()(Sy.workspaceContent),children:t})]})})]})},Sb="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",Sw="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",SE="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",Sx="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function SD({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,ph.jsxs)(ph.Fragment,{children:[e({size:16}),t?(0,ph.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,ph.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let S_=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dB(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Sf(),{extension:c}=(0,cf.useContext)(ch),d=i.findIndex(e=>e.windowName===c?.extensionId),p=i[d],f=null!=p,m=f&&(d<i.length-1||u),h=f&&!m,g=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)m?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Su(e,t,r)}};return"tablet"===a||"phone"===a?(0,ph.jsxs)(px.Button,{className:py()(Sb,{[SE]:f&&!h,[Sx]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,ph.jsx)("span",{className:Sw,children:(0,ph.jsx)(SD,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,ph.jsx)("span",{children:t})]}):(0,ph.jsx)(px.IconButton,{align:"left","aria-label":t,className:py()(Sb,{[SE]:f&&!h,[Sx]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,ph.jsx)("div",{className:Sw,children:(0,ph.jsx)(SD,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SS({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,ph.jsx)(px.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?fn:fe,children:e?iW("showLess","Show less"):iW("showMore","Show more")})}let Sk={contactDetails:"-esm-cohort-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-cohort-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-cohort-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-cohort-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-cohort-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-cohort-builder__patient-banner-contact-details-module__relationship___GTTsg"},SC=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i2}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cZ()(t,i5),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cf.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsxs)("p",{className:Sk.heading,children:[iW("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,ph.jsx)(px.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,ph.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>Ez(e?.startDate).getTime()-Ez(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,ph.jsx)("li",{children:(0,ph.jsx)(cg,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,ph.jsx)("li",{children:"--"})})(),t.length>3&&(0,ph.jsx)("li",{className:Sk.link,children:(0,ph.jsx)(cg,{to:`${window.spaBase}/home/patient-lists`,children:iW("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},SP=({patientId:e})=>{let{patient:t,isLoading:r}=dX(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,ph.jsx)(px.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)("p",{className:Sk.heading,children:iW("address","Address")}),(0,ph.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,ph.jsxs)("li",{children:[iW(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,ph.jsxs)("li",{children:[iW(e,e),": ",t]},`address-${e}`)):(0,ph.jsx)("li",{children:"--"})})]})},SO=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=df({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dy()(`${i2}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,i5);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cf.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cf.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iW(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)("p",{className:Sk.heading,children:iW("contactDetails","Contact Details")}),t?(0,ph.jsx)(px.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,ph.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,ph.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,ph.jsx)("li",{children:"--"})})]})},SR=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i2}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:a}=cZ()(e?t:null,i5),i=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?i:null,error:n,isLoading:o,isValidating:a}}(e);return(0,ph.jsxs)(ph.Fragment,{children:[(0,ph.jsx)("p",{className:Sk.heading,children:iW("relationships","Relationships")}),r?(0,ph.jsx)(px.InlineLoading,{description:`${iW("loading","Loading")} ...`,role:"progressbar"}):(0,ph.jsx)("ul",{children:t&&t.length>0?(0,ph.jsx)(ph.Fragment,{children:t.map(e=>(0,ph.jsxs)("li",{className:Sk.relationship,children:[(0,ph.jsx)("div",{children:(0,ph.jsx)(cg,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,ph.jsx)("div",{children:e.relationshipType}),(0,ph.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iW("yearAbbreviation","yr"):iW("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,ph.jsx)("li",{children:"--"})})]})};function ST({patientId:e,deceased:t}){return(0,ph.jsxs)("div",{className:py()(Sk.contactDetails,{[Sk.deceased]:t}),children:[(0,ph.jsxs)("div",{className:Sk.row,children:[(0,ph.jsx)("div",{className:Sk.col,children:(0,ph.jsx)(SP,{patientId:e})}),(0,ph.jsx)("div",{className:Sk.col,children:(0,ph.jsx)(SO,{patientUuid:e})})]}),(0,ph.jsxs)("div",{className:Sk.row,children:[(0,ph.jsx)("div",{className:Sk.col,children:(0,ph.jsx)(SR,{patientId:e})}),(0,ph.jsx)("div",{className:Sk.col,children:(0,ph.jsx)(SC,{patientUuid:e})})]})]})}function SN(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let Sj="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SA({workspaceGroup:e,groupProps:t}){let r=dB(),{persistence:n}=e;return(0,ph.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,ph.jsxs)("div",{className:Sj,children:["closable"==n&&dV(r)&&(0,ph.jsx)(px.IconButton,{align:"left",onClick:()=>Sl(),label:iW("close"),kind:"ghost",children:(0,ph.jsx)(fo,{})}),(0,ph.jsx)(ch.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,ph.jsx)(cT,{className:Sj,name:e.name,state:{groupProps:t}})})]})})}function S$(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let SI=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:a})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Sf(),u=(0,cf.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Sd({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Sd({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:a}=r,i=a.findIndex(e=>e.workspaceName===o);-1===i||i!==a.length-1&&a.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Sd({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:a[i+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:i&&i.props?i.props:null,workspaceMeta:u8.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:a},[t,s,i,r]);if(!e){let{registeredWorkspacesByName:e}=u8.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=u8.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,ph.jsxs)("div",{className:py()(Sy.workspaceOuterContainer,{[Sy.narrowWorkspace]:"narrow"===u,[Sy.widerWorkspace]:"wider"===u,[Sy.extraWideWorkspace]:"extra-wide"===u,[Sy.isActionMenuOpened]:c}),children:[(0,ph.jsx)("div",{className:Sy.workspaceSpacer}),(0,ph.jsx)("div",{className:py()(Sy.workspaceMiddleContainer,{[Sy.isRootWorkspace]:n,[Sy.showActionMenu]:a}),children:(0,ph.jsx)("div",{className:py()(Sy.workspaceInnerContainer,{[Sy.isRootWorkspace]:n}),children:(0,ph.jsx)(px.InlineLoading,{className:Sy.loader,description:`${iW("loading")} ...`})})})]})}return(0,ph.jsx)(_8,{config:e,mountParcel:cd,...u},t.workspaceName)},SM=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,cf.useState)({}),{registeredWorkspacesByName:a}=u8.getState();return(0,cf.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=a[e.workspaceName];return[e.uuid,await po(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,ph.jsx)(ph.Fragment,{children:r.map((o,a)=>(0,ph.jsx)(SI,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===a,isLeafWorkspace:a===r.length-1,showActionMenu:t},o.uuid))})};function SL(e){e&&(0,cN.createRoot)(e).render((0,ph.jsx)(SF,{}))}function SF(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Sf();if((0,cf.useEffect)(()=>lp("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(Sl().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=S$(t),a=S$(r);if(null===o.spaRelative||null===a.spaRelative)return!0;let i=n.exec(o.spaRelative),s=n.exec(a.spaRelative);if(i&&s||(i=n.exec(o.full),s=n.exec(a.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,a,i)&&o(Sl().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],a=t.some(e=>e.maximized),{name:i}=o,s=Object.values(n).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,ph.jsxs)("div",{className:py()("-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-cohort-builder__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-cohort-builder__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":a}),children:[(0,ph.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,ph.jsx)(SM,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,ph.jsx)(SA,{workspaceGroup:o,groupProps:e.props})]})}function SB(e,t,r){if(null==e)return r;let n=Ei(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Ei(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let a=n;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let t=a+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===a){a="fr-HT";continue}let n=a.lastIndexOf("-");if(-1===n)break;let i=(a=a.slice(0,n)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return r}function SV(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SU(e){return!!e&&e.constructor===Object}var SW=r(7638);function SH(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Sz(e,t){return SW(function(e){let t=e.indexOf("-");if(t>=0){let r=SH(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SH(e)}(t),e,{includePrerelease:!0})}async function SK(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:a}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await SG(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SG(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function SZ(e,t,r,n){}function SY(e){}function Sq(e){return Promise.resolve([])}function SJ(e){return Promise.resolve([])}function SX(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function SQ(e){return()=>{}}function S0(){return!0}}}]);