@openmrs/esm-cohort-builder-app 4.0.7-pre.1497 → 4.0.7-pre.1503

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,32 +1,32 @@
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+=`
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,f;r.r(t),r.d(t,{GenderUnknownIcon:()=>fE,evaluateAsNumber:()=>lU,getImportMapOverrideMap:()=>sL,StockManagementPictogram:()=>_a,ChemistryIcon:()=>fn,BabyIcon:()=>p2,DashboardExtension:()=>mE,openmrsComponentDecorator:()=>c4,tryRegisterExtension:()=>pd,pictogramIds:()=>DV,ActivityIcon:()=>pq,compile:()=>lz,removeRouteMapOverride:()=>lo,TableBatchActions:()=>pP,getAsyncLifecycle:()=>c6,subscribeOpenmrsEvent:()=>lg,PasswordIcon:()=>fz,Assessment2Pictogram:()=>DK,CloseIcon:()=>fl,setupRouteMapOverrides:()=>ls,getWorkspaceGroupRegistration:()=>ct,registerWorkspace:()=>u9,useFeatureFlag:()=>dP,reset:()=>uX,LabOrderIcon:()=>fT,VisitMode:()=>lx,useLocations:()=>dY,getLifecycle:()=>c3,formatDatetime:()=>E6,getVisitsForPatient:()=>lR,formatPartialDate:()=>E1,CustomOverflowMenu:()=>p$,LocationIcon:()=>fj,GroupIcon:()=>fD,createUseStore:()=>cC,VisitStatus:()=>lD,getSessionLocation:()=>sf,getCurrentImportMap:()=>sq,usePatient:()=>d2,useRenderableExtensions:()=>d3,getOpenedWindowIndexByWorkspace:()=>ca,setLeftNav:()=>u0,clearHistory:()=>i2,clearConfigErrors:()=>oa,formatTime:()=>E3,isDevEnabled:()=>sx,closeWorkspaceGroup2:()=>Sf,getCurrentRouteMap:()=>s7,ConfigurableLink:()=>cw,sessionStore:()=>sr,setSessionLocale:()=>sh,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>sp,GenderMaleIcon:()=>fb,getExtensionSlotConfigFromStore:()=>nv,evaluateAsNumberAsync:()=>lV,getImportMapDefaultMap:()=>sI,unregisterExtensionRendering:()=>uv,implementerToolsConfigStore:()=>nN,Type:()=>no,InPatientPictogram:()=>D2,cleanupObsoleteFeatureFlags:()=>un,getAttachmentsUrl:()=>ld,showSnackbar:()=>_b,PatientBannerActionsMenu:()=>D$,PatientSearchPictogram:()=>D8,DocumentAttachmentIcon:()=>fp,Snackbar:()=>_m,CardiologyPictogram:()=>DZ,ImageMedicalIcon:()=>fk,ActionableNotificationComponent:()=>De,DiagnosisTags:()=>xF,iconIds:()=>pY,PatientsPictogram:()=>D7,interpolateUrl:()=>iZ,setupHistory:()=>iQ,subscribeToastShown:()=>_,detachAll:()=>uG,convertToLocaleCalendar:()=>E5,DocumentIcon:()=>fd,configInternalStore:()=>np,ActionMenuButton2:()=>SO,setupDynamicOfflineDataHandler:()=>S0,makeUrl:()=>i7,oneOf:()=>op,selectPreferredName:()=>DD,launchWorkspaceGroup:()=>function e(t,r){let n=ct(t),{state:o,onWorkspaceGroupLaunch:a,workspaceGroupCleanup:i,workspaceToLaunch:s}=r,l=function(){return _F}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?_C(n?.name,()=>{e(t,r)}):_W(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:i}})),_Z(t,o),a?.(),s&&_O(s.name,s.additionalProps??{})},MobileCheckIcon:()=>fF,createErrorHandler:()=>P,parseDate:()=>EY,getAttachmentByUuid:()=>lu,LeftNavMenu:()=>xz,getExtensionRegistration:()=>uW,ShoppingCartAddItemIcon:()=>mv,ReferralOrderIcon:()=>fJ,ReportIcon:()=>fQ,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>sM,registerExtension:()=>uH,setupOfflineSync:()=>SQ,DownloadIcon:()=>ff,useConnectivity:()=>S6,provide:()=>nZ,ShoppingCartArrowDownIcon:()=>f5,featureFlagsStore:()=>ut,promptBeforeClosing:()=>_N,jsep:()=>lN,GeriatricsPictogram:()=>D0,SearchIcon:()=>f2,reportError:()=>C,slugify:()=>sG,isOmrsDateToday:()=>EK,getExtensionStore:()=>ub,BloodBankPictogram:()=>DG,TriagePictogram:()=>_s,Workspace2:()=>SD,refetchCurrentUser:()=>su,CheckmarkOutlineIcon:()=>fr,registerExtensionSlot:()=>uJ,AllergiesIcon:()=>mm,ArrowDownIcon:()=>pX,useOpenmrsInfinite:()=>dM,getExtensionConfigFromExtensionSlotStore:()=>nx,OpenmrsDatePicker:()=>xM,getExtensionConfigFromStore:()=>nE,getDynamicOfflineDataEntries:()=>S1,getLocaleDisplayName:()=>Ed,messageOmrsServiceWorker:()=>S4,navigate:()=>iq,launchWorkspace2:()=>Sm,getGroupByWindowName:()=>co,CustomOverflowMenuItem:()=>pI,isUrl:()=>od,CaretDownIcon:()=>p6,ArrowLeftIcon:()=>pQ,FacilityPictogram:()=>DQ,ViewOffIcon:()=>md,updateInternalExtensionStore:()=>up,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>la,formatDurationBetween:()=>xo,defaultVisitCustomRepresentation:()=>l_,getBreadcrumbsFor:()=>oE,useOpenmrsPagination:()=>dR,Pagination:()=>Dv,CheckmarkFilledIcon:()=>ft,clearCurrentUser:()=>sc,showModal:()=>x6,ChevronUpIcon:()=>fs,saveVisit:()=>lP,useAttachments:()=>df,Pictogram:()=>_p,useExtensionSlot:()=>cj,ChevronDownIcon:()=>fo,OpenmrsDateRangePicker:()=>xL,deleteAttachmentPermanently:()=>lf,getVisitTypes:()=>lE,OverflowMenuHorizontalIcon:()=>fW,EventScheduleIcon:()=>fg,getSessionStore:()=>ss,ActionMenu:()=>Sa,ProcedureOrderIcon:()=>fY,preloadImport:()=>sY,registerWorkspaceWindows2:()=>cs,useOnVisible:()=>dJ,setSessionLocation:()=>sm,userHasAccess:()=>sd,ChartAverageIcon:()=>p7,getFeatureFlag:()=>uo,UserAvatarIcon:()=>ms,renderExtension:()=>cg,useFhirInfinite:()=>dV,toVisitTypeObject:()=>lb,useSession:()=>d6,EmergencyDepartmentPictogram:()=>DX,Notification:()=>x8,dispatchSnackbarShown:()=>w,navigateAndLaunchWorkspace:()=>_R,formatDate:()=>E2,workspace2StoreActions:()=>Sy,SwitcherIcon:()=>f3,esmStyleGuideSchema:()=>pS,getImportMapDisabledOverrides:()=>sF,useAssignedExtensionIds:()=>dd,CaretRightIcon:()=>p9,evaluateAsType:()=>lW,PageHeader:()=>Dg,TranslateIcon:()=>mn,setUserProperties:()=>sg,MovementIcon:()=>fV,renderInlineNotifications:()=>Ds,subscribePrecacheStaticDependencies:()=>S3,PaymentsDeskPictogram:()=>_e,usePrimaryIdentifierCode:()=>d4,useLayoutType:()=>dH,getCurrentUser:()=>si,XrayPictogram:()=>_l,CaretUpIcon:()=>p8,renderActionableNotifications:()=>Du,OpenmrsAppContext:()=>di,setupModals:()=>x3,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(SG(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;SG(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>W,recordConfigDerivationError:()=>nR,useAbortController:()=>dl,Extension:()=>cE,getFhirServerPaginationHandlers:()=>dA,useConnectedExtensions:()=>dv,registerApp:()=>pf,HospitalBedIcon:()=>fS,useExtensionInternalStore:()=>dS,configExtensionStore:()=>nm,getSynchronizationItems:()=>S2,getExtensionSlotsConfigStore:()=>ng,registerExtensionRendering:()=>uy,RenderIfValueIsTruthy:()=>ds,registerFeatureFlag:()=>ur,useFhirFetchAll:()=>dU,restBaseUrl:()=>i5,CalendarHeatMapIcon:()=>p4,getWorkspaceRegistration:()=>ce,isImportMapOverrideDisabled:()=>sB,resetConfigSystem:()=>oi,getExtensionInternalStore:()=>uc,registerGlobalStore:()=>U,evaluateAsBoolean:()=>lF,PatientBannerPatientInfo:()=>Dj,addRouteMapOverride:()=>ln,getDefaultCalendar:()=>EQ,SettingsIcon:()=>f4,DrugOrderIcon:()=>fm,ProgramsIcon:()=>fq,useAssignedExtensions:()=>cN,CloseFilledIcon:()=>fu,canAccessStorage:()=>SK,registerDefaultCalendar:()=>EX,TreeViewAltIcon:()=>ma,OverflowMenuVerticalIcon:()=>fH,clearConfigDerivationError:()=>nT,getConfigStore:()=>nh,registerWorkspaceGroup:()=>u8,InformationSquareIcon:()=>fO,EmptyCard:()=>xV,ChevronLeftIcon:()=>fa,RadiologyIcon:()=>my,useCandidateExtensions:()=>dp,renderToasts:()=>__,isDesktop:()=>dz,integrateBreakpoints:()=>pv,RegistrationPictogram:()=>_n,CardHeader:()=>px,getExtensionRegistrationFrom:()=>uV,InformationIcon:()=>fC,TrashCanIcon:()=>mo,useShallowStableValue:()=>cx,PatientDocumentsPictogram:()=>D9,useOpenmrsSWR:()=>dX,Assessment1Pictogram:()=>Dz,finishRegisteringAllApps:()=>pm,importDynamic:()=>sZ,useFhirPagination:()=>dj,useVisitContextStore:()=>pn,ArrowUpIcon:()=>p1,showActionableNotification:()=>Dc,useForceUpdate:()=>dO,useVisit:()=>po,updateWorkspaceWindowState:()=>_U,PatientBannerPatientIdentifiers:()=>DO,WorkspaceNotification:()=>_6,TransferPictogram:()=>_i,usePagination:()=>dQ,Breakpoint:()=>ph,PatientBannerToggleContactDetailsButton:()=>SR,CloseOutlineIcon:()=>fc,ObstetricsPictogram:()=>D5,parseDateInput:()=>E8,getConfig:()=>nq,attach:()=>uz,getLocale:()=>Ep,ActionMenuButton:()=>_Q,isUrlWithTemplateParameters:()=>oc,useEmrConfiguration:()=>dD,useLeftNav:()=>dK,ToolsIcon:()=>mr,ErrorState:()=>xW,detach:()=>uK,setCurrentVisit:()=>lC,ConditionsIcon:()=>mg,SaveIcon:()=>f1,useWorkspaces:()=>_H,resetWorkspaceStore:()=>_G,useConfig:()=>dy,validator:()=>na,CalendarIcon:()=>p3,getHistory:()=>i0,StickyNoteAddIcon:()=>f9,useWorkspace2Store:()=>Sv,getPatientName:()=>Db,getVisitStore:()=>lk,getCoreTranslation:()=>iG,registerModuleWithConfigSystem:()=>nH,registerModuleLoad:()=>nz,getBreadcrumbs:()=>ov,extractVariableNames:()=>l8,translateFrom:()=>iK,useStoreWithActions:()=>ck,EditIcon:()=>fh,getCandidateExtensions:()=>uq,shallowEqual:()=>R,subscribeNotificationShown:()=>x,MaximizeIcon:()=>f$,promptForClosingWorkspaces:()=>Sg,WarningIcon:()=>mf,closeAllWorkspaces:()=>_W,fhirBaseUrl:()=>i9,matchLocale:()=>Sz,registerBreadcrumb:()=>og,usePatientPhoto:()=>DL,EventsIcon:()=>fy,createGlobalStore:()=>B,workspaceStore:()=>_F,subscribeToFeatureFlag:()=>ua,useExtensionStore:()=>dC,closeWorkspace:()=>_I,createAttachment:()=>lp,useLeftNavStore:()=>dG,TableIcon:()=>me,Icon:()=>mw,InformationFilledIcon:()=>fP,getCurrentPageMap:()=>s$,LaboratoryPictogram:()=>D4,temporaryConfigStore:()=>nf,getPromptBeforeClosingFcn:()=>_j,toDateObjectStrict:()=>EG,defineConfigSchema:()=>nW,filterBreadcrumbs:()=>ow,invalidateImplementerToolsConfig:()=>nP,PatientBannerContactDetails:()=>SI,getAssignedExtensions:()=>uY,PatientPhoto:()=>DU,MaterialOrderIcon:()=>fA,MicroscopeIcon:()=>fL,visitTypesUrl:()=>lw,scheduleRecomputation:()=>u_,PharmacyPictogram:()=>_t,AttachmentIcon:()=>mh,MoneyIcon:()=>fB,getAttachments:()=>lc,getWorkspaceGroupStore:()=>_Z,PageHeaderContent:()=>Dy,MedicationIcon:()=>fI,PrinterIcon:()=>fZ,PatientListsPictogram:()=>_c,useAppContext:()=>du,isOpenmrsRoutes:()=>sQ,AppointmentsAltPictogram:()=>DH,GenericOrderTypeIcon:()=>fx,batchExtensionUpdates:()=>ux,useExtensionSlotStore:()=>cR,ViewIcon:()=>mp,formattedName:()=>Dx,sessionEndpoint:()=>i8,duration:()=>xr,resetImportMapOverrides:()=>sW,TableOfContentsIcon:()=>f7,CaretLeftIcon:()=>p5,getTranslationOverrides:()=>nJ,isVersionSatisfied:()=>Sq,EmptyCardIllustration:()=>xU,PenIcon:()=>fG,getWorkspaceStore:()=>_B,validators:()=>of,setupImportMapOverrides:()=>sK,showToast:()=>_S,useDefineAppContext:()=>da,verifyTotpCode:()=>sy,getGlobalStore:()=>V,useOnClickOutside:()=>dq,getWindowByWorkspaceName:()=>cn,ArrowRightIcon:()=>p0,loadLifeCycles:()=>pl,registerBreadcrumbs:()=>oy,MotherIcon:()=>fU,fetchCurrentPatient:()=>lm,Toast:()=>_w,MessageQueueIcon:()=>fM,TwoFactorAuthenticationIcon:()=>mi,Pharmacy2Pictogram:()=>_r,goBackInHistory:()=>i1,GroupAccessIcon:()=>f_,getExtensionRenderingsStore:()=>ud,setImplementerToolsConfigRecomputer:()=>nC,getAsyncExtensionLifecycle:()=>c9,setupApiModule:()=>s_,renderLoadingSpinner:()=>SM,WorkspaceContainer:()=>Si,showNotification:()=>Dl,getModalRegistration:()=>u3,ListCheckedIcon:()=>fN,ResponsiveWrapper:()=>_f,GynaecologyPictogram:()=>D1,ShoppingCartIcon:()=>f6,getRouteMapNextPageMap:()=>lt,MetadataExportPictogram:()=>D6,updateVisit:()=>lO,backendDependencies:()=>sD,MaybePictogram:()=>_d,createParcelMounter:()=>cm,openmrsFetch:()=>se,useStore:()=>cS,isOpenmrsAppRoutes:()=>sX,HomePictogram:()=>_u,DentistryPictogram:()=>Dq,ServiceQueuesPictogram:()=>_o,toLanguageTag:()=>Ec,launchWorkspace:()=>_O,setFeatureFlag:()=>ui,DigitalTrustPictogram:()=>DJ,NumericObservation:()=>Dm,attachmentUrl:()=>ll,interpolateString:()=>iY,inRange:()=>ou,useExtensionSlotMeta:()=>dk,AppointmentsPictogram:()=>DW,renderSnackbars:()=>_v,getRegisteredWorkspace2Names:()=>Sw,logout:()=>sv,toLocationObject:()=>ly,ChartLineIcon:()=>fe,UserHasAccess:()=>d5,evaluateAsBooleanAsync:()=>lB,changeWorkspaceContext:()=>_M,createDashboard:()=>mx,getLocations:()=>lv,useExtensionContext:()=>d_,canCloseWorkspaceWithoutPrompting:()=>_k,getExtensionsConfigStore:()=>nb,getRouteMapDefaultMap:()=>le,age:()=>DS,isOmrsDateStrict:()=>Ez,registerWorkspaceGroups2:()=>ci,usePaginationInfo:()=>d0,evaluateAsync:()=>lL,useOpenmrsFetchAll:()=>dF,removeImportMapOverride:()=>sV,showWorkspacePrompts:()=>_z,useVisitTypes:()=>pi,ageAsDuration:()=>D_,getExtensionNameFromId:()=>uU,renderParcel:()=>cf,useWorkspace2Context:()=>Sb,ResetIcon:()=>f0,RenewIcon:()=>fX,subscribeActionableNotificationShown:()=>D,ErrorCard:()=>xH,GenderFemaleIcon:()=>fv,enableImportMapOverride:()=>sH,retry:()=>SJ,ComponentContext:()=>cb,ExtensionSlot:()=>c$,unsetLeftNav:()=>u1,addImportMapOverride:()=>sU,MaybeIcon:()=>mb,useCustomOverflowMenu:()=>pA,PedestrianFamilyIcon:()=>fK,cancelPrompt:()=>_A,CtScanPictogram:()=>DY,dispatchNotificationShown:()=>v,leftNavStore:()=>uQ,OpenmrsFetchError:()=>st,UserFollowIcon:()=>ml,launchWorkspaceGroup2:()=>Sp,ChevronRightIcon:()=>fi,UserXrayIcon:()=>mu,GenderOtherIcon:()=>fw,formatDuration:()=>E9,toOmrsIsoString:()=>EZ,Labs2Pictogram:()=>D3,workspace2Store:()=>cr,setUserLanguage:()=>sl,useBodyScrollLock:()=>dm,getExtensionConfig:()=>nw,SyringeIcon:()=>f8,LocationPicker:()=>xK,useDebounce:()=>db,TimeIcon:()=>mt,getExtensionSlotConfig:()=>ny,AddIcon:()=>pJ,getRouteMapOverrideMap:()=>lr,processConfig:()=>nX,InventoryManagementIcon:()=>fR,registerWorkspaces2:()=>cl,UserIcon:()=>mc,formatPatientName:()=>DE,fireOpenmrsEvent:()=>lh,registerModal:()=>u4,registerTranslationNamespace:()=>nK,displayName:()=>Dw,evaluate:()=>lM,defineExtensionConfigSchema:()=>nG,renderWorkspaceWindowsAndMenu:()=>SW,getSyncLifecycle:()=>c5,evaluateAsTypeAsync:()=>lH});let m="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}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){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function k(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function C(e){let t=O(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let r=O(t);r.stack+=`
2
2
  Async stacktrace:
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}.
3
+ ${e.stack}`,C(t)}}function O(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 R(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 T(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),E({description:k(o??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:k(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let N=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>N(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>N(t)(e)}}},j=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},A=e=>e?j(e):j;function $(){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={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,r="none"){let n=I[e];if(n)return n.active?$()||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=H(e,t,r);return I[e]={value:n,active:!0},n}}function U(e,t){let r=I[e];return r?(r.active?$()||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):(I[e]={value:t,active:!0},t)}function V(e,t,r="none"){let n=I[e];if(!n){let n=H(e,t??{},r);return I[e]={value:n,active:!1},n}return n.value}function W(...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);R(i,t)||(i=t,o(t))})}function H(e,t,r){return"sessionStorage"===r?A()(((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=N(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 N(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:T(()=>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 N(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:T(()=>sessionStorage)})):A()(()=>t)}L[M]=F,F>1&&!$()&&console.error(`Detected ${F} 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=I)},1e3);let z=function(e){return void 0===e};var K,G,Z,Y,q,J,X,Q,ee,et,er,en,eo,ea,ei=r(8348);let es=function(e,t){return function(r){return e(t(r))}};var el=es(Object.getPrototypeOf,Object),eu=r(3098),ec=Object.prototype,ed=Function.prototype.toString,ep=ec.hasOwnProperty,ef=ed.call(Object);let em=function(e){if(!(0,eu.A)(e)||"[object Object]"!=(0,ei.A)(e))return!1;var t=el(e);if(null===t)return!0;var r=ep.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ed.call(r)==ef},eh=function(e,t){return e===t||e!=e&&t!=t},eg=function(e,t){for(var r=e.length;r--;)if(eh(e[r][0],t))return r;return -1};var ey=Array.prototype.splice;function ev(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])}}ev.prototype.clear=function(){this.__data__=[],this.size=0},ev.prototype.delete=function(e){var t=this.__data__,r=eg(t,e);return!(r<0)&&(r==t.length-1?t.pop():ey.call(t,r,1),--this.size,!0)},ev.prototype.get=function(e){var t=this.__data__,r=eg(t,e);return r<0?void 0:t[r][1]},ev.prototype.has=function(e){return eg(this.__data__,e)>-1},ev.prototype.set=function(e,t){var r=this.__data__,n=eg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var eb=r(3149);let ew=function(e){if(!(0,eb.A)(e))return!1;var t=(0,ei.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eE=r(1917),ex=eE.A["__core-js_shared__"],eD=(K=/[^.]+$/.exec(ex&&ex.keys&&ex.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",e_=Function.prototype.toString;let eS=function(e){if(null!=e){try{return e_.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ek=/^\[object .+?Constructor\]$/,eC=Object.prototype,eP=Function.prototype.toString,eO=eC.hasOwnProperty,eR=RegExp("^"+eP.call(eO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eT=function(e){return!!(0,eb.A)(e)&&(!eD||!(eD in e))&&(ew(e)?eR:ek).test(eS(e))},eN=function(e,t){var r=null==e?void 0:e[t];return eT(r)?r:void 0};var ej=eN(eE.A,"Map"),eA=eN(Object,"create"),e$=Object.prototype.hasOwnProperty,eI=Object.prototype.hasOwnProperty;function eM(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])}}eM.prototype.clear=function(){this.__data__=eA?eA(null):{},this.size=0},eM.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eM.prototype.get=function(e){var t=this.__data__;if(eA){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return e$.call(t,e)?t[e]:void 0},eM.prototype.has=function(e){var t=this.__data__;return eA?void 0!==t[e]:eI.call(t,e)},eM.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=eA&&void 0===t?"__lodash_hash_undefined__":t,this};let eL=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eF=function(e,t){var r=e.__data__;return eL(t)?r["string"==typeof t?"string":"hash"]:r.map};function eB(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 eU(e){var t=this.__data__=new ev(e);this.size=t.size}eB.prototype.clear=function(){this.size=0,this.__data__={hash:new eM,map:new(ej||ev),string:new eM}},eB.prototype.delete=function(e){var t=eF(this,e).delete(e);return this.size-=!!t,t},eB.prototype.get=function(e){return eF(this,e).get(e)},eB.prototype.has=function(e){return eF(this,e).has(e)},eB.prototype.set=function(e,t){var r=eF(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},eU.prototype.clear=function(){this.__data__=new ev,this.size=0},eU.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eU.prototype.get=function(e){return this.__data__.get(e)},eU.prototype.has=function(e){return this.__data__.has(e)},eU.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ev){var n=r.__data__;if(!ej||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eB(n)}return r.set(e,t),this.size=r.size,this};var eV=function(){try{var e=eN(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eW=function(e,t,r){"__proto__"==t&&eV?eV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},eH=function(e,t,r){(void 0===r||eh(e[t],r))&&(void 0!==r||t in e)||eW(e,t,r)},ez=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 eK="object"==typeof exports&&exports&&!exports.nodeType&&exports,eG=eK&&"object"==typeof module&&module&&!module.nodeType&&module,eZ=eG&&eG.exports===eK?eE.A.Buffer:void 0,eY=eZ?eZ.allocUnsafe:void 0;let eq=function(e,t){if(t)return e.slice();var r=e.length,n=eY?eY(r):new e.constructor(r);return e.copy(n),n};var eJ=eE.A.Uint8Array;let eX=function(e){var t=new e.constructor(e.byteLength);return new eJ(t).set(new eJ(e)),t},eQ=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},e0=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var e1=Object.create,e2=function(){function e(){}return function(t){if(!(0,eb.A)(t))return{};if(e1)return e1(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e4=Object.prototype;let e3=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||e4)},e6=function(e){return"function"!=typeof e.constructor||e3(e)?{}:e2(el(e))},e5=function(e){return(0,eu.A)(e)&&"[object Arguments]"==(0,ei.A)(e)};var e9=Object.prototype,e8=e9.hasOwnProperty,e7=e9.propertyIsEnumerable,te=e5(function(){return arguments}())?e5:function(e){return(0,eu.A)(e)&&e8.call(e,"callee")&&!e7.call(e,"callee")},tt=Array.isArray;let tr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tn=function(e){return null!=e&&tr(e.length)&&!ew(e)};var to="object"==typeof exports&&exports&&!exports.nodeType&&exports,ta=to&&"object"==typeof module&&module&&!module.nodeType&&module,ti=ta&&ta.exports===to?eE.A.Buffer:void 0;let ts=(ti?ti.isBuffer:void 0)||function(){return!1};var tl={};tl["[object Float32Array]"]=tl["[object Float64Array]"]=tl["[object Int8Array]"]=tl["[object Int16Array]"]=tl["[object Int32Array]"]=tl["[object Uint8Array]"]=tl["[object Uint8ClampedArray]"]=tl["[object Uint16Array]"]=tl["[object Uint32Array]"]=!0,tl["[object Arguments]"]=tl["[object Array]"]=tl["[object ArrayBuffer]"]=tl["[object Boolean]"]=tl["[object DataView]"]=tl["[object Date]"]=tl["[object Error]"]=tl["[object Function]"]=tl["[object Map]"]=tl["[object Number]"]=tl["[object Object]"]=tl["[object RegExp]"]=tl["[object Set]"]=tl["[object String]"]=tl["[object WeakMap]"]=!1;let tu=function(e){return function(t){return e(t)}};var tc=r(2136),td="object"==typeof exports&&exports&&!exports.nodeType&&exports,tp=td&&"object"==typeof module&&module&&!module.nodeType&&module,tf=tp&&tp.exports===td&&tc.A.process,tm=function(){try{var e=tp&&tp.require&&tp.require("util").types;if(e)return e;return tf&&tf.binding&&tf.binding("util")}catch(e){}}(),th=tm&&tm.isTypedArray,tg=th?tu(th):function(e){return(0,eu.A)(e)&&tr(e.length)&&!!tl[(0,ei.A)(e)]};let ty=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tv=Object.prototype.hasOwnProperty;let tb=function(e,t,r){var n=e[t];tv.call(e,t)&&eh(n,r)&&(void 0!==r||t in e)||eW(e,t,r)},tw=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?eW(r,s,l):tb(r,s,l)}return r},tE=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tx=/^(?:0|[1-9]\d*)$/;let tD=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tx.test(e))&&e>-1&&e%1==0&&e<t};var t_=Object.prototype.hasOwnProperty;let tS=function(e,t){var r=tt(e),n=!r&&te(e),o=!r&&!n&&ts(e),a=!r&&!n&&!o&&tg(e),i=r||n||o||a,s=i?tE(e.length,String):[],l=s.length;for(var u in e)(t||t_.call(e,u))&&!(i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tD(u,l)))&&s.push(u);return s},tk=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tC=Object.prototype.hasOwnProperty;let tP=function(e){if(!(0,eb.A)(e))return tk(e);var t=e3(e),r=[];for(var n in e)"constructor"==n&&(t||!tC.call(e,n))||r.push(n);return r},tO=function(e){return tn(e)?tS(e,!0):tP(e)},tR=function(e,t,r,n,o,a,i){var s=ty(e,r),l=ty(t,r),u=i.get(l);if(u)return void eH(e,r,u);var c=a?a(s,l,r+"",e,t,i):void 0,d=void 0===c;if(d){var p=tt(l),f=!p&&ts(l),m=!p&&!f&&tg(l);(c=l,p||f||m)?tt(s)?c=s:(0,eu.A)(s)&&tn(s)?c=e0(s):f?(d=!1,c=eq(l,!0)):m?(d=!1,c=eQ(l,!0)):c=[]:em(l)||te(l)?(c=s,te(s))?c=tw(s,tO(s)):(!(0,eb.A)(s)||ew(s))&&(c=e6(l)):d=!1}d&&(i.set(l,c),o(c,l,n,a,i),i.delete(l)),eH(e,r,c)},tT=function e(t,r,n,o,a){t!==r&&ez(r,function(i,s){if(a||(a=new eU),(0,eb.A)(i))tR(t,r,s,n,e,o,a);else{var l=o?o(ty(t,s),i,s+"",t,r,a):void 0;void 0===l&&(l=i),eH(t,s,l)}},tO)},tN=function(e){return e},tj=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 tA=Math.max;let t$=function(e,t,r){return t=tA(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=tA(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),tj(e,this,s)}};var tI=Date.now,tM=(G=eV?function(e,t){return eV(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tN,Z=0,Y=0,function(){var e=tI(),t=16-(e-Y);if(Y=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return G.apply(void 0,arguments)});let tL=function(e,t,r){if(!(0,eb.A)(r))return!1;var n=typeof t;return("number"==n?!!(tn(r)&&tD(t,r.length)):"string"==n&&t in r)&&eh(r[t],e)},tF=function(e){var t;return tM(t$(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&&tL(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,tN),t+"")};var tB=tF(function(e,t,r,n){tT(e,t,r,n)});function tU(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eB;++t<r;)this.add(e[t])}tU.prototype.add=tU.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tU.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},tW=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 tU: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 tH=r(241);let tz=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},tK=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var tG=tH.A?tH.A.prototype:void 0,tZ=tG?tG.valueOf:void 0;let tY=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 eJ(e),new eJ(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eh(+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=tz;case"[object Set]":var l=1&n;if(s||(s=tK),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var c=tW(s(e),s(t),n,o,a,i);return i.delete(e),c;case"[object Symbol]":if(tZ)return tZ.call(e)==tZ.call(t)}return!1},tq=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},tJ=function(e,t,r){var n=t(e);return tt(e)?n:tq(n,r(e))},tX=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},tQ=function(){return[]};var t0=Object.prototype.propertyIsEnumerable,t1=Object.getOwnPropertySymbols,t2=t1?function(e){return null==e?[]:tX(t1(e=Object(e)),function(t){return t0.call(e,t)})}:tQ,t4=es(Object.keys,Object),t3=Object.prototype.hasOwnProperty;let t6=function(e){if(!e3(e))return t4(e);var t=[];for(var r in Object(e))t3.call(e,r)&&"constructor"!=r&&t.push(r);return t},t5=function(e){return tn(e)?tS(e):t6(e)},t9=function(e){return tJ(e,t5,t2)};var t8=Object.prototype.hasOwnProperty;let t7=function(e,t,r,n,o,a){var i=1&r,s=t9(e),l=s.length;if(l!=t9(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:t8.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 re=eN(eE.A,"DataView"),rt=eN(eE.A,"Promise"),rr=eN(eE.A,"Set"),rn=eN(eE.A,"WeakMap"),ro="[object Map]",ra="[object Promise]",ri="[object Set]",rs="[object WeakMap]",rl="[object DataView]",ru=eS(re),rc=eS(ej),rd=eS(rt),rp=eS(rr),rf=eS(rn),rm=ei.A;(re&&rm(new re(new ArrayBuffer(1)))!=rl||ej&&rm(new ej)!=ro||rt&&rm(rt.resolve())!=ra||rr&&rm(new rr)!=ri||rn&&rm(new rn)!=rs)&&(rm=function(e){var t=(0,ei.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?eS(r):"";if(n)switch(n){case ru:return rl;case rc:return ro;case rd:return ra;case rp:return ri;case rf:return rs}return t});let rh=rm;var rg="[object Arguments]",ry="[object Array]",rv="[object Object]",rb=Object.prototype.hasOwnProperty;let rw=function(e,t,r,n,o,a){var i=tt(e),s=tt(t),l=i?ry:rh(e),u=s?ry:rh(t);l=l==rg?rv:l,u=u==rg?rv:u;var c=l==rv,d=u==rv,p=l==u;if(p&&ts(e)){if(!ts(t))return!1;i=!0,c=!1}if(p&&!c)return a||(a=new eU),i||tg(e)?tW(e,t,r,n,o,a):tY(e,t,l,r,n,o,a);if(!(1&r)){var f=c&&rb.call(e,"__wrapped__"),m=d&&rb.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,g=m?t.value():t;return a||(a=new eU),o(h,g,r,n,a)}}return!!p&&(a||(a=new eU),t7(e,t,r,n,o,a))},rE=function(e,t){return function e(t,r,n,o,a){return t===r||(null!=t&&null!=r&&((0,eu.A)(t)||(0,eu.A)(r))?rw(t,r,n,o,e,a):t!=t&&r!=r)}(e,t)},rx=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},rD=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var r_=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tq(t,t2(e)),e=el(e);return t}:tQ;let rS=function(e){return tJ(e,tO,r_)};var rk=Object.prototype.hasOwnProperty;let rC=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rk.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rP=function(e,t){var r=t?eX(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rO=/\w*$/;let rR=function(e){var t=new e.constructor(e.source,rO.exec(e));return t.lastIndex=e.lastIndex,t};var rT=tH.A?tH.A.prototype:void 0,rN=rT?rT.valueOf:void 0;let rj=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return eX(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rP(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 eQ(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 rR(e);case"[object Symbol]":return rN?Object(rN.call(e)):{}}};var rA=tm&&tm.isMap,r$=rA?tu(rA):function(e){return(0,eu.A)(e)&&"[object Map]"==rh(e)},rI=tm&&tm.isSet,rM=rI?tu(rI):function(e){return(0,eu.A)(e)&&"[object Set]"==rh(e)},rL="[object Arguments]",rF="[object Function]",rB="[object Object]",rU={};rU[rL]=rU["[object Array]"]=rU["[object ArrayBuffer]"]=rU["[object DataView]"]=rU["[object Boolean]"]=rU["[object Date]"]=rU["[object Float32Array]"]=rU["[object Float64Array]"]=rU["[object Int8Array]"]=rU["[object Int16Array]"]=rU["[object Int32Array]"]=rU["[object Map]"]=rU["[object Number]"]=rU[rB]=rU["[object RegExp]"]=rU["[object Set]"]=rU["[object String]"]=rU["[object Symbol]"]=rU["[object Uint8Array]"]=rU["[object Uint8ClampedArray]"]=rU["[object Uint16Array]"]=rU["[object Uint32Array]"]=!0,rU["[object Error]"]=rU[rF]=rU["[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,eb.A)(t))return t;var d=tt(t);if(d){if(s=rC(t),!l)return e0(t,s)}else{var p,f,m,h,g=rh(t),y=g==rF||"[object GeneratorFunction]"==g;if(ts(t))return eq(t,l);if(g==rB||g==rL||y&&!a){if(s=u||y?{}:e6(t),!l)return u?(f=(p=s)&&tw(t,tO(t),p),tw(t,r_(t),f)):(h=(m=s)&&tw(t,t5(t),m),tw(t,t2(t),h))}else{if(!rU[g])return a?t:{};s=rj(t,g,l)}}i||(i=new eU);var v=i.get(t);if(v)return v;i.set(t,s),rM(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,i))}):r$(t)&&t.forEach(function(o,a){s.set(a,e(o,r,n,a,t,i))});var b=c?u?rS:t9:u?tO:t5,w=d?void 0:b(t);return rD(w||t,function(o,a){w&&(o=t[a=o]),tb(s,a,e(o,r,n,a,t,i))}),s};var rW=r(1882),rH=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rz=/^\w*$/;let rK=function(e,t){if(tt(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,rW.A)(e))||rz.test(e)||!rH.test(e)||null!=t&&e in Object(t)};function rG(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(rG.Cache||eB),r}rG.Cache=eB;var rZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rY=/\\(\\)?/g,rq=(J=(q=rG(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rZ,function(e,r,n,o){t.push(n?o.replace(rY,"$1"):r||e)}),t},function(e){return 500===J.size&&J.clear(),e})).cache,q),rJ=1/0,rX=tH.A?tH.A.prototype:void 0,rQ=rX?rX.toString:void 0;let r0=function e(t){if("string"==typeof t)return t;if(tt(t))return rx(t,e)+"";if((0,rW.A)(t))return rQ?rQ.call(t):"";var r=t+"";return"0"==r&&1/t==-rJ?"-0":r},r1=function(e){return null==e?"":r0(e)},r2=function(e,t){return tt(e)?e:rK(e,t)?[e]:rq(r1(e))},r4=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var r3=1/0;let r6=function(e){if("string"==typeof e||(0,rW.A)(e))return e;var t=e+"";return"0"==t&&1/e==-r3?"-0":t},r5=function(e,t){t=r2(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[r6(t[r++])];return r&&r==n?e:void 0},r9=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},r8=function(e,t){var r,n;return t=r2(t,e),r=e,null==(e=(n=t).length<2?r:r5(r,r9(n,0,-1)))||delete e[r6(r4(t))]},r7=function(e){return em(e)?void 0:e};var ne=tH.A?tH.A.isConcatSpreadable:void 0;let nt=function(e){return tt(e)||te(e)||!!(ne&&e&&e[ne])},nr=function e(t,r,n,o,a){var i=-1,s=t.length;for(n||(n=nt),a||(a=[]);++i<s;){var l=t[i];r>0&&n(l)?r>1?e(l,r-1,n,o,a):tq(a,l):o||(a[a.length]=l)}return a};var nn=tM(t$(X=function(e,t){var r={};if(null==e)return r;var n=!1;t=rx(t,function(t){return t=r2(t,e),n||(n=t.length>1),t}),tw(e,rS(e),r),n&&(r=rV(r,7,r7));for(var o=t.length;o--;)r8(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nr(e,1):[]}),X+""),no=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function na(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let ni=na(e=>Array.isArray(e),"must be an array"),ns=na(e=>"boolean"==typeof e,"must be a boolean"),nl=na(e=>"number"==typeof e,"must be a number"),nu=na(e=>"string"==typeof e,"must be a string"),nc=na(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nd=na(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"),np=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),nf=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});nf.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nm=B("config-store-of-extension-state",{mountedExtensions:[]});function nh(e){return V(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function ng(){return V("config-extension-slots",{slots:{}})}function ny(e){return nv(ng().getState(),e)}function nv(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nb(){return V("config-extensions",{configs:{}})}function nw(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=nb(),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);R(o,a)||e(o,a)})}}function nE(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nx(e,t,r){return e.configure?.[r]??null}let nD=A()(()=>({config:{}})),n_=0,nS=!0,nk=!1;function nC(e){n=e}function nP(){nS=!0,n_>0&&nO()}function nO(){if(nS&&n&&!nk){nk=!0,nS=!1;try{n()}catch(e){nS=!0,nR(e),console.error("Failed to derive the implementer tools config",e)}finally{nk=!1}}}function nR(e){nD.setState({derivationError:e instanceof Error?e.message:String(e)})}function nT(){nD.getState().derivationError&&nD.setState({derivationError:void 0})}let nN=U("config-implementer-tools",{...nD,getState:()=>(0===n_&&nO(),nD.getState()),setState:(...e)=>(nS=!1,nD.setState(...e)),subscribe(e){n_++,nO();let t=nD.subscribe(e),r=!1;return()=>{!r&&(r=!0,n_--),t()}}});function nj(e,t){if(Array.isArray(t))return t}function nA(e,t){return tB({},e,t,nj)}let n$=[];function nI(){let e=np.getState(),t=nf.getState(),r=nm.getState();if(nM?.configState===e&&nM.tempConfigState===t)return void nV(e,r,t,nM.slotConfigs,!0);!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nh(r),a=e.schemas[r],i=!!e.moduleLoaded[r],s=nU.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=n3(e,n2(t,r));n5(n,o,e);let a=oe(n,o);return n9(n,a,e),delete a.extensionSlots,a}(r,e,t):function(e,t,r){let n=oe(ol,n3(e,n2(t,r)));return n9(ol,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:i,config:o},nU.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&&rE(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=n6(n2(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&&oo(n,o+`' contains invalid keys '${a.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||oo(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)||oo(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)||oo(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!or(e.configure)&&oo(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]:n6(t);a[e].configure!==r&&(a[e]={...a[e],configure:r})}return a}(e,t);(function(e){let t=ng(),r=t.getState().slots,n={},o=!1;for(let[t,a]of Object.entries(e)){let e=r[t];e?.loaded&&rE(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),nV(e,r,t,n,!1),nM={configState:e,tempConfigState:t,slotConfigs:n},nP()}let nM=null,nL=new WeakMap;function nF(){n=()=>{var e,t;let r,n;return e=np.getState(),t=nf.getState(),r=nN.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n1.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"}:or(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(rV(n,5));n1.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=n0.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=nA(l,function e(t,r){return or(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),n0.set(e,{annotatedSchema:t,configSlices:o,sources:i,result:l}),a[e]=l}return a}(e,t)},void(rE(r.config,n.config)||nN.setState(n))},nI(),n$.push(np.subscribe(nB),nf.subscribe(nB),nm.subscribe(nB))}function nB(){nT();try{nI()}catch(e){nR(e),console.error("Failed to recompute the configuration",e)}}nF();let nU=new Map;function nV(e,t,r,n,o){let a=nb(),i=a.getState().configs,s={},l=!1,u=0;for(let a of t.mountedExtensions){let t,c=i[a.slotName]?.[a.extensionId],d=c&&nL.get(c);if(o&&c?.loaded&&d?.slotModuleName===a.slotModuleName&&d.extensionModuleName===a.extensionModuleName)t=c;else{let o=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=nQ.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=n2(o,a),f=i?.configure?.[n]??{},m=n3(e,p),h=m?.extensionSlots?.[r]?.configure?.[n]??{},g=n6([n3(d,p),f,h]),y=l??o.schemas[t];n5(y,g,d);let v=oe(y,g);return n9(y,v,d),delete v.extensionSlots,nQ.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:a.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,r,n[a.slotName]);t=c?.loaded&&rE(c.config,o)?c:{config:o,loaded:!0}}nL.set(t,a),t!==c&&(l=!0),s[a.slotName]||(s[a.slotName]={}),s[a.slotName][a.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(s[e]=r)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&a.setState({configs:s})}function nW(e,t){n4(e,t);let r=nA(t,ol);np.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nH(e){np.setState(t=>({...t,schemas:{...t.schemas,[e]:ol}}))}function nz(e){np.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nK(e){np.setState(t=>({...t,schemas:{...t.schemas,[e]:os}}))}function nG(e,t){n4(e,t);let r=nA(t,ol);np.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.`),np.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function nZ(e,t="provided"){np.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function nY(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 nq(e){return nY(nh(e),e=>!!(e.loaded&&e.config),e=>nn(e.config,["Display conditions","Translation overrides"]))}function nJ(e,t,r){let n=[nY(nh(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(nY(nw(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function nX(e,t,r){n5(e,t,r);let n=oe(e,t);return n9(e,n,r),n}let nQ=new Map,n0=new Map,n1=new Map;function n2(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function n4(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}`),!or(i)){console.error(`${e} has bad config schema definition for key '${a}'. ${n}`);continue}i.hasOwnProperty("_default")||n4(e,i,a);let s=i._elements;if(ot(s)&&n4(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
 
5
- If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=i._type;l&&!Object.values(nn).includes(l)&&console.error(`${e} has invalid type for key '${a}' ${n}.
5
+ If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=i._type;l&&!Object.values(no).includes(l)&&console.error(`${e} has invalid type for key '${a}' ${n}.
6
6
 
7
- If you're the maintainer: the allowed types are ${Object.values(nn).join(", ")}. Received '${l}'`),Object.keys(i).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!r.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${a}'. ${n}.
7
+ If you're the maintainer: the allowed types are ${Object.values(no).join(", ")}. Received '${l}'`),Object.keys(i).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!r.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${a}'. ${n}.
8
8
 
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}.
9
+ If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![no.Array,no.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${a}'. ${n}.
10
10
 
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: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:
11
+ If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function n3(e,t){return n6(t.map(({[e]:t})=>t).filter(e=>!!e))}function n6(e){return e.reduce((e,t)=>tB(e,t,nj),{})}function n5(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)&&oo(a,`Unknown config key '${a}' provided. Ignoring.`);continue}(function e(t,r,n){n8(n,t._type,r),or(r)?t._type===no.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")||n5(t,r,n):t._type===no.Array&&function(t,r,n){if(n8(n,no.Array,r)){if(ot(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++)n8(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(i,o,a)}}function n9(e,t,r=""){if(e){if(t!==e._default&&n7(r,e._validators,t),or(t))for(let n of Object.keys(t)){let o=t[n],a=r+"."+n,i=e[n];e._type===no.Object&&e._elements?n9(e._elements,o,a):n9(i,o,a)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)n9(e._elements,t[n],`${r}[${n}]`)}}function n8(e,t,r){return!t||n7(e,[{Array:ni,Boolean:ns,ConceptUuid:nd,Number:nl,Object:nc,String:nu,UUID:nd,PersonAttributeTypeUuid:nd,PatientIdentifierTypeUuid:nd}[t]],r)}function n7(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}`;oo(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
+ ${t}`)}return n}let oe=(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&&ot(e)){if(o._type===no.Array&&Array.isArray(n)){let o=n.map(t=>oe(e,t));r[t]=o}else if(o._type===no.Object)for(let t of Object.keys(n))n[t]=oe(e,n[t])}}else if(or(o)){let e=n??{};or(e)&&(r[t]=oe(o,e))}}return r};function ot(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function or(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let on=new Set;function oo(e,t){let r=`${e}:::${t}`;on||(on=new Set),on.has(r)||(console.error(t),on.add(r))}function oa(e){e?on.forEach(t=>{t.startsWith(e)&&on.delete(t)}):on.clear()}function oi(){n$.forEach(e=>e()),n$.length=0,nU.clear(),nQ.clear(),n1.clear(),n0.clear(),nM=null,nL=new WeakMap,nF()}let os={"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:no.Object,_default:{},_validators:[na(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(", ")}.`})]}},ol={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:no.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:no.String,_default:void 0}},...os},ou=(e,t)=>na(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),oc=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return na(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(", "))},od=oc([]),op=e=>na(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),of={inRange:ou,isUrl:od,isUrlWithTemplateParameters:oc,oneOf:op};var om=r(8067);let oh=B("breadcrumbs",[]);function og(e){return oy([e])}function oy(e){let t=[...ov(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,om.pathToRegexp)(e.matcher).regexp:(0,om.pathToRegexp)(e.path).regexp,settings:e}))];oh.setState(t,!0)}function ov(){return oh.getState()}function ob(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=ob(e,r.join("/"));if(t)return t}}(e,t)}function ow(e,t){if(e.length>0){let r=ob(e,t);if(r){let t=[r],n=ob(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=ob(e,n.settings.parent);return t.reverse()}}return[]}function oE(e){return ow(ov(),e)}var ox=Object.freeze({__proto__:null,get start(){return aK},get ensureJQuerySupport(){return aE},get setBootstrapMaxTime(){return ar},get setMountMaxTime(){return an},get setUnmountMaxTime(){return ao},get setUnloadMaxTime(){return aa},get registerApplication(){return aN},get unregisterApplication(){return aA},get getMountedApps(){return aP},get getAppStatus(){return aR},get unloadApplication(){return a$},get checkActivityFunctions(){return aj},get getAppNames(){return aO},get pathToActiveWhen(){return aL},get navigateToUrl(){return ap},get patchHistoryApi(){return av},get triggerAppChange(){return aV},get addErrorHandler(){return oC},get removeErrorHandler(){return oP},get mountRootParcel(){return o9},get NOT_LOADED(){return oT},get LOADING_SOURCE_CODE(){return oN},get NOT_BOOTSTRAPPED(){return oj},get BOOTSTRAPPING(){return oA},get NOT_MOUNTED(){return o$},get MOUNTING(){return oI},get UPDATING(){return oL},get LOAD_ERROR(){return oU},get MOUNTED(){return oM},get UNLOADING(){return oB},get UNMOUNTING(){return oF},get SKIP_BECAUSE_BROKEN(){return oV}}),oD=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,o_=!function(){try{var e=new oD("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}:oD;let oS=[];function ok(e,t,r){let n=oR(e,t,r);oS.length?oS.forEach(e=>e(n)):setTimeout(()=>{throw n})}function oC(e){if("function"!=typeof e)throw Error(oO(28,!1));oS.push(e)}function oP(e){if("function"!=typeof e)throw Error(oO(29,!1));let t=!1;return oS=oS.filter(r=>{let n=r===e;return t=t||n,!n}),t}function oO(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 oR(e,t,r){let n,o=`${oG(t)} '${oz(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(oO(30,!1,t.status,oz(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=oz(t),t.status=r,n}let oT="NOT_LOADED",oN="LOADING_SOURCE_CODE",oj="NOT_BOOTSTRAPPED",oA="BOOTSTRAPPING",o$="NOT_MOUNTED",oI="MOUNTING",oM="MOUNTED",oL="UPDATING",oF="UNMOUNTING",oB="UNLOADING",oU="LOAD_ERROR",oV="SKIP_BECAUSE_BROKEN";function oW(e){return e.status===oM}function oH(e){try{return e.activeWhen(window.location)}catch(t){return ok(t,e,oV),!1}}function oz(e){return e.name}function oK(e){return!!e.unmountThisParcel}function oG(e){return oK(e)?"parcel":"application"}function oZ(){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 oY(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function oq(e){return e&&("function"==typeof e||Array.isArray(e)&&!oY(e,e=>"function"!=typeof e))}function oJ(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=oG(e),o=oz(e);return function(e){return r.reduce((r,a,i)=>r.then(()=>{let r=a(e);return oX(r)?r:Promise.reject(oO(15,!1,n,o,t,i))}),Promise.resolve())}}function oX(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let oQ=[];function o0(e,t){return Promise.resolve().then(()=>e.status!==oj?e:(e.status=oA,e.bootstrap?ai(e,"bootstrap").then(r).catch(r=>{if(t)throw oR(r,e,oV);return ok(r,e,oV),e}):Promise.resolve().then(r)));function r(){return e.status=o$,e}}function o1(e,t){return Promise.resolve().then(()=>{if(e.status!==oM)return e;return e.status=oF,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 oR(r,e,oV);ok(r,e,oV)})).then(()=>e);function r(){return ai(e,"unmount").then(()=>{e.status=o$},r=>{if(t)throw oR(r,e,oV);ok(r,e,oV)})}})}let o2=!1,o4=!1;function o3(e,t){return Promise.resolve().then(()=>e.status!==o$?e:(o2||(window.dispatchEvent(new o_("single-spa:before-first-mount")),o2=!0),e.status=oI,ai(e,"mount").then(()=>(e.status=oM,o4||(window.dispatchEvent(new o_("single-spa:first-mount")),o4=!0),e)).catch(r=>{return e.status=oM,o1(e,!0).then(n,n);function n(){if(t)throw oR(r,e,oV);return ok(r,e,oV),e}})))}let o6=0,o5={parcels:{}};function o9(){return o8.apply(o5,arguments)}function o8(e,t){let r,n,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(oO(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(oO(3,!1,typeof e.name));let i=o6++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(oO(4,!1,s,typeof t));if(!t.domElement)throw Error(oO(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?oN:oj,customProps:t,parentName:oz(a),unmountThisParcel:()=>f.then(()=>{if(c.status!==oM)throw Error(oO(6,!1,s,c.status));return o1(c,!0)}).then(e=>(c.parentName&&delete a.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=oV,o(e),e})};a.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(oO(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(oO(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!oq(e.bootstrap))throw Error(oO(9,!1,s));if(!oq(e.mount))throw Error(oO(10,!1,s));if(!oq(e.unmount))throw Error(oO(11,!1,s));if(e.update&&!oq(e.update))throw Error(oO(12,!1,s));let t=oJ(e,"bootstrap"),n=oJ(e,"mount"),o=oJ(e,"unmount");c.status=oj,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=as(e.timeouts),e.update&&(c.update=oJ(e,"update"),r.update=function(e){return c.customProps=e,o7(Promise.resolve().then(()=>{if(c.status!==oM)throw Error(oO(32,!1,oz(c)));return c.status=oL,ai(c,"update").then(()=>(c.status=oM,c)).catch(e=>{throw oR(e,c,oV)})}))})})).then(()=>o0(c,!0)),f=p.then(()=>o3(c,!0)),m=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>o7(Promise.resolve().then(()=>{if(c.status!==o$)throw Error(oO(13,!1,s,c.status));return a.parcels[i]=c,o3(c)})),unmount:()=>o7(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:o7(d),bootstrapPromise:o7(p),mountPromise:o7(f),unmountPromise:o7(m)}}function o7(e){return e.then(()=>null)}function ae(e){let t=oz(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(oO(40,!1),t,r));let n=oZ({},r,{name:t,mountParcel:o8.bind(e),singleSpa:ox});return oK(e)&&(n.unmountSelf=e.unmountThisParcel),n}let at={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 ar(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(16,!1));at.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function an(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(17,!1));at.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ao(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(18,!1));at.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function aa(e,t,r){if("number"!=typeof e||e<=0)throw Error(oO(19,!1));at.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function ai(e,t){let r=e.timeouts[t],n=r.warningMillis,o=oG(e);return new Promise((a,i)=>{let s=!1,l=!1;e[t](ae(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=oO(31,!1,t,o,oz(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 as(e){let t={};for(let r in at)t[r]=oZ({},at[r],e&&e[r]||{});return t}function al(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==oT&&e.status!==oU?e:(e.status=oN,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(ae(e));if(!oX(n))throw r=!0,Error(oO(33,!1,oz(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!oq(t.bootstrap)&&(n=35),oq(t.mount)||(n=36),oq(t.unmount)||(n=37);let o=oG(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(oO(n,!1,o,oz(e),r),t),ok(void 0,e,oV),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=oZ({},e.devtools.overlays,t.devtools.overlays)),e.status=oj,e.bootstrap=oJ(t,"bootstrap"),e.mount=oJ(t,"mount"),e.unmount=oJ(t,"unmount"),e.unload=oJ(t,"unload"),e.timeouts=as(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=oV:(n=oU,e.loadErrorTime=(new Date).getTime()),ok(t,e,n),e}))})}let au="u">typeof window,ac={hashchange:[],popstate:[]},ad=["hashchange","popstate"];function ap(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(oO(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=ab(window.location.href),n=ab(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 af(e){if(e){let t=e[0].type;ad.indexOf(t)>=0&&ac[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function am(){aW([],arguments)}function ah(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 ag=null,ay=!1;function av(e){if(ay)throw Error(oO(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ay=!0,ag=window.history.replaceState,window.addEventListener("hashchange",am),window.addEventListener("popstate",am);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&ad.indexOf(e)>=0)||oY(ac[e],e=>e===r))return t.apply(this,arguments);ac[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&ad.indexOf(e)>=0&&(ac[e]=ac[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ah(window.history.pushState,"pushState"),window.history.replaceState=ah(ag,"replaceState")}function ab(e){let t=document.createElement("a");return t.href=e,t}au&&(window.singleSpaNavigate?console.warn(oO(41,!1)):window.singleSpaNavigate=ap);let aw=!1;function aE(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!aw){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ax.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ax.call(this,r,window.removeEventListener,e,t,arguments)},aw=!0}}function ax(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{ad.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let aD={};function a_(e){return Promise.resolve().then(()=>{let t=aD[oz(e)];if(!t)return e;if(e.status===oT)return aS(e,t),e;if(e.status===oB)return t.promise.then(()=>e);if(e.status!==o$&&e.status!==oU)return e;let r=e.status===oU?Promise.resolve():ai(e,"unload");return e.status=oB,r.then(()=>(aS(e,t),e)).catch(r=>(delete aD[oz(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,ok(r,e,oV),t.reject(r),e))})}function aS(e,t){delete aD[oz(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=oT,t.resolve()}function ak(e,t,r,n){aD[oz(e)]={app:e,resolve:r,reject:n},Object.defineProperty(aD[oz(e)],"promise",{get:t})}let aC=[];function aP(){return aC.filter(oW).map(oz)}function aO(){return aC.map(oz)}function aR(e){let t=oY(aC,t=>oz(t)===e);return t?t.status:null}let aT=!1;function aN(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(oO(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(oO(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(oO(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(oO(24,!1));if(!aM(e.customProps))throw Error(oO(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(oO(20,!1));if(!t)throw Error(oO(23,!1));if("function"!=typeof r)throw Error(oO(24,!1));if(!aM(n))throw Error(oO(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:aL(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(az||aT||(aT=!0,setTimeout(()=>{az||console.warn(oO(1,!1))},5e3)),-1!==aO().indexOf(l.name))throw Error(oO(21,!1,l.name));aC.push(oZ({loadErrorTime:null,status:oT,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),au&&(aE(),aW())}function aj(e=window.location){return aC.filter(t=>t.activeWhen(e)).map(oz)}function aA(e){if(0===aC.filter(t=>oz(t)===e).length)throw Error(oO(25,!1,e));return(au?a$(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=aC.map(oz).indexOf(e);aC.splice(t,1)})}function a$(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(oO(26,!1));let r=oY(aC,t=>oz(t)===e);if(!r)throw Error(oO(27,!1,e));let n=aD[oz(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{ak(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,aI(r,n.resolve,n.reject)):e=new Promise((t,n)=>{ak(r,()=>e,t,n),aI(r,t,n)}),e}}function aI(e,t,r){Promise.resolve().then(()=>{if(oY(aj(),t=>t===oz(e)))return aV()}).then(()=>o1(e).then(a_).then(()=>{t(),setTimeout(()=>{aW()})})).catch(r)}function aM(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function aL(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 aF=!1,aB=[],aU=au&&window.location.href;function aV(){return aW()}function aW(e=[],t,r=!1){let n,o,a,i,s;if(aF)return new Promise((e,r)=>{aB.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],a=[],i=[],s=(new Date).getTime(),aC.forEach(e=>{let t=e.status!==oV&&oH(e);switch(e.status){case oU:t&&s-e.loadErrorTime>=200&&a.push(e);break;case oT:case oN:t&&a.push(e);break;case oj:case o$:!t&&aD[oz(e)]?n.push(e):t&&i.push(e);break;case oM:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:a,appsToMount:i}),p,f=[],m=aU,h=aU=window.location.href;return az?(aF=!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 ag.call(window.history,history.state,"",m.substring(location.origin.length)),aU=location.href,aF=!1,aW(e,t,!0);let n=l.map(a_),o=Promise.all(u.map(o1).map(e=>e.then(a_)).concat(n));o.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let a=c.map(e=>al(e).then(e=>aH(e,o))),i=d.filter(e=>0>c.indexOf(e)).map(e=>aH(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(al)).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(oO(42,!1))),console.warn(e),!1)))}function y(){let t=aP();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(aF=!1,aB.length>0){let e=aB;aB=[],aW(e)}return t}function v(){r||(e.forEach(e=>{af(e.eventArguments)}),af(t))}function b(e=!1,r){let n={},o={[oM]:[],[o$]:[],[oT]:[],[oV]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,oM)}),l.forEach(e=>{i(e,oT)}),u.forEach(e=>{i(e,o$)})):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&&oZ(a.detail,r),a;function i(e,t){let r=oz(e);t=t||aR(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new o_(`single-spa:${e}`,t))}}function aH(e,t){return oH(e)?o0(e).then(e=>t.then(()=>oH(e)?o3(e):e)):t.then(()=>e)}let az=!1;function aK(e){az=!0,au&&(av(e),aW())}au&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...aC]},reroute:aW,NOT_LOADED:oT,toLoadPromise:al,toBootstrapPromise:o0,unregisterApplication:aA,getProfilerData:function(){return oQ}});let aG={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",applicationError:"Application Error",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",clearDevOverrides:"Clear dev overrides",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",copied:"Copied!",copyToClipboard:"Copy to clipboard",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",reload:"Reload",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",serverStartingUp:"The server is starting",serverStartingUpExplainer:"This can take a few minutes. OpenMRS will open automatically when the server is ready.",serverStartingUpSlowExplainer:"This is taking longer than usual. First startup after an upgrade can take 10 minutes or more. You can leave this page open.",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",somethingWentWrongTryReloading:"Something went wrong. Please try reloading.",toggleDevTools:"Toggle dev tools",unknown:"Unknown",viewSetupProgress:"View setup progress",waitingForServer:"Waiting for the server",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var aZ=r(2284),aY=r(3029),aq=r(2901);function aJ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var aX=r(3662);function aQ(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,aX.A)(e,t)}function a0(e,t){if(t&&("object"==(0,aZ.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return aJ(e)}function a1(e){return(a1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a2=r(4467),a4=r(6369),a3=r(3612),a6=r(6562);function a5(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 a9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a5(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var a8={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)}},a7=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aY.A)(this,e),this.init(t,r)}return(0,aq.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||a8,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,a9(a9({},{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}()),ie=function(){function e(){(0,aY.A)(this,e),this.observers={}}return(0,aq.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 it(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function ir(e){return null==e?"":""+e}function io(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 ia(e,t,r){var n=io(e,t,Object);n.obj[n.k]=r}function ii(e,t){var r=io(e,t),n=r.obj,o=r.k;if(n)return n[o]}function is(e,t,r){var n=ii(e,r);return void 0!==n?n:ii(t,r)}function il(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ic(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return iu[e]}):e}var id="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ip=[" ",",","?","!",";"];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,a2.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=function(e){aQ(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=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,aY.A)(this,n),t=r.call(this),id&&ie.call(aJ(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,aq.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=ii(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),ia(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=ii(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=ih(ih({},s),r),ia(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)?ih(ih({},{}),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}(ie),iy={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 iv(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 ib(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iw={},iE=function(e){aQ(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=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e){var t,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,aY.A)(this,n),a=r.call(this),id&&ie.call(aJ(a)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=aJ(a),t.forEach(function(t){e[t]&&(o[t]=e[t])}),a.options=i,void 0===a.options.keySeparator&&(a.options.keySeparator="."),a.logger=a7.create("translator"),a}return(0,aq.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=ip.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,aZ.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,ib(ib({},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,ib(ib({},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,ib(ib({},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,ib(ib({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(ib(ib({},r),{interpolation:ib(ib({},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=ib(ib({},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=iy.handle(p,e,t,this.options&&this.options.postProcessPassResolved?ib({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,!iw["".concat(m[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(iw["".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}(ie);function ix(e){return e.charAt(0).toUpperCase()+e.slice(1)}var iD=function(){function e(t){(0,aY.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=a7.create("languageUtils")}return(0,aq.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]=ix(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]=ix(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=ix(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}(),i_=[{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}],iS={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)}},ik=["v1","v2","v3"],iC={zero:0,one:1,two:2,few:3,many:4,other:5},iP=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,aY.A)(this,e),this.languageUtils=t,this.options=n,this.logger=a7.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={},i_.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iS[e.fc]}})}),r)}return(0,aq.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 iC[e]-iC[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!ik.includes(this.options.compatibilityJSON)}}]),e}();function iO(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 iR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iO(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aY.A)(this,e),this.logger=a7.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,aq.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:ic,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?il(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?il(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?il(t.nestingPrefix):t.nestingPrefixEscaped||il("$t("),this.nestingSuffix=t.nestingSuffix?il(t.nestingSuffix):t.nestingSuffixEscaped||il(")"),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=is(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,iR(iR(iR({},n),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),u=a.join(s.formatSeparator).trim();return s.format(is(t,l,i),u,r,iR(iR(iR({},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=ir(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=iR({},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=iR(iR({},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=ir(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,iR(iR({},a),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return 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,a2.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}function iA(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 i$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,aY.A)(this,e),this.logger=a7.create("formatter"),this.options=t,this.formats={number:iA(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:iA(function(e,t){var r=new Intl.NumberFormat(e,ij(ij({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:iA(function(e,t){var r=new Intl.DateTimeFormat(e,ij({},t));return function(e){return r.format(e)}}),relativetime:iA(function(e,t){var r=new Intl.RelativeTimeFormat(e,ij({},t));return function(e){return r.format(e,t.range||"day")}}),list:iA(function(e,t){var r=new Intl.ListFormat(e,ij({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,aq.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()]=iA(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,a4.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,a3.A)(t)||(0,a6.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,ij(ij(ij({},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 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,a2.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}var iL=function(e){aQ(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=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(this,e)});function n(e,t,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,aY.A)(this,n),a=r.call(this),id&&ie.call(aJ(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=a7.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,aq.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=io(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,iM(iM({},a),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(ie);function iF(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 iB(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 iU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iB(Object(r),!0).forEach(function(t){(0,a2.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iB(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iV(){}var iW=function(e){aQ(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=a1(n);return e=t?Reflect.construct(r,arguments,a1(this).constructor):r.apply(this,arguments),a0(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,aY.A)(this,n),t=r.call(this),id&&ie.call(aJ(t)),t.options=iF(o),t.services={},t.logger=a7,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=aJ(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),a0(t,aJ(t));setTimeout(function(){t.init(o,a)},0)}return t}return(0,aq.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,aZ.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,aZ.A)(e[2])||"object"===(0,aZ.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=iU(iU(iU({},n),this.options),iF(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=iU(iU({},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?a7.init(o(this.modules.logger),this.options):a7.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"u">typeof Intl&&(a=i$);var a,i=new iD(this.options);this.store=new ig(this.options.resources,this.options);var s=this.services;s.logger=a7,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new iP(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 iT(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new iL(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 iE(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=iV),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=it(),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]:iV,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=it();return e||(e=this.languages),t||(t=this.options.ns),r||(r=iV),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&&iy.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=it();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,aZ.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=iU({},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=it();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=it();"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]:iV,o=iU(iU(iU({},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=iU({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new iE(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}(ie);(0,a2.A)(iW,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new iW(e,t)});var iH=iW.createInstance();iH.createInstance=iW.createInstance,iH.createInstance,iH.init,iH.loadResources,iH.reloadResources,iH.use,iH.changeLanguage,iH.getFixedT,iH.t,iH.exists,iH.setDefaultNamespace,iH.hasLoadedNamespace,iH.loadNamespaces,iH.loadLanguages;let iz=iH.default||iH;function iK(e,t,r,n){return iz.t(t,{ns:e,defaultValue:r,...n})}function iG(e,t,r){return aG[e]?iK("core",e,t??aG[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iZ(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iY(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function iY(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function iq({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=iZ(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(iG("navigateNonHttp"));n.startsWith(r)?ap(n):window.location.assign(n)}iz.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iJ="openmrs:history";function iX(e){let t=JSON.parse(sessionStorage.getItem(iJ)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iJ,JSON.stringify(t))}function iQ(){0===JSON.parse(sessionStorage.getItem(iJ)??"[]").length&&document.referrer&&iX(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=i0();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iJ,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?i1({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iX(window.location.href)})}function i0(){return JSON.parse(sessionStorage.getItem(iJ)??"[]")}function i1({toUrl:e}){let t=i0(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);iq({to:t[r]}),sessionStorage.setItem(iJ,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function i2(){sessionStorage.removeItem(iJ)}let i4="${openmrsSpaBase}/login",i3={redirectAuthFailure:{enabled:{_type:no.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:no.String,_default:i4,_validators:[of.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:no.Array,_default:[401],_elements:{_type:no.Number,_validators:[of.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:no.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:no.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function i6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i5="/ws/rest/v1",i9="/ws/fhir2/R4",i8=`${i5}/session`;function i7(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function se(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=i7(e);t.headers||(t.headers={}),em(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(i7(i5),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(i9)){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 nq("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(a&&t&&(r===i7(i8)||204===e.status)&&iq({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===i7(i8)&&403===e.status||n.enabled&&n.errors.includes(e.status))&&(i2(),iq({to:n.url||e.headers.get("location")||i4}),!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 st(r,e,n,o)},()=>{throw new st(r,e,null,o)})})}class st extends Error{constructor(e,t,r,n){super(),i6(this,"response",void 0),i6(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,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
15
+ ${this.stack}`}}let sr=B("session",{loaded:!1,session:null}),sn=0,so=null;function sa(){return so||(sr.getState().loaded&&sn>=Date.now()-6e4?null:su())}function si(e){let t=e?.includeAuthStatus??!0,r=e=>t?e:e.user,n=sa();return n?new Promise(e=>{let t=()=>{let t=sr.getState();t.loaded&&(o(),e(r(t.session)))},o=sr.subscribe(t);n.then(t,t)}):Promise.resolve(r(sr.getState().session))}function ss(){return sa(),sr}function sl(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 su(e,t){sn=Date.now(),a??(a=sn);let r={};e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let n=sb(se(i8,{headers:r,rejectAuthFailure:!0})),o=()=>{so===n&&(so=null)};return n.then(o,o),so=n,n}function sc(){sr.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function sd(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!z(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!z(n.privileges.find(t=>e===t.display))):(z(r)||console.error(`Could not understand privileges "${r}"`),!0))||!z(t.roles.find(e=>"System Developer"===e.display))}function sp(){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(sr.getState()),e||(t=sr.subscribe(n))})}async function sf(){return(await si()).sessionLocation}async function sm(e,t){return sb(se(i8,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function sh(e,t){return await se(i8,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),su()}async function sg(e,t,r){return r||(r=new AbortController),await se(`${i5}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),su()}async function sy(e,t=!1){let r=await se(t?`${i8}?rememberMe=true`:i8,{headers:{"X-Totp-Code":e}});return r.data?.authenticated?(await su()).session:r.data}async function sv(){try{await se(i8,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!sw(e))throw e}sc(),await su().catch(()=>{})}function sb(e){return new Promise((t,r)=>{e.then(e=>{if("object"==typeof e?.data){let r={loaded:!0,session:e.data};sr.setState(r,!0),t(r)}else!function(e){if(!e?.redirected||!e.url)return!1;try{return new URL(e.url,window.location.href).pathname.replace(/\/+$/,"").endsWith("/initialsetup")}catch{return!1}}(e)?r(sE(Error("The session endpoint did not respond with a session"))):r(sE(Error("The server is still starting up"),!0))}).catch(e=>{var n,o;if(sw(e)){"object"==typeof(n=e.responseBody)&&null!==n&&!1===n.authenticated?sr.setState({loaded:!0,session:e.responseBody},!0):sc(),t(sr.getState());return}(o=e)instanceof st&&502===o.response.status&&!sr.getState().loaded&&void 0!==a&&Date.now()-a<18e4?r(sE(e,!0)):(C(`Failed to fetch new session information: ${e}`),r(sE(e)))})})}function sw(e){return e instanceof st&&(401===e.response.status||403===e.response.status)}function sE(e,t=!1){return sr.getState().loaded||sr.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),sr.getState()}function sx(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}sr.subscribe(e=>{e.loaded&&e.session&&sl(e.session)});let sD={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function s_(){nW("@openmrs/esm-api",i3),su()}let sS="import-map-override:",sk="import-map-overrides-disabled",sC="import-map-overrides:change",sP=!1,sO=null,sR=null;async function sT(){return sR??(sR=sN().then(({map:e,complete:t})=>(t||(sR=null),e))),sR}async function sN(){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:sj(t),complete:r}}function sj(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function sA(){let e={};try{let t=sF();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(sS)){let r=n.slice(sS.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 s$(){let e=await sT();return sP?sj([e,sO??sA()]):e}async function sI(){return sT()}async function sM(){return sP?sj([await sT(),sA()]):sT()}function sL(e){if(!sP)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(sS)){let t=localStorage.getItem(r);t&&(e[r.slice(sS.length)]=t)}}return{imports:e}}return sA()}function sF(){if(!sP)return[];try{let e=localStorage.getItem(sk);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sB(e){return!!sP&&sF().includes(e)}function sU(e,t){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sS+e,t),window.dispatchEvent(new CustomEvent(sC))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sV(e){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sS+e);let t=sF().filter(t=>t!==e);t.length>0?localStorage.setItem(sk,JSON.stringify(t)):localStorage.removeItem(sk),window.dispatchEvent(new CustomEvent(sC))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function sW(){if(!sP)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(sS)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sk),window.dispatchEvent(new CustomEvent(sC))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sH(e){if(!sP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sF().filter(t=>t!==e);t.length>0?localStorage.setItem(sk,JSON.stringify(t)):localStorage.removeItem(sk),window.dispatchEvent(new CustomEvent(sC))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sz=!1;function sK(){!sz&&(sz=!0,(sP="development"===window.spaEnv)&&(sO=sA()))}function sG(e){return e.replace(/[\/\-@]/g,"_")}async function sZ(e,t="./start",n){var o;let a,i=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([sY(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=sG(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 sY(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=sG(e);if(!window[r]){let r=t??await sq();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 sL().imports;try{return await function(e){var t;let r=(t=window)[sJ]??(t[sJ]=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&&E({kind:"error",title:iG("scriptLoadingFailed","Error: Script failed to load"),description:iG("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:iG("resetOverrides","Reset overrides"),onActionButtonClick(){sW(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sq(){return s$()}let sJ=Symbol.for("__openmrs_script_loading");function sX(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 sQ(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&&sX(t))}let s0="openmrs-routes:",s1="openmrs-routes:change",s2=!1,s4=null,s3=null;async function s6(){return s3??(s3=s5().then(({map:e,complete:t})=>(t||(s3=null),e))),s3}async function s5(){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&&sQ(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:s9(t),complete:r}}function s9(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 s8(){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(s0)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(s0.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(sX(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(sX(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 s7(){let e=await s6();return s2?s9([e,s4??await s8()]):e}async function le(){return s6()}async function lt(){return s2?s9([await s6(),await s8()]):s6()}function lr(){if(!s2)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(s0)){let t=localStorage.getItem(r);t&&(e[r.slice(s0.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function ln(e,t){if(!s2)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(s0+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!sX(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(s0+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(s0+e,JSON.stringify(t.toString()));else{if(!sX(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(s0+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function lo(e){if(!s2)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(s0+e),window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function la(){if(!s2)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(s0)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(s1))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let li=null;function ls(){return li||(li=(s2="development"===window.spaEnv)?s8().then(e=>{s4=e}):Promise.resolve())}let ll=`${i5}/attachment`;function lu(e,t){return se(`${ll}/${e}`,{signal:t.signal})}function lc(e,t,r,n){return se(ld(e,t,n),{signal:r.signal})}function ld(e,t,r){return r?`${ll}?patient=${e}&encounter=${r}`:`${ll}?patient=${e}&includeEncounterless=${t}`}async function lp(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)),se(`${ll}`,{method:"POST",body:n})}function lf(e,t){return se(`${ll}/${e}`,{method:"DELETE",signal:t.signal})}async function lm(e,t){return e?(await se(`${i9}/Patient/${e}`,t)).data:null}function lh(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lg(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 ly(e){return{uuid:e.uuid,display:e.display}}function lv(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return se(`${i5}/location${n?"?"+n:""}`).then(e=>e.data.results.map(ly))}function lb(e){return{uuid:e.uuid,display:e.display,name:e.name}}let lw=`${i5}/visittype`;function lE(e=lw){return se(e).then(e=>e.data.results.map(lb))}var lx=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),lD=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let l_="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))",lS=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lk(){return V("visit",lS)}function lC(e,t){lk().setState({patientUuid:e,manuallySetVisitUuid:t})}function lP(e,t){return se(`${i5}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lO(e,t,r){return se(`${i5}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lR(e,t,r){return se(`${i5}/visit?patient=${e}&v=${r??l_}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lk().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lT{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lT.version}static addUnaryOp(e){return lT.max_unop_len=Math.max(e.length,lT.max_unop_len),lT.unary_ops[e]=1,lT}static addBinaryOp(e,t,r){return lT.max_binop_len=Math.max(e.length,lT.max_binop_len),lT.binary_ops[e]=t,r?lT.right_associative.add(e):lT.right_associative.delete(e),lT}static addIdentifierChar(e){return lT.additional_identifier_chars.add(e),lT}static addLiteral(e,t){return lT.literals[e]=t,lT}static removeUnaryOp(e){return delete lT.unary_ops[e],e.length===lT.max_unop_len&&(lT.max_unop_len=lT.getMaxKeyLen(lT.unary_ops)),lT}static removeAllUnaryOps(){return lT.unary_ops={},lT.max_unop_len=0,lT}static removeIdentifierChar(e){return lT.additional_identifier_chars.delete(e),lT}static removeBinaryOp(e){return delete lT.binary_ops[e],e.length===lT.max_binop_len&&(lT.max_binop_len=lT.getMaxKeyLen(lT.binary_ops)),lT.right_associative.delete(e),lT}static removeAllBinaryOps(){return lT.binary_ops={},lT.max_binop_len=0,lT}static removeLiteral(e){return delete lT.literals[e],lT}static removeAllLiterals(){return lT.literals={},lT}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 lT(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 lT.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lT.binary_ops[String.fromCharCode(e)]||lT.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lT.isIdentifierStart(e)||lT.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(lT.hooks[e]){let r={context:this,node:t};return lT.hooks.run(e,r),r.node}return t}searchHook(e){if(lT.hooks[e]){let t={context:this};return lT.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lT.SPACE_CODE||e===lT.TAB_CODE||e===lT.LF_CODE||e===lT.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:lT.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)===lT.SEMCOL_CODE||r===lT.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,lT.max_binop_len),t=e.length;for(;t>0;){if(lT.binary_ops.hasOwnProperty(e)&&(!lT.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lT.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:lT.binaryPrecedence(t),right_a:lT.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[a,o,i];t=this.gobbleBinaryOp();){if(0===(r=lT.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lT.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:lT.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:lT.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,lT.isDecimalDigit(e)||e===lT.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lT.SQUOTE_CODE||e===lT.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lT.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lT.max_unop_len)).length;r>0;){if(lT.unary_ops.hasOwnProperty(t)&&(!lT.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lT.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:lT.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lT.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lT.literals.hasOwnProperty(n.name)?n={type:lT.LITERAL,value:lT.literals[n.name],raw:n.name}:n.name===lT.this_str&&(n={type:lT.THIS_EXP})):e===lT.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===lT.PERIOD_CODE||t===lT.OBRACK_CODE||t===lT.OPAREN_CODE||t===lT.QUMARK_CODE;){let r;if(t===lT.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lT.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lT.OBRACK_CODE?((e={type:lT.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lT.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lT.OPAREN_CODE?e={type:lT.CALL_EXP,arguments:this.gobbleArguments(lT.CPAREN_CODE),callee:e}:(t===lT.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lT.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(;lT.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lT.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lT.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++));lT.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lT.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lT.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lT.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lT.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lT.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:lT.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lT.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lT.isIdentifierPart(e))this.index++;else break;return{type:lT.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===lT.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lT.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lT.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lT.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!==lT.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lT.CPAREN_CODE);if(this.code===lT.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lT.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lT.ARRAY_EXP,elements:this.gobbleArguments(lT.CBRACK_CODE)}}}Object.assign(lT,{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)})}}(lT),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"}),lT.max_unop_len=lT.getMaxKeyLen(lT.unary_ops),lT.max_binop_len=lT.getMaxKeyLen(lT.binary_ops);let lN=e=>new lT(e).parse(),lj=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lT).filter(e=>!lj.includes(e)&&void 0===lN[e]).forEach(e=>{lN[e]=lT[e]}),lN.Jsep=lT,lN.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 lA="ArrowFunctionExpression",l$={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)}},lI={...l$,Promise};function lM(e,t={}){return lW(e,t,lK)}async function lL(e,t={}){return lH(e,t,lK)}function lF(e,t={}){return lW(e,t,lG)}function lB(e,t={}){return lH(e,t,lG)}function lU(e,t={}){return lW(e,t,lZ)}function lV(e,t={}){return lH(e,t,lZ)}function lW(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=lQ(t,l$),o=lY("string"==typeof e?lN(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 lH(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=lQ(t,lI);return Promise.resolve(lY("string"==typeof e?lN(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 lz(e){return lN(e)}function lK(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lG(e){return"boolean"==typeof e}function lZ(e){return"number"==typeof e}function lY(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=lY(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 lY(v.left,b)&&lY(v.right,b);case"||":return lY(v.left,b)||lY(v.right,b);case"??":return lY(v.left,b)??lY(v.right,b)}let w=lY(v.left,b),E=lY(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,lY(r.test,n)?lY(r.consequent,n):lY(r.alternate,n);case"CallExpression":return l2(lJ(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 lY(o.body,a.addVariables(t))}).bind(null);case"MemberExpression":return l2(lX(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(l4(s));case"SequenceExpression":let D;return l=e,u=t,(D=l.expressions.map(l4(u)))[D.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(l4(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,(l3(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(l4(f))??[],(C=p.quasis?.map(l4(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 lq(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lq(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lJ(e,t){let r=l1(e.callee,t);if(r===l0||e.optional&&null==r)return l0;let n=e.arguments?.map(l4(t));if(r){if("function"!=typeof r)throw`${l9(e.callee)} is not a function`}else throw`No function named ${l9(e.callee)} is defined in this context`;return r(...n)}function lX(e,t){let r=l1(e.object,t);if(r===l0||e.optional&&null==r)return l0;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${l5(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=lq(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${l5(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}(lY(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);l3(n),function(e,t){if(l6.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 lQ(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lN.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:lA,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=lA,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)})}}),lN.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"}})}}),lN.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)})}}),lN.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")}})}}),lN.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 :")}})}}),lN.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})}}),lN.addBinaryOp("in",7),lN.addBinaryOp("??",1);let l0=Symbol("optional chain short-circuited");function l1(e,t){switch(e.type){case"MemberExpression":return lX(e,t);case"CallExpression":return lJ(e,t);default:return lY(e,t)}}function l2(e){return e===l0?void 0:e}function l4(e){return function(t){return null===t?null:lY(t,e)}}function l3(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let l6=new Set(["toString","valueOf","hasOwnProperty"]);function l5(e,t){try{return lq(e,t)}catch{return"<computed>"}}function l9(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function l8(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:{...lI},isLocalExpression:!1,variables:new Set};return l7("string"==typeof e?lN(e):e,t),[...t.variables]}function l7(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,l7(n.argument,o);case"BinaryExpression":return a=e,i=t,[l7(a.left,i),l7(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[l7(s.consequent,l),l7(s.test,l),l7(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=l7(u.callee,c),u.arguments?.map(ue(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(ue(E))??[],D=l7(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(l7(_.object,S),_.computed)return void l7(_.property,S);let k={...S};k.isLocalExpression=!0,l7(_.property,k);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(ue(p));case"SequenceExpression":return f=e,m=t,void f.expressions?.map(ue(m));case"NewExpression":return h=e,g=t,void h.arguments?.map(ue(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(ue(v)),y.quasis?.map(ue(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ue(e){return function(t){return null===t?null:l7(t,e)}}let ut=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 ur(e,t,r){ut.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function un(){let e=ut.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 uo(e){return ut.getState().flags[e].enabled}function ua(e,t){ut.subscribe(r=>{t(r.flags[e].enabled)})}function ui(e,t){ut.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}ut.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 us=tF(function(e,t,r){tT(e,t,r)});let ul=B("extensionsInternal",{slots:{},extensions:{}}),uu=B("extensionRenderings",{renderings:new Map}),uc=()=>V("extensionsInternal",{slots:{},extensions:{}}),ud=()=>V("extensionRenderings",{renderings:new Map});function up(e){let t=ul.getState(),r=e(t);r!==t&&ul.setState(r)}let uf=null,um=null;function uh(){let e=uu.getState();return uf&&e===um||(uf=new Map(e.renderings),um=e,function(e){for(let t of(uS.clear(),e.values()))uC(t,1);uk=!0}(uf)),uf}function ug(e){um={renderings:e},uu.setState(um,!0)}function uy(e){let t=uh();t.has(e.renderingId)||(t.set(e.renderingId,e),uC(e,1),ug(t))}function uv(e){let t=uh(),r=t.get(e);r&&(t.delete(e),uC(r,-1),ug(t))}let ub=()=>V("extensions",{slots:{}}),uw=0,uE=new Set;function ux(e){uw++;try{return e()}finally{if(0==--uw&&uE.size>0){let e=Array.from(uE);for(let t of(uE.clear(),e))uD(t)}}}function uD(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function u_(e){uw>0?uE.add(e):uD(e)}let uS=new Map,uk=!1;function uC(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=uS.get(r);if(!n){if(t<0)return;uS.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),uk=!0;return}n.count+=t,n.count<1&&(uS.delete(r),uk=!0)}function uP(){var e,t;if(uh(),!uk)return;uk=!1;let r=Array.from(uS.values(),({record:e})=>e);r.sort(uO),e=nm.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===uO(e,t[r]))||nm.setState({mountedExtensions:r})}function uO(e,t){return uR(e.slotName,t.slotName)||uR(e.extensionId,t.extensionId)||uR(e.slotModuleName,t.slotModuleName)||uR(e.extensionModuleName,t.extensionModuleName)}function uR(e,t){return e===t?0:e<t?-1:1}uP(),uu.subscribe(()=>u_(uP));let uT=uc(),uN=ub(),uj=ng(),uA=nb(),u$=new Set,uI=!1;function uM(e){if(null===e)u$=null;else if(null!==u$)for(let t of e)u$.add(t);u_(uL)}function uL(){if(!uI){uI=!0;try{for(let e=1;;e++){let t=u$;if(null!==t&&0===t.size)return;u$=new Set;try{!function(e,t,r,n,o,a=null){let i=uN.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}=nv(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}=uT.getState(),i=new Set(n),s=[...t,...r].filter(e=>!i.has(e)),l=uZ(o),u=uZ(t),c=new Map(s.map(e=>[e,function(e,t,r,n){let o=t.get(e);if(void 0!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.get(e);return void 0!==t?2e3+t:3e3}}(e,l,a[uU(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(r,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=nE(n,e,l),u=nx(r,e,l),c=u?us({},i,u):i,d=uU(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||!sd(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&&rE(d.candidateExtensions,f)?s[n]=d:(s[n]={moduleName:c.moduleName,candidateExtensions:f},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uN.setState({slots:s})}(uT.getState(),uj.getState(),uA.getState(),ut.getState(),sr.getState(),t)}catch(e){throw u$=null===t||null===u$?null:new Set([...t,...u$]),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{uI=!1}}}function uF(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 uB(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uU(e){let[t]=e.split("#");return t}function uV(e,t){let r=uU(t);return e.extensions[r]}function uW(e){return uV(uT.getState(),e)}uT.subscribe((e,t)=>{uM(e.extensions!==t.extensions?null:uF(e.slots,t.slots))}),uj.subscribe((e,t)=>{uM(uF(e.slots,t.slots))}),uA.subscribe((e,t)=>{uM(uF(e.configs,t.configs))}),ut.subscribe(()=>uM(null)),sr.subscribe(()=>uM(null)),uM(null);let uH=e=>up(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uz(e,t){up(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...uB(e),attachedIds:[t]}}}})}function uK(e,t){up(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 uG(e){up(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function uZ(e){let t=new Map;return e.forEach((e,r)=>{t.has(e)||t.set(e,r)}),t}function uY(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!!lF(a,o)}catch(t){return console.error(`Error while evaluating expression '${a}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(uq(e),t,sr.getState().session,e)}function uq(e){return uN.getState().slots[e]?.candidateExtensions??[]}let uJ=(e,t)=>uT.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=uB(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),uX=()=>{u$=null,up(()=>({slots:{},extensions:{}})),ud().setState({renderings:new Map}),uN.setState({slots:{}})},uQ=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function u0({name:e,basePath:t,mode:r,componentContext:n,state:o}){uQ.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function u1(e){uQ.getState().slotName===e&&uQ.setState(uQ.getInitialState(),!0)}let u2=B("modalRegistry",{modals:{}});function u4(e){u2.setState(t=>(t.modals[e.name]=e,t))}function u3(e){let t=u2.getState().modals[e];if(!t){let r=uW(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.`),u4(t))}return t}let u6=B("workspaceRegistrations",{workspaces:{}}),u5=B("workspaceGroups",{workspaceGroups:{}});function u9(e){u6.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 u8(e){u5.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 u7=new Set;function ce(e){let t=u6.getState().workspaces;if(t[e])return t[e];{let t=uW(e);if(t){var r;let n;return u7.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.`),u7.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?iK(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 ct(e){let t=u5.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let cr=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function cn(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=cr.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 co(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=cr.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 ca(e){let{openedWindows:t}=cr.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function ci(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=cr.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}}cr.setState({registeredGroupsByName:n})}function cs(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=cr.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}cr.setState({registeredWindowsByName:n})}function cl(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=cr.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}cr.setState({registeredWorkspacesByName:n})}let cu=0,cc=null,cd={bootstrap:15e3,mount:15e3,unmount:15e3};function cp(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(cd).filter(t=>e[t]).map(n=>{var o,a;let i,s;return[n,(o=e[n],a=cd[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 cf(e,t){var r,n;let o,a,i,s,l,u=await (cc??(cc=new Promise((e,t)=>{o9({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),o9))),cc),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=>cp(e,r)):cp(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 cm(){return ch}function ch(e,t){let r,n=cf(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 cg(e,t,r,n,o=e=>e,a={}){let i=uU(n),s=uW(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=cu++,m=`${t}/${n}-${f}`;e.dataset.extensionRenderingId=m;let h=e=>{try{uv(m)}catch(t){console.error(e,t)}};try{uy({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 cf(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 cy=r(4923),cv=r.n(cy);let cb=(0,cy.createContext)({moduleName:"",featureName:""});function cw({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cy.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}`)},[]),cv().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),iq({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:iZ(e,t),...o},n)}let cE=({state:e,children:t,...r})=>{let{extension:n}=(0,cy.useContext)(cb),o=(0,cy.useRef)(null),a=(0,cy.useRef)(Promise.resolve()),i=(0,cy.useRef)(!1),s=(0,cy.useRef)(!1),l=(0,cy.useRef)(e),u=(0,cy.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,cy.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,cy.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cg(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,cy.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(o.current)}),[]),(0,cy.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cv().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function cx(e){let t=(0,cy.useRef)(e);return R(t.current,e)||(t.current=e),t.current}function cD(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 c_=e=>e;function cS(e,t=c_,r){let n=(0,cy.useCallback)(t=>e.subscribe(t),[e]),o=(0,cy.useCallback)(()=>t(e.getState()),[e,t]),a=(0,cy.useSyncExternalStore)(n,o,o),i=(0,cy.useMemo)(()=>r?cD(e,r):null,[e,r]);return(0,cy.useMemo)(()=>i?{...a,...i}:a,[a,i])}function ck(e,t){return cS(e,c_,t)}function cC(e){return function(t){let r=(0,cy.useCallback)(t=>e.subscribe(t),[]),n=(0,cy.useCallback)(()=>e.getState(),[]),o=(0,cy.useSyncExternalStore)(r,n,n),a=(0,cy.useMemo)(()=>t?cD(e,t):null,[t]);return(0,cy.useMemo)(()=>a?{...o,...a}:o,[o,a])}}let cP=[];Object.freeze(cP);let cO={candidateExtensions:cP};Object.freeze(cO);let cR=e=>{let t=(0,cy.useCallback)(t=>t.slots?.[e]??cO,[e]);return cS(ub(),t)},cT=e=>e.session;function cN(e,t){let{candidateExtensions:r}=cR(e),n=cS(sr,cT),o=cx(t);return(0,cy.useMemo)(()=>uY(e,o),[e,o,n,r])}function cj(e,t){let{moduleName:r}=(0,cy.useContext)(cb);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cy.useEffect)(()=>{uJ(r,e)},[r,e]),{extensions:cN(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function cA(e){return e}function c$({name:e,extensionSlotName:t,select:r=cA,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,cy.useRef)(null),{extensions:u,extensionSlotModuleName:c}=cj(s,o),d=(0,cy.useMemo)(()=>r(u),[r,u]),p=(0,cy.useMemo)(()=>{if("function"==typeof n&&!cv().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cv().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)=>cv().createElement(cb.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)??cv().createElement(cE,{state:o}))))}var cI=r(5338);function cM(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 cL(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cM(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)):cM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cF(e){return(cF="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 cB(e){return(cB="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 cU(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(cB(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(cB(e)));return e}}var cV=null;try{cV=require("react").createContext()}catch(e){}var cW={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 cH(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cz(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=cY(e,t,function(){r(this)}),i=cU(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:cZ(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cK(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():cZ(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cG(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=cY(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var a=cU(e,t)();cZ(e).render(n,a)}})}function cZ(e){return e.ReactDOMClient||e.ReactDOM}function cY(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=cV?e.React.createElement(cV.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,cL(cL({},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 cq=r(202),cJ=r(2551),cX=r.n(cJ),cQ=r(7900);let c0={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},c1=new Map;(0,cQ.initCache)(c1);let c2={errorRetryCount:3,fetcher:se,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof st){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>c1};function c4(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},c0,e),r={...c2,...t.swrConfig};return function(e){var n,o,a,i,s;return a=o=class extends(n=cv().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 cv().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cv().createElement(cy.Suspense,{fallback:null},cv().createElement(cJ.SWRConfig,{value:r},cv().createElement(cb.Provider,{value:this.state.config},t.disableTranslations?cv().createElement(e,this.props):cv().createElement(cq.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},cv().createElement(e,this.props)))));return t.strictMode&&cv().StrictMode?cv().createElement(cv().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 c3(e,t){return function(e){if("object"!==cF(e))throw Error("single-spa-react requires a configuration object");var t,r=cL(cL({},cW),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");!cV&&r.React.createContext&&(cV=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:cH.bind(null,r),mount:cz.bind(null,r),unmount:cK.bind(null,r)};return r.parcelCanUpdate&&(n.update=cG.bind(null,r)),n}({React:cv(),ReactDOMClient:cI,rootComponent:c4(t)(e)})}function c6(e,t){return()=>e().then(({default:e})=>c3(e,t))}function c5(e,t){return()=>Promise.resolve(c3(e,t))}let c9=c6,c8=A()(()=>({}));U("openmrs-app-context",c8);let c7={};function de(e,t=e=>e){let r=c8.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function dt(e,t){c8.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function dr(e){return null===e?null:Object.freeze(Object.assign({},e))}let dn=new Map;function da(e,t){let r=(0,cy.useRef)(t??{}),n=(0,cy.useRef)(t=>dt(e,t)),o=(0,cy.useRef)(Symbol());return(0,cy.useEffect)(()=>{let r=t??{},n=o.current;return null===de(e)?!function(e,t=c7){c8.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===c7?{}: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.`),dt(e,()=>r)),dn.set(e,n),()=>{dn.get(e)===n&&(c8.setState(t=>(e in t&&delete t[e],t)),dn.delete(e))}},[e]),(0,cy.useEffect)(()=>{let n=t??{};R(r.current,n)||(dt(e,()=>n),r.current=n)},[t]),n.current}function di({namespace:e,value:t}){return da(e,t),null}let ds=({children:e,value:t,fallback:r})=>t?cv().createElement(cv().Fragment,null,e):r?cv().createElement(cv().Fragment,null,r):null;function dl(){let e=(0,cy.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cy.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function du(e,t=e=>e??{}){let[r,n]=(0,cy.useState)(()=>{if(dc(e))return;let r=de(e);if(null!==r)return t?t(r):r});return(0,cy.useEffect)(()=>{if(dc(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cy.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>R(e,r)?e:r)})(dr(o=de(e))),c8.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(dr(n)))})},[e,t]),r}function dc(e){return"string"!=typeof e||0===e.trim().length}function dd(e){let t=cN(e);return(0,cy.useMemo)(()=>t.map(e=>e.id),[t])}function dp(e){return cR(e).candidateExtensions}function df(e,t,r){let{data:n,error:o,mutate:a,isLoading:i,isValidating:s}=cX()(e?ld(e,t,r):null,se);return(0,cy.useMemo)(()=>({isLoading:i,data:n?.data.results??[],error:o,mutate:a,isValidating:s}),[n,o,i,s,a])}function dm(e){(0,cy.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dh={},dg=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dy(e){let{moduleName:t,extension:r}=(0,cy.useContext)(cb),n=e?.externalModuleName??t;if(!n&&!r)throw Error(dg);let o=function(e){let t=(0,cy.useMemo)(()=>nh(e),[e]),r=function(e){let[t,r]=(0,cy.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cy.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dh[e]||(dh[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),dh[e];return r}(n),a=function(e){let t=(0,cy.useMemo)(nb,[]),r=function(e,t){let[r,n]=(0,cy.useState)(t?()=>{let r=nE(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cy.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=nE(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!rE(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!dh[r]&&t&&(dh[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=nE(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),dh[r]}return r||{}}(r);return(0,cy.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...a},[n,e?.externalModuleName,o,a])}let dv=cN;function db(e,t=300){let[r,n]=(0,cy.useState)(e);return(0,cy.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dw=r(6880),dE=r.n(dw);let dx=`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 dD(){let e=`${i5}/emrapi/configuration?v=${dx}`,t=dE()(e,se);return(0,cy.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function d_(){return(0,cy.useContext)(cb).extension}let dS=cC(uc());function dk(e){let t=cN(e);return(0,cy.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let dC=cC(ub());function dP(e){let{flags:t}=cS(ut);return t[e]?.enabled??!1}function dO(){let[,e]=(0,cy.useState)(0);return(0,cy.useCallback)(()=>{e(e=>e+1)},[])}function dR(e,t,r={}){return dN(e,t,dT,r)}let dT={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i7(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 dN(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??se,[d,p]=(0,cy.useState)(1),f=(0,cy.useRef)(NaN),m=(0,cy.useRef)(NaN),h=(0,cy.useRef)(d),g=(0,cy.useRef)(!1),y=(0,cy.useRef)(!1),v=e?.toString()??"",[b,w]=(0,cy.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,cy.useMemo)(()=>o(e,t,E),[e,t,E]),{data:D,..._}=(l?dE():cX())(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,cy.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,cy.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,cy.useCallback)(()=>{k(h.current+1)},[k]),P=(0,cy.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 dj(e,t,r={}){return dN(e,t,dA(),r)}function dA(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(i7(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 d$=r(6310),dI=r.n(d$);function dM(e,t={}){return dL(e,dT,t)}function dL(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:a,getTotalCount:i,getData:s}=t,l=r.fetcher??se,u=(0,cy.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=dI()(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 dF(e,t={}){return dB(e,dT,t)}function dB(e,t,r={}){let n=dL(e,t,r),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cy.useEffect)(()=>{o&&!a&&s()},[o,u]),r.partialData)?n:{...n,data:o||a?void 0:i,isLoading:l||o}}function dU(e,t={}){return dB(e,dA(),t)}function dV(e,t={}){return dL(e,dA(),t)}function dW(){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 dH(){let[e,t]=(0,cy.useState)(dW);return(0,cy.useEffect)(()=>{let e=()=>{t(dW())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dz=e=>"small-desktop"===e||"large-desktop"===e;function dK(e){let t=(0,cy.useContext)(cb);(0,cy.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),u0(e),()=>{u1(e.name)}),[t,e])}function dG(){return cS(uQ)}let dZ=[];function dY(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString(),{data:o}=dF(`${i5}/location${n?"?"+n:""}`,{immutable:!0});return o??dZ}function dq(e,t=!0){let r=(0,cy.useRef)(null);return(0,cy.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 dJ(e){let t=(0,cy.useRef)();return(0,cy.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 dX(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:a}=t,i=dl(),s=(0,cy.useMemo)(()=>n?.signal??r?.signal??i.signal,[r?.signal,n?.signal,i.signal]),l=(0,cy.useCallback)(e=>se(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 cX()(e,l,a)}function dQ(e=[],t=10){let[r,n]=(0,cy.useState)(1),o=(0,cy.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,cy.useMemo)(()=>{let r=(a-1)*t,n=(a+0)*t;return e.slice(r,n)},[e,a,t]),s=(0,cy.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cy.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cy.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cy.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 d0(e,t,r,n){return{pageSizes:(0,cy.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cy.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function d1(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function d2(e){let[t,r]=(0,cy.useState)(e??d1()),{data:n,error:o,isValidating:a}=cX()(t?["patient",t]:null,()=>lm(t,{}));return(0,cy.useEffect)(()=>{let e=()=>{let e=d1();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cy.useMemo)(()=>({isLoading:a&&!o&&!n,patient:n,patientUuid:t,error:o}),[a,o,n,t])}function d4(){let e=`${i5}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=cX()(e,se);return(0,cy.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function d3(e){let{extensions:t,extensionSlotModuleName:r}=cj(e);return e?t.map(t=>({state:n})=>cv().createElement(cb.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cv().createElement(cE,{state:n}))):[]}function d6(){let e=(0,cy.useRef)(),[t,r]=(0,cy.useState)(null),n=null;if(!t){if(i){let e=ss().getState();e.loaded&&(n=e.session)}else i=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(ss().getState()),n||(e.current=ss().subscribe(r))});if(n)r(n);else throw i}(0,cy.useEffect)(()=>(e.current||(e.current=ss().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(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return o}let d5=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cy.useState)(null);return((0,cy.useEffect)(()=>{let e=ss(),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&&sd(e,n))?cv().createElement(cv().Fragment,null,r):t?cv().createElement(cv().Fragment,null,t):null};var d9=r(4353),d8=r.n(d9),d7=r(7581);let pe=new Map;function pt(){for(let e of Array.from(pe.values()))e()}let pr={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function pn(e){let t=(0,cy.useId)();return(0,cy.useEffect)(()=>{if(e)return pe.set(t,e),()=>{pe.delete(t)}},[t,e]),{...ck(lk(),pr),mutateVisit:pt}}function po(e,t=l_){let r=(0,cy.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:a}=pn((0,cy.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}=cX()(e?`${i5}/visit${s}`:null,se),{data:f,error:m,mutate:h,isValidating:g}=cX()(e&&i?`${i5}/visit${l}`:null,se),y=(0,cy.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,cy.useMemo)(()=>i&&f?f.data:null,[f,i]),b=(0,cy.useRef)(null);(0,cy.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,cy.useCallback)(()=>{d(),h()},[d,h]);(0,cy.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}}d9.extend(d7);let pa=[];function pi(){let{data:e}=dE()(lw,lE);return e??pa}let ps=new Map;async function pl(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 sZ(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?pc(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`),pu)}let pu={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function pc(e,t){if(e in ps)await ps[e];else{let r=t??await sZ(e);await (ps[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nz(e),t(null)}).catch(n)}nz(e),t(null)}))}}function pd(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(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.
20
+ To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(uH({name:r,load:()=>pl(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))uz(o,r)}let pp=[];function pf(e,t){ux(()=>(function(e,t){if(e&&t&&"object"==typeof t){nH(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"))?pp.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")?pd(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?u4({name:r,moduleName:e,load:()=>pl(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(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.
26
+ To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(u9({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:()=>pl(e,t.component)}),t.groups||[]))u8({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)?u8({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)}),ci(e,s);for(let t of(cs(e,l),l))t.icon&&pd(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});cl(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?ur(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 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}}}]);
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 pm(){pp.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pp){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?aN(e,()=>pl(t.appName,t.component),function(e,{featureFlag:t}){return t?r=>!!uo(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?aL(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 ph={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 pg(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<ph.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>ph.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>ph.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<ph.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<ph.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<ph.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>ph.SMALL_DESKTOP_MAX)}let py=!1;function pv(){py||(window.addEventListener("resize",pg),pg(),py=!0)}var pb=r(4848),pw=r(6942),pE=r.n(pw);function px({title:e,children:t}){let r="tablet"===dH();return(0,pb.jsxs)("div",{className:pE()({"-esm-cohort-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-cohort-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,pb.jsx)("h4",{children:e}),t]})}let pD=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],p_={primaryColor:{_type:no.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[of.oneOf(pD)]},secondaryColor:{_type:no.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[of.oneOf(pD)]}},pS={"Brand color #1":{_default:"#005d5d",_type:no.String},"Brand color #2":{_default:"#004144",_type:no.String},"Brand color #3":{_default:"#007d79",_type:no.String},excludePatientIdentifierCodeTypes:{uuids:{_type:no.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:no.UUID}}},implementationName:{_type:no.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:no.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[of.isUrl]},alt:{_type:no.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:no.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:no.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:[of.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:no.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:no.String}},diagnosisTags:p_};var pk=r(9536);let pC={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},pP=e=>(0,pb.jsx)(pk.TableBatchActions,{translateWithId:(e,t)=>{let r=pC[e];return r?iG(r,e,t):e},...e}),pO="-esm-cohort-builder__custom-overflow-menu-module__container___lY3iq",pR="-esm-cohort-builder__custom-overflow-menu-module__menu___dReHr",pT="-esm-cohort-builder__custom-overflow-menu-module__show___48R0e",pN="-esm-cohort-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",pj=(0,cy.createContext)(null);function pA(){let e=(0,cy.useContext)(pj);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function p$({menuTitle:e,children:t}){let[r,n]=cv().useState(!1),o=dq(()=>n(!1),r),a="tablet"===dH(),i=(0,cy.useCallback)(()=>n(e=>!e),[]),s=(0,cy.useRef)(null),l=(0,cy.useRef)(null),u=(0,cy.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,cy.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,cy.useMemo)(()=>({closeMenu:p}),[p]),m=(0,cy.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),h=cy.Children.toArray(t);(0,cy.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let g=(0,cy.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,cy.isValidElement)(e)?(0,cy.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:g,index:t}):e);return(0,pb.jsxs)("div",{"data-overflow-menu":!0,className:pE()("cds--overflow-menu",pO),ref:o,children:[(0,pb.jsx)("button",{className:pE()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},pN),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:m,ref:s,children:e}),(0,pb.jsxs)("div",{className:pE()("cds--overflow-menu-options","cds--overflow-menu--flip",pR,{[pT]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:m,ref:l,role:"menu",tabIndex:-1,children:[(0,pb.jsx)("ul",{className:pE()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,pb.jsx)(pj.Provider,{value:f,children:y})}),(0,pb.jsx)("span",{})]})]})}function pI(e){let t=(0,cy.useContext)(pj);return(0,pb.jsx)(pk.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var pM=r(8168);(er=eo||(eo={})).Pop="POP",er.Push="PUSH",er.Replace="REPLACE";var pL=function(e){return e},pF="beforeunload";function pB(e){e.preventDefault(),e.returnValue=""}function pU(){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 pV(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 pW=(0,cy.createContext)(null),pH=(0,cy.createContext)(null);function pz(e,t){if(!e)throw Error(t)}function pK(){return null!=(0,cy.useContext)(pH)}function pG(e){let{basename:t="/",children:r=null,location:n,navigationType:o=eo.Pop,navigator:a,static:i=!1}=e;pK()&&pz(!1);let s=t.replace(/\/+$/,"").replace(/^\/*/,"/"),l=(0,cy.useMemo)(()=>({basename:s,navigator:a,static:i}),[s,a,i]);"string"==typeof n&&(n=pV(n));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default"}=n,m=(0,cy.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,cy.createElement)(pW.Provider,{value:l},(0,cy.createElement)(pH.Provider,{children:r,value:{location:m,navigationType:o}}))}function pZ(e){let{basename:t,children:r,window:n}=e,o=(0,cy.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,pL({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=eo.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=eo.Pop,s=o(),l=s[0],u=s[1],c=pU(),d=pU();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),pL((0,pM.A)({pathname:u.pathname,hash:"",search:""},"string"==typeof e?pV(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,pM.A)({},n.state,{idx:l}),"")),{get action(){return i},get location(){return u},createHref:p,push:function e(t,o){var a=eo.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=eo.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(pF,pB),function(){t(),d.length||r.removeEventListener(pF,pB)}}}}({window:n}));let a=o.current,[i,s]=(0,cy.useState)({action:a.action,location:a.location});return(0,cy.useLayoutEffect)(()=>a.listen(s),[a]),(0,cy.createElement)(pG,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}let pY=["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"],pq=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),pJ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-add",iconProps:e})})),pX=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),pQ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),p0=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),p1=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),p2=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),p4=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),p3=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),p6=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),p5=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),p9=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),p8=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),p7=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),fe=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),ft=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),fr=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),fn=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),fo=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),fa=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),fi=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),fs=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),fl=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-close",iconProps:e})})),fu=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),fc=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),fd=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-document",iconProps:e})})),fp=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),ff=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-download",iconProps:e})})),fm=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),fh=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),fg=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),fy=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-events",iconProps:e})})),fv=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),fb=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),fw=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),fE=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),fx=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),fD=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-group",iconProps:e})})),f_=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),fS=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),fk=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),fC=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-information",iconProps:e})})),fP=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),fO=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),fR=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),fT=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),fN=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),fj=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-location",iconProps:e})})),fA=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),f$=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),fI=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),fM=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),fL=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),fF=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),fB=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-money",iconProps:e})})),fU=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),fV=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),fW=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),fH=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),fz=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-password",iconProps:e})})),fK=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),fG=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),fZ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),fY=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),fq=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),fJ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),fX=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),fQ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-report",iconProps:e})})),f0=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),f1=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-save",iconProps:e})})),f2=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-search",iconProps:e})})),f4=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),f3=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),f6=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),f5=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),f9=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),f8=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),f7=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),me=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-table",iconProps:e})})),mt=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-time",iconProps:e})})),mr=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),mn=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),mo=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),ma=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mi=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),ms=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),ml=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mu=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mc=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-user",iconProps:e})})),md=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mp=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mf=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(mw,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mm=mf,mh=fp,mg=fN,my=fk,mv=f5,mb=(0,cy.memo)((0,cy.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cy.useRef)(e?document.getElementById(e):void 0);return(0,cy.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,pb.jsx)(ds,{value:o.current,fallback:t,children:(0,pb.jsx)(mw,{ref:n,icon:e,iconProps:r})})})),mw=(0,cy.memo)((0,cy.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,cy.useRef)(null);return(0,cy.useImperativeHandle)(r,()=>i.current),(0,cy.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,pb.jsx)("svg",{ref:i,className:pE()("omrs-icon","-esm-cohort-builder__icons-module__icon___sq7Qp",n),height:a,width:a,viewBox:"0 0 16 16",children:(0,pb.jsx)("use",{href:`#${e}`})})})),mE=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,cq.useTranslation)(),a=(pK()||pz(!1),(0,cy.useContext)(pH).location),i=(0,cy.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,pb.jsx)("div",{children:(0,pb.jsx)(cw,{className:pE()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${r}/${encodeURIComponent(e)}`,children:(0,pb.jsxs)("span",{className:"-esm-cohort-builder__dashboard-module__menu___Lg1M+",children:[(0,pb.jsx)(mb,{icon:n,className:"-esm-cohort-builder__dashboard-module__icon___Y2DxK",size:16}),(0,pb.jsx)("span",{children:o(t)})]})})},e)};function mx(e){return function({basePath:t}){return(0,pb.jsx)(pZ,{children:(0,pb.jsx)(mE,{basePath:t,...e})})}}function mD(e){let t=(0,cy.useRef)(null);return(0,cy.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function m_(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let mS="u">typeof document?cv().useLayoutEffect:()=>{};function mk(e){let t=(0,cy.useRef)(null);return mS(()=>{t.current=e},[e]),(0,cy.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let mC={prefix:String(Math.round(1e10*Math.random())),current:0},mP=cv().createContext(mC),mO=cv().createContext(!1),mR=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mT="function"==typeof cv().useId?function(e){let t=cv().useId(),[r]=(0,cy.useState)(m$()),n=r?"react-aria":`react-aria${mC.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cy.useContext)(mP),r=function(e=!1){let t=(0,cy.useContext)(mP),r=(0,cy.useRef)(null);if(null===r.current&&!e){var n,o;let e=null==(o=cv().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=o.ReactCurrentOwner)?void 0:n.current;if(e){let r=mR.get(e);null==r?mR.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mR.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mN(){return!1}function mj(){return!0}function mA(e){return()=>{}}function m$(){return"function"==typeof cv().useSyncExternalStore?cv().useSyncExternalStore(mA,mN,mj):(0,cy.useContext)(mO)}let mI=!!("u">typeof window&&window.document&&window.document.createElement),mM=new Map;function mL(e){let[t,r]=(0,cy.useState)(e),n=(0,cy.useRef)(null),o=mT(t),a=(0,cy.useRef)(null);if(s&&s.register(a,o),mI){let e=mM.get(o);e&&!e.includes(n)?e.push(n):mM.set(o,[n])}return mS(()=>()=>{s&&s.unregister(a),mM.delete(o)},[o]),(0,cy.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mF(e=[]){let t=mL(),[r,n]=function(e){let[t,r]=(0,cy.useState)(e),n=(0,cy.useRef)(null),o=mk(()=>{if(!n.current)return;let e=n.current.next();if(e.done){n.current=null;return}t===e.value?o():r(e.value)});mS(()=>{n.current&&o()});let a=mk(e=>{n.current=e(t),o()});return[t,a]}(t),o=(0,cy.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return mS(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mM.delete(e)}));let mB=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 mU(...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]=m_(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mB(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mM.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mM.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let mV=Symbol("default");function mW({values:e,children:t}){for(let[r,n]of e)t=cv().createElement(r.Provider,{value:n},t);return t}function mH(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,cy.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 mz(e,t){let r=(0,cy.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mV;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 mK(e,t,r){let{ref:n,...o}=mz(r,e.slot)||{},a=mD((0,cy.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=mU(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 mG(e=!0){let[t,r]=(0,cy.useState)(e),n=(0,cy.useRef)(!1),o=(0,cy.useCallback)(e=>{n.current=!0,r(!!e)},[]);return mS(()=>{n.current||r(!1)},[]),[o,t]}function mZ(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let mY=(0,cy.createContext)(null),mq=null;function mJ(e,t="assertive",r=7e3){mq?mq.announce(e,t,r):(mq=new mX,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mq.announce(e,t,r):setTimeout(()=>{(null==mq?void 0:mq.isAttached())&&(null==mq||mq.announce(e,t,r))},100))}class mX{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 mQ=new Set(["id"]),m0=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),m1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),m2=/^(data-.*)$/;function m4(e,t={}){let{labelable:r,isLink:n,propNames:o}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mQ.has(t)||r&&m0.has(t)||n&&m1.has(t)||(null==o?void 0:o.has(t))||m2.test(t))&&(a[t]=e[t]);return a}let m3=["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"])'],m6=m3.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";m3.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let m5=m3.join(':not([hidden]):not([tabindex="-1"]),');function m9(e){return e.matches(m6)}function m8(e){return e.matches(m5)}let m7=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},he=e=>e&&"window"in e&&e.window===e?e:m7(e).defaultView||window;function ht(e){if(function(){if(null==hr){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}())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 hr=null;function hn(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function ho(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function ha(e){let t=(0,cy.useRef)({isFocused:!1,observer:null});mS(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=mk(t=>{null==e||e(t)});return(0,cy.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(hn(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 hi=!1;function hs(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 hl(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 hu(e){let t=null;return()=>(null==t&&(t=e()),t)}let hc=hu(function(){return hl(/^Mac/i)}),hd=hu(function(){return hl(/^iPhone/i)}),hp=hu(function(){return hl(/^iPad/i)||hc()&&navigator.maxTouchPoints>1}),hf=hu(function(){return hd()||hp()});hu(function(){return hc()||hf()});let hm=hu(function(){return hs(/AppleWebKit/i)&&!hh()}),hh=hu(function(){return hs(/Chrome/i)}),hg=hu(function(){return hs(/Android/i)}),hy=hu(function(){return hs(/Firefox/i)}),hv=new Map,hb=new Set;function hw(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=hv.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),hv.delete(r.target)),0===hv.size)){for(let e of hb)e();hb.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=hv.get(r.target);n||(n=new Set,hv.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function hE(e){requestAnimationFrame(()=>{0===hv.size?e():hb.add(e)})}"u">typeof document&&("loading"!==document.readyState?hw():document.addEventListener("DOMContentLoaded",hw));let hx="default",hD="",h_=new WeakMap;function hS(e){if(hf())"disabled"===hx&&(hx="restoring",setTimeout(()=>{hE(()=>{if("restoring"===hx){let t=m7(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=hD||""),hD="",hx="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&h_.has(e)){let t=h_.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),h_.delete(e)}}let hk=cv().createContext({register:()=>{}});function hC(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function hP(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function hO(e,t,r){var n=hC(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 hR(e,t){mS(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hT(){let e=(0,cy.useRef)(new Map),t=(0,cy.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,cy.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,cy.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cy.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}hk.displayName="PressResponderContext";function hN(e,t){return!!t&&!!e&&e.contains(t)}function hj(e){return e.target}function hA(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=t;hy()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(hc()?a=!0:i=!0);let u=hm()&&hc()&&!hp()&&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});hA.isOpening=r,ht(e),e.dispatchEvent(u),hA.isOpening=!1}function h$(e){return 0===e.mozInputSource&&!!e.isTrusted||(hg()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hA.isOpening=!1;var hI=r(1779),hM=r.n(hI),hL=new WeakMap;class hF{continuePropagation(){hO(this,hL,!1)}get shouldStopPropagation(){var e;return e=hC(this,hL,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var o;hP(this,hL,{writable:!0,value:void 0}),hO(this,hL,!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 hB=Symbol("linkClicked");function hU(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,cy.useContext)(hk);if(t){let{register:r,...n}=t;e=mU(n,e),r()}return hR(t,e.ref),e}(e),[m,h]=(0,cy.useState)(!1),g=(0,cy.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hT(),b=mk((e,t)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,n){let r=new hF("pressstart",t,e);n(r),a=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,h(!0),a}),w=mk((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 hF("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),h(!1),t&&a&&!s){let r=new hF("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=mk((e,t)=>{let r=g.current;if(s)return!1;if(a){r.isTriggeringEvent=!0;let n=new hF("pressup",t,e);return a(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),x=mk(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(hH(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hS(t.target),t.disposables))r();t.disposables=[]}}),D=mk(e=>{c&&x(e)}),_=mk(e=>{null==i||i(e)}),S=mk((e,t)=>{if(i){let r=new MouseEvent("click",e);ho(r,t),i(hn(r))}}),k=(0,cy.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(hW(t.nativeEvent,t.currentTarget)&&hN(t.currentTarget,hj(t.nativeEvent))){var n;hz(hj(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(m7(t.currentTarget),"keyup",m_(t=>{hW(t,n)&&!t.repeat&&hN(n,hj(t))&&e.target&&E(hH(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&hc()&&(null==(n=e.metaKeyEvents)||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||hN(t.currentTarget,hj(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hA.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||h$(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(hH(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&&hW(t,e.target)){hz(hj(t),t.key)&&t.preventDefault();let r=hj(t),o=hN(e.target,hj(t));w(hH(e.target,t),"keyboard",o),o&&S(t,e.target),v(),"Enter"!==t.key&&hV(e.target)&&hN(e.target,r)&&!t[hB]&&(t[hB]=!0,hA(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||!hN(t.currentTarget,hj(t.nativeEvent)))return;if(o=t.nativeEvent,!hg()&&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(hf()){if("default"===hx){let t=m7(e);hD=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hx="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";h_.set(e,e.style[t]),e.style[t]="none"}}(e.target),a=b(t,e.pointerType);let o=hj(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),y(m7(t.currentTarget),"pointerup",r,!1),y(m7(t.currentTarget),"pointercancel",n,!1)}a&&t.stopPropagation()},t.onMouseDown=t=>{if(hN(t.currentTarget,hj(t.nativeEvent))&&0===t.button){if(u){let r=function(e){for(;e&&!m9(e);)e=e.parentElement;let t=he(e),r=t.document.activeElement;if(!r||r===e)return;hi=!0;let n=!1,o=e=>{(e.target===r||n)&&e.stopImmediatePropagation()},a=t=>{(t.target===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,ht(r),l()))},i=t=>{(t.target===e||n)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,ht(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),hi=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{hN(t.currentTarget,hj(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(hH(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hH(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(hN(e.target,hj(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?x(t):(ht(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=>{hN(e.currentTarget,hj(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,D,w,b,E,_,S]);return(0,cy.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof he(e).Element&&"auto"===he(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,cy.useEffect)(()=>{let e=g.current;return()=>{var t;for(let r of(d||hS(null!=(t=e.target)?t:void 0),e.disposables))r();e.disposables=[]}},[d]),{isPressed:l||m,pressProps:mU(f,k)}}function hV(e){return"A"===e.tagName&&e.hasAttribute("href")}function hW(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof he(t).HTMLInputElement&&!hG(t,r)||t instanceof he(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&hV(t))&&"Enter"!==r)}function hH(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 hz(e,t){return e instanceof HTMLInputElement?!hG(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hV(e))}let hK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hG(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hK.has(e.type)}let hZ=null,hY=new Set,hq=new Map,hJ=!1,hX=!1,hQ={Tab:!0,Escape:!0};function h0(e,t){for(let r of hY)r(e,t)}function h1(e){hJ=!0,e.metaKey||!hc()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hZ="keyboard",h0("keyboard",e))}function h2(e){hZ="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hJ=!0,h0("pointer",e))}function h4(e){h$(e)&&(hJ=!0,hZ="virtual")}function h3(e){e.target!==window&&e.target!==document&&!hi&&e.isTrusted&&(hJ||hX||(hZ="virtual",h0("virtual",e)),hJ=!1,hX=!1)}function h6(){hi||(hJ=!1,hX=!0)}function h5(e){if("u"<typeof window||hq.get(he(e)))return;let t=he(e),r=m7(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hJ=!0,n.apply(this,arguments)},r.addEventListener("keydown",h1,!0),r.addEventListener("keyup",h1,!0),r.addEventListener("click",h4,!0),t.addEventListener("focus",h3,!0),t.addEventListener("blur",h6,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",h2,!0),r.addEventListener("pointermove",h2,!0),r.addEventListener("pointerup",h2,!0)),t.addEventListener("beforeunload",()=>{h9(e)},{once:!0}),hq.set(t,{focus:n})}let h9=(e,t)=>{let r=he(e),n=m7(e);t&&n.removeEventListener("DOMContentLoaded",t),hq.has(r)&&(r.HTMLElement.prototype.focus=hq.get(r).focus,n.removeEventListener("keydown",h1,!0),n.removeEventListener("keyup",h1,!0),n.removeEventListener("click",h4,!0),r.removeEventListener("focus",h3,!0),r.removeEventListener("blur",h6,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",h2,!0),n.removeEventListener("pointermove",h2,!0),n.removeEventListener("pointerup",h2,!0)),hq.delete(r))};function h8(){return"pointer"!==hZ}"u">typeof document&&("loading"!==(p=m7(void 0)).readyState?h5(void 0):p.addEventListener("DOMContentLoaded",()=>{h5(void 0)}));let h7=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ge(e){let t=m7(e),r=((e=document)=>e.activeElement)(t);"virtual"===hZ?hE(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&ht(e)}):ht(e)}function gt(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,a=(0,cy.useCallback)(e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),i=ha(a),s=(0,cy.useCallback)(e=>{let t=m7(e.target),n=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&n===hj(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 gr(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 gn=cv().createContext(null);function go(e,t){let{focusProps:r}=gt(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:gr(e.onKeyDown),onKeyUp:gr(e.onKeyUp)}},o=mU(r,n),a=function(e){let t=(0,cy.useContext)(gn)||{};hR(t,e);let{ref:r,...n}=t;return n}(t),i=e.isDisabled?{}:a,s=(0,cy.useRef)(e.autoFocus);(0,cy.useEffect)(()=>{s.current&&t.current&&ge(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mU({...o,tabIndex:l},i)}}function ga(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,a=(0,cy.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hT(),l=(0,cy.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=ha(l),c=(0,cy.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=m7(e.target),r=((e=document)=>e.activeElement)(t);if(!a.current.isFocusWithin&&r===hj(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&&!hN(r,e.target)){let n=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});ho(n,r),l(hn(n))}},{capture:!0})}},[n,o,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function gi(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,a=(0,cy.useRef)({isFocused:!1,isFocusVisible:r||h8()}),[i,s]=(0,cy.useState)(!1),[l,u]=(0,cy.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),c=(0,cy.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),d=(0,cy.useCallback)(e=>{a.current.isFocused=e,s(e),c()},[c]);t={isTextInput:n},h5(),(0,cy.useEffect)(()=>{let e=(e,r)=>{var n;let o,i,s,l,u;n=!!(null==t?void 0:t.isTextInput),o=m7(null==r?void 0:r.target),i="u">typeof window?he(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?he(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?he(null==r?void 0:r.target).HTMLElement:HTMLElement,u="u">typeof window?he(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||o.activeElement instanceof i&&!h7.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof u&&!hQ[r.key]||(e=>{a.current.isFocusVisible=e,c()})(h8())};return hY.add(e),()=>{hY.delete(e)}},[]);let{focusProps:p}=gt({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=ga({isDisabled:!o,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:o?f:p}}cv().forwardRef(function(e,t){let{children:r,...n}=e,o=mD(t),a={...n,ref:o};return cv().createElement(gn.Provider,{value:a},r)});let gs=!1,gl=0;function gu(e){"touch"===e.pointerType&&(gs=!0,setTimeout(()=>{gs=!1},50))}function gc(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",gu),gl++,()=>{!(--gl>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",gu)}}function gd(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[a,i]=(0,cy.useState)(!1),s=(0,cy.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cy.useEffect)(gc,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hT(),{hoverProps:c,triggerHoverEnd:d}=(0,cy.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=>{gs&&"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(m7(n.target),"pointerover",t=>{s.isHovered&&s.target&&!hN(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,cy.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 gp=(0,cy.createContext)(!1);function gf(e){let t=(t,r)=>(0,cy.useContext)(gp)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cy.forwardRef)(t)}let gm=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gh=(0,cy.createContext)({}),gg=gf(function(e,t){var r;[e,t]=mK(e,t,gh);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}=hU({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:a,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:b}=go(e,t);d&&(b.tabIndex=o?-1:b.tabIndex);let w=mU(b,y,m4(e,{labelable:!0}));return{isPressed:v,buttonProps:mU(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}=gi(e),{hoverProps:c,isHovered:d}=gd({...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=mH({...e,values:p,defaultClassName:"react-aria-Button"}),m=mL(a.id),h=mL(),g=a["aria-labelledby"];o&&(g?g=`${g} ${h}`:a["aria-label"]&&(g=`${m} ${h}`));let y=(0,cy.useRef)(o);return(0,cy.useEffect)(()=>{let e={"aria-labelledby":g||m};!y.current&&l&&o?mJ(e,"assertive"):y.current&&l&&!o&&mJ(e,"assertive"),y.current=o},[o,l,g,m]),cv().createElement("button",{...m4(e,{propNames:gm}),...mU(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},cv().createElement(mY.Provider,{value:{id:h}},f.children))});(0,cy.createContext)(null),(0,cy.createContext)(null),(0,cy.createContext)(null),(0,cy.createContext)(null),(0,cy.createContext)(null);let gy=(0,cy.createContext)({}),gv=(0,cy.createContext)({}),gb=(0,cy.forwardRef)(function(e,t){[e,t]=mK(e,t,gv);let{elementType:r="span",...n}=e;return cv().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gw=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gE=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gx(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 gw.has(t.script)}let t=e.split("-")[0];return gE.has(t)}let gD=Symbol.for("react-aria.i18n.locale");function g_(){let e="u">typeof window&&window[gD]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gx(e)?"rtl":"ltr"}}let gS=g_(),gk=new Set;function gC(){for(let e of(gS=g_(),gk))e(gS)}function gP(){let e=m$(),[t,r]=(0,cy.useState)(gS);return((0,cy.useEffect)(()=>(0===gk.size&&window.addEventListener("languagechange",gC),gk.add(r),()=>{gk.delete(r),0===gk.size&&window.removeEventListener("languagechange",gC)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gO=cv().createContext(null);function gR(e){let{locale:t,children:r}=e,n=gP(),o=cv().useMemo(()=>t?{locale:t,direction:gx(t)?"rtl":"ltr"}:n,[n,t]);return cv().createElement(gO.Provider,{value:o},r)}function gT(){let e=gP();return(0,cy.useContext)(gO)||e}var gN={};function gj(e,t){return e-t*Math.floor(e/t)}function gA(e,t,r,n){let o=(t=gI(e,t))-1,a=-2;return r<=2?a=0:g$(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 g$(e){return e%4==0&&(e%100!=0||e%400==0)}function gI(e,t){return"BC"===e?1-t:t}function gM(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gN={"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 gL={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 gF{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gj(t,146097),o=Math.floor(n/36524),a=gj(n,36524),i=Math.floor(a/1461),s=Math.floor(gj(a,1461)/365),[l,u]=gM(400*r+100*o+4*i+s+ +(4!==o&&4!==s)),c=e-gA(l,u,1,1),d=2;e<gA(l,u,3,1)?d=0:g$(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-gA(l,u,p,1)+1;return new g9(l,u,p,f)}toJulianDay(e){return gA(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gL[g$(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return g$(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 gB(e,t){let r=e.copy(),n="hour"in r?gq(r,t):0;gU(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gV(r),gW(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gV(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gV(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 gU(e,t){var r,n;(null==(r=(n=e.calendar).isInverseEra)?void 0:r.call(n,e))&&(t=-t),e.year+=t}function gV(e){for(;e.month<1;)gU(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gU(e,1)}function gW(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 gH(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gW(e)}function gz(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gK(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),gH(r),r}function gG(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),gZ(r),r}function gZ(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 gY(e,t){let r=e%t;return r<0&&(r+=t),r}function gq(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=gY(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gY(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gY(e.minute,60),r=Math.floor(e.hour/24),e.hour=gY(e.hour,24),r}function gJ(e,t){let r=e.copy();return gq(r,t),r}function gX(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=g0(a,r,0,t.length-1,null==n?void 0:n.round),o.era=t[a],gH(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(r=-r),o.year=g0(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=g0(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=g0(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),gH(o),o}function gQ(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=g0(t,r,a,i,null==n?void 0:n.round);break}case"minute":o.minute=g0(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=g0(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=g0(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return o}function g0(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 g1(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?yu(gB(yf(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):yo(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),ym(yd(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function g2(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 g4(e){let t,r=ym(e,new gF);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 g3(e){return`${g4(e)}T${g2(e)}`}function g6(e){let t,r="object"==typeof e[0]?e.shift():new gF;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 g5=new WeakMap;class g9{copy(){return this.era?new g9(this.calendar,this.era,this.year,this.month,this.day):new g9(this.calendar,this.year,this.month,this.day)}add(e){return gB(this,e)}subtract(e){return gB(this,gz(e))}set(e){return gK(this,e)}cycle(e,t,r){return gX(this,e,t,r)}toDate(e){return yc(this,e)}toString(){return g4(this)}compare(e){return yD(this,e)}constructor(...e){hP(this,g5,{writable:!0,value:void 0});let[t,r,n,o,a]=g6(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=a,gH(this)}}var g8=new WeakMap;class g7{copy(){return new g7(this.hour,this.minute,this.second,this.millisecond)}add(e){return gJ(this,e)}subtract(e){return gJ(this,gz(e))}set(e){return gG(this,e)}cycle(e,t,r){return gQ(this,e,t,r)}toString(){return g2(this)}compare(e){var t,r;return t=this,r=e,y_(t)-y_(r)}constructor(e=0,t=0,r=0,n=0){hP(this,g8,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gZ(this)}}var ye=new WeakMap;class yt{copy(){return this.era?new yt(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new yt(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gB(this,e)}subtract(e){return gB(this,gz(e))}set(e){return gK(gG(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gX(this,e,t,r);default:return gQ(this,e,t,r)}}toDate(e,t){return yc(this,e,t)}toString(){return g3(this)}compare(e){var t,r;let n=yD(this,e);return 0===n?(t=this,r=yf(e),y_(t)-y_(r)):n}constructor(...e){hP(this,ye,{writable:!0,value:void 0});let[t,r,n,o,a]=g6(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,gH(this)}}var yr=new WeakMap;class yn{copy(){return this.era?new yn(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new yn(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return g1(this,e)}subtract(e){return g1(this,gz(e))}set(e,t){let r,n;return 0===(n=gG(gK(r=yf(this),e),e)).compare(r)?this:ym(yd(yu(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=yf(e),i=ym(gG(a,{hour:t}),new gF),s=[yu(i,e.timeZone,"earlier"),yu(i,e.timeZone,"later")].filter(t=>yd(t,e.timeZone).day===i.day)[0],l=ym(gG(a,{hour:o}),new gF),u=[yu(l,e.timeZone,"earlier"),yu(l,e.timeZone,"later")].filter(t=>yd(t,e.timeZone).day===l.day).pop(),c=yo(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return ym(yd(c=36e5*g0(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 gQ(e,t,r,n);case"era":case"year":case"month":case"day":return ym(yd(yu(gX(yf(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(yo(e)-e.offset)}toString(){var e;let t,r,n;return`${g3(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 yn){var r,n;return e.timeZone===t?e:(r=e,n=t,ym(yd(yo(r)-r.offset,n),r.calendar))}return yd(yu(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hP(this,yr,{writable:!0,value:void 0});let[t,r,n,o,a]=g6(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,gH(this)}}function yo(e){return ya(gI((e=ym(e,new gF)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ya(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 yi(e,t){if("UTC"===t)return 0;if(e>0&&t===yk())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:a,minute:i,second:s}=yl(e,t);return ya(r,n,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let ys=new Map;function yl(e,t){let r=ys.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"}),ys.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 yu(e,t,r="compatible"){var n,o,a;let i=yf(e);if("UTC"===t)return yo(i);if(t===yk()&&"compatible"===r){i=ym(i,new gF);let e=new Date,t=gI(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=yo(i),l=yi(s-864e5,t),u=yi(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=yl(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 yc(e,t,r="compatible"){return new Date(yu(e,t,r))}function yd(e,t){let r=yi(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new yn(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 yp(e){return new g9(e.calendar,e.era,e.year,e.month,e.day)}function yf(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 yt(e.calendar,e.era,e.year,e.month,e.day,r,n,o,a)}function ym(e,t){if(yv(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,gH(n),n}let yh={"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 yg(e,t){return t=ym(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yy(e,t){return yv(e.calendar,t.calendar)&&yg(e,t)}function yv(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 yb={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function yw(e,t,r){let n,o=Math.ceil(e.calendar.toJulianDay(e)+1-(r?yb[r]:(n=function(e){if(Intl.Locale){let t=yR.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yR.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&yh[n]||0))%7;return o<0&&(o+=7),o}function yE(e){return yd(Date.now(),e)}function yx(e){return yp(yE(e))}function yD(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function y_(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yS=null;function yk(){return null==yS&&(yS=new Intl.DateTimeFormat().resolvedOptions().timeZone),yS}function yC(e){return e.subtract({days:e.day-1})}function yP(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function yO(e,t,r){let n=yw(e,t,r);return e.subtract({days:n})}let yR=new Map;function yT(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yN(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yj=Symbol.for("react-aria.i18n.locale"),yA=Symbol.for("react-aria.i18n.strings");class y${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[yj];if(void 0===f){let e=window[yA];if(!e)return null;for(let r in f={},e)f[r]=new y$({[t]:e[r]},t)}let r=null==f?void 0:f[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 yI=new Map,yM=new Map;class yL{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=yI.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:r}),yI.set(o,a)),"function"==typeof(n=t[a.select(e)]||t.other)?n():n}number(e){let t=yM.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yM.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 yF=new WeakMap;function yB(e,t){let r;return t&&y$.getGlobalDictionaryForPackage(t)||((r=yF.get(e))||(r=new y$(e),yF.set(e,r)),r)}function yU(e,t){let{locale:r}=gT(),n=yB(e,t);return(0,cy.useMemo)(()=>new yL(r,n),[r,n])}let yV=new Map;class yW{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==yG&&(yG="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yG&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yz(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=yz(e,t),this.options=t}}let yH={true:{ja:"h11"},false:{}};function yz(e,t={}){if("boolean"==typeof t.hour12&&(null==yK&&(yK="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yK)){let r=yH[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(yV.has(r))return yV.get(r);let n=new Intl.DateTimeFormat(e,t);return yV.set(r,n),n}let yK=null,yG=null;function yZ(e,t){let r=(0,cy.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}function yY(e){e=yZ(null!=e?e:{},yq);let{locale:t}=gT();return(0,cy.useMemo)(()=>new yW(t,e),[t,e])}function yq(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 yJ(e){return e&&e.__esModule?e.default:e}let yX=new WeakMap;function yQ(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function y0(e,t,r,n){let o=yU(yJ(gN),"@react-aria/calendar"),a=yQ(e)||yQ(t),i=yY({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r}),s=yY({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:r});return(0,cy.useMemo)(()=>{if(yg(e,yC(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),yg(t,yP(e)))return i.format(a.toDate(r));if(yg(t,yP(t)))return n?y1(i,o,a,s,r):i.formatRange(a.toDate(r),s.toDate(r))}return n?y1(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,i,s,o,r,n])}function y1(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 y2(e,t){let r=(0,cy.useRef)(!0),n=(0,cy.useRef)(null);(0,cy.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cy.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 y4(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mL(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 y3(e,t){var r,n;let o,a,i,s,l,u=yU((r=gN)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=m4(e),d=y0(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=y0(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);y2(()=>{t.isFocused||mJ(p)},[p]);let f=(i=yU(yJ(gN),"@react-aria/calendar"),"highlightedRange"in t?{start:o,end:a}=t.highlightedRange||{}:o=a=null!=(n=t.value)?n:void 0,s=yY({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yQ(o)||yQ(a),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,cy.useMemo)(()=>{if(!l&&o&&a)if(yg(o,a)){let e=s.format(o.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=y1(s,i,o,a,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,t.timeZone,i,s]));y2(()=>{f&&mJ(f,"polite",4e3)},[f]);let m=mF([!!e.errorMessage,e.isInvalid,e.validationState]);yX.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:m,selectedDateDescription:f});let[h,g]=(0,cy.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,cy.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:mU(c,y4({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 y6={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 y5(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,cy.useState)(!1),{focusWithinProps:a}=ga({isDisabled:!r,onFocusWithinChange:e=>o(e)}),i=(0,cy.useMemo)(()=>n?t:t?{...y6,...t}:y6,[n]);return{visuallyHiddenProps:{...a,style:i}}}(e);return cv().createElement(r,mU(a,i),t)}function y9(e,t,r,n){let o=mk(r),a=null==r;(0,cy.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 y8=0,y7=new Map;function ve(e){let[t,r]=(0,cy.useState)();return mS(()=>{if(!e)return;let t=y7.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${y8++}`;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},y7.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),y7.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function vt(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 vr(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 vn(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;)vt(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let r=vr(e,t,"left"),n=vr(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 vo(e,t){let r=e;for(vt(r,t)&&(r=r.parentElement);r&&!vt(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}class va extends gF{fromJulianDay(e){let t=super.fromJulianDay(e);return new g9(this,gI(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vi(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(vi(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function vi(e){let[t,r]=gM(e.year+-543);return new g9(t,r,e.month,e.day)}function vs(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vl(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-vs(e,r,1,1))/30),o=t+1-vs(e,r,n,1);return[r,n,o]}function vu(e){return Math.floor(e%4/3)}function vc(e,t){return t%13!=0?30:vu(e)+5}class vd{fromJulianDay(e){let[t,r,n]=vl(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new g9(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),vs(1723856,t,e.month,e.day)}getDaysInMonth(e){return vc(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vu(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vp extends vd{fromJulianDay(e){let[t,r,n]=vl(1723856,e);return new g9(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vf extends vd{fromJulianDay(e){let[t,r,n]=vl(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new g9(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vs(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vc(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 vm=765433;function vh(e){return 7>gj(7*e+1,19)}function vg(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gj(3*(r+1),7)&&(r+=1),r}function vy(e){let t,r;return vg(e)+(t=vg(e-1),r=vg(e),vg(e+1)-r==356?2:+(r-t==382))}function vv(e){return vy(e+1)-vy(e)}function vb(e,t){if(t>=6&&!vh(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vv(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*!!vh(e):30}class vw{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vm*19+234)/235)+1,n=vy(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vy(--r)));let a=1,i=0;for(;i<o;)i+=vb(r,a),a++;let s=o-(i-=vb(r,--a));return new g9(this,r,a,s)}toJulianDay(e){let t=vy(e.year);for(let r=1;r<e.month;r++)t+=vb(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vb(e.year,e.month)}getMonthsInYear(e){return vh(e.year)?13:12}getDaysInYear(e){return vv(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vh(t.year)&&!vh(e.year)&&t.month>6?e.month--:!vh(t.year)&&vh(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vE extends gF{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),a=o.year-78,i=e-gA(o.era,o.year,1,1);if(i<80?(a--,i+=(t=g$(o.year-1)?31:30)+155+90+10):(t=g$(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 g9(this,a,r,n)}toJulianDay(e){let t,r,[n,o]=gM(e.year+78);return(g$(o)?(t=31,r=gA(n,o,3,21)):(t=30,r=gA(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&&g$(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 vx(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vD(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vx(t,n,1,1)))/29.5)+1),a=r-vx(t,n,o,1)+1;return new g9(e,n,o,a)}function v_(e){return(14+11*e)%30<11}class vS{fromJulianDay(e){return vD(this,1948440,e)}toJulianDay(e){return vx(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&v_(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return v_(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vk extends vS{fromJulianDay(e){return vD(this,1948439,e)}toJulianDay(e){return vx(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vC(e){return 460322+u[e-1300]}function vP(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vO(e,t){let r=vC(e);for(let n=1;n<t;n++)r+=vP(e,n);return r}function vR(e){return u[e+1-1300]-u[e-1300]}class vT extends vS{fromJulianDay(e){let t=e-1948440,r=vC(1300),n=vC(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vC(++e)+1;let o=vR(e);if(n===o){r=12;break}if(n<o){let t=vP(e,r);for(r=1;n>t;)n-=t,t=vP(e,++r);break}}return new g9(this,e,r,t-vO(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vO(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vP(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vR(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let r=1;r<=12;r++)e+=vP(t,r)}}}}let vN=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vj=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vA=[1867,1911,1925,1988,2018],v$=["meiji","taisho","showa","heisei","reiwa"];function vI(e){let t=vN.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?vN.length-1:0===t?0:t-1}function vM(e){let t=vA[v$.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new g9(e.year+t,e.month,e.day)}class vL extends gF{fromJulianDay(e){let t=super.fromJulianDay(e),r=vI(t);return new g9(this,v$[r],t.year-vA[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vM(e))}balanceDate(e){let t=vM(e),r=vI(t);v$[r]!==e.era&&(e.era=v$[r],e.year=t.year-vA[r]),this.constrainDate(e)}constrainDate(e){let t=v$.indexOf(e.era),r=vj[t];if(null!=r){let[n,o,a]=r,i=n-vA[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]=vN[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return v$}getYearsInEra(e){let t=v$.indexOf(e.era),r=vN[t],n=vN[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(vM(e))}getMinimumMonthInYear(e){let t=vF(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vF(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vF(e){if(1===e.year)return vN[v$.indexOf(e.era)]}let vB=[0,31,62,93,124,155,186,216,246,276,306,336];class vU{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-vB[o]+1;return new g9(this,r,o+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vB[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gj(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vV(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vW(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vH extends gF{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=vW(gI(t.era,t.year));return new g9(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vz(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=vW(vV(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(vz(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function vz(e){let[t,r]=gM(vV(e));return new g9(t,r,e.month,e.day)}function vK(e){switch(e){case"buddhist":return new va;case"ethiopic":return new vd;case"ethioaa":return new vp;case"coptic":return new vf;case"hebrew":return new vw;case"indian":return new vE;case"islamic-civil":return new vS;case"islamic-tbla":return new vk;case"islamic-umalqura":return new vT;case"japanese":return new vL;case"persian":return new vU;case"roc":return new vH;default:return new gF}}function vG(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function vZ(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=vY(e,t,r).subtract(a);return vJ(e,i,t,r,n,o)}function vY(e,t,r,n,o){let a=e;if(t.years)a=yC(e.subtract({months:e.month-1}));else t.months?a=yC(e):t.weeks&&(a=yO(e,r));return vJ(e,a,t,r,n,o)}function vq(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=vY(e,t,r).subtract(a);return vJ(e,i,t,r,n,o)}function vJ(e,t,r,n,o,a){if(o&&e.compare(o)>=0){let e=yN(t,vY(yp(o),r,n));e&&(t=e)}if(a&&0>=e.compare(a)){let e=yT(t,vq(yp(a),r,n));e&&(t=e)}return t}function vX(e,t,r){if(t){let r=yN(e,yp(t));r&&(e=r)}if(r){let t=yT(e,yp(r));t&&(e=t)}return e}function vQ(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 v0(e,t,r){let[n,o]=(0,cy.useState)(e||t),a=(0,cy.useRef)(void 0!==e),i=void 0!==e;(0,cy.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:n,l=(0,cy.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 v1(e){var t,r,n;let o=(0,cy.useMemo)(()=>new yW(e.locale),[e.locale]),a=(0,cy.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,cy.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=v0(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,cy.useMemo)(()=>g?ym(yp(g),h):null,[g,h]),b=(0,cy.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[w,E]=v0((0,cy.useMemo)(()=>e.focusedValue?vX(ym(yp(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,cy.useMemo)(()=>vX(e.defaultFocusedValue?ym(yp(e.defaultFocusedValue),h):v||ym(yx(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,D]=(0,cy.useState)(()=>{switch(d){case"start":return vY(w,l,i,u,c);case"end":return vq(w,l,i,u,c);default:return vZ(w,l,i,u,c)}}),[_,S]=(0,cy.useState)(e.autoFocus||!1),k=(0,cy.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[C,P]=(0,cy.useState)(h);if(!yv(h,C)){let e=ym(w,h);D(vZ(e,l,i,u,c)),E(e),P(h)}function O(e){E(e=vX(e,u,c))}function R(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vQ(e=vX(e,u,c),x,p))&&(e=ym(e,(null==g?void 0:g.calendar)||new gF),g&&"hour"in g?y(g.set(e)):y(e))}}vG(w,u,c)?E(vX(w,u,c)):0>w.compare(x)?D(vq(w,l,i,u,c)):w.compare(k)>0&&D(vY(w,l,i,u,c));let T=(0,cy.useMemo)(()=>!!v&&(!!(p&&p(v))||vG(v,u,c)),[v,p,u,c]),N=e.isInvalid||"invalid"===e.validationState||T,j=(0,cy.useMemo)(()=>"visible"===f?l:v2(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(vX(w.add(j),u,c)),D(vY(vJ(w,e,j,i,u,c),j,i))},focusPreviousPage(){let e=x.subtract(j);E(vX(w.subtract(j),u,c)),D(vY(vJ(w,e,j,i,u,c),j,i))},focusSectionStart(){l.days?O(x):l.weeks?O(yO(w,i)):(l.months||l.years)&&O(yC(w))},focusSectionEnd(){l.days?O(k):l.weeks?O(yO(w,i,void 0).add({days:6})):(l.months||l.years)&&O(yP(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(v2(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(v2(l)))},selectFocusedDate(){p&&p(w)||R(w)},selectDate(e){R(e)},isFocused:_,setFocused:S,isInvalid:e=>vG(e,u,c),isSelected(e){return null!=v&&yg(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>_&&w&&yg(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 yg(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return yg(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=x){let r=t.add({weeks:e}),n=[],o=yw(r=yO(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(yg(r,e))break;r=e}for(;n.length<7;)n.push(null);return n}}}function v2(e){let t={...e};for(let r in e)t[r]=1;return t}function v4(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:yp(e),end:yp(t)}):null}function v3(e,t){return(e=ym(e,(null==t?void 0:t.calendar)||new gF),t&&"hour"in t)?t.set(e):e}function v6(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 v5=(0,cy.createContext)(null),v9=(0,cy.createContext)(null),v8=(0,cy.createContext)(null),v7=(0,cy.createContext)(null),be=(0,cy.forwardRef)(function(e,t){[e,t]=mK(e,t,v5);let{locale:r}=gT(),n=v1({...e,locale:r,createCalendar:e.createCalendar||vK}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=y3(e,n),u=mH({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cv().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cv().createElement(mW,{values:[[gh,{slots:{previous:a,next:i}}],[gy,{"aria-hidden":!0,level:2,children:l}],[v8,n],[v5,e],[gv,{slots:{errorMessage:s}}]]},cv().createElement(y5,null,cv().createElement("h2",null,o["aria-label"])),u.children,cv().createElement(y5,null,cv().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),bt=(0,cy.forwardRef)(function(e,t){var r,n;let o,a,i;[e,t]=mK(e,t,v9);let{locale:s}=gT(),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]=v0(t,r||null,n),[p,f]=(0,cy.useState)(null),m="center";if(c&&c.start&&c.end){let e=vZ(yp(c.start),i,a,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(m="start")}let h=(0,cy.useRef)(null),[g,y]=(0,cy.useState)(null),v=(0,cy.useMemo)(()=>yN(s,null==g?void 0:g.start),[s,g]),b=(0,cy.useMemo)(()=>yT(l,null==g?void 0:g.end),[l,g]),w=v1({...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:v6(t,w,-1),end:v6(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,D]=(0,cy.useState)(w.visibleRange);yy(w.visibleRange.start,x.start)&&yy(w.visibleRange.end,x.end)||(E(p),D(w.visibleRange));let _=e=>{e?(f(e),E(e)):(f(null),E(null))},S=p?v4(p,w.focusedDate):c&&v4(c.start,c.end),k=t=>{if(e.isReadOnly)return;let r=vQ(vX(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(r)if(p){let e=v4(p,r);e&&d({start:v3(e.start,null==c?void 0:c.start),end:v3(e.end,null==c?void 0:c.end)}),_(null)}else _(r)},[C,P]=(0,cy.useState)(!1),{isDateUnavailable:O}=e,R=(0,cy.useMemo)(()=>!!c&&!p&&(!!(O&&(O(c.start)||O(c.end)))||vG(c.start,s,l)||vG(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)||vG(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||vK}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:f}=(r=e,n=t,o=y3(r,l),a=(0,cy.useRef)(!1),y9(i=(0,cy.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),y9(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())},y9(n,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),m=mH({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cv().createElement("div",{...m,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cv().createElement(mW,{values:[[gh,{slots:{previous:c,next:d}}],[gy,{"aria-hidden":!0,level:2,children:f}],[v7,l],[v9,e],[gv,{slots:{errorMessage:p}}]]},cv().createElement(y5,null,cv().createElement("h2",null,u["aria-label"])),m.children,cv().createElement(y5,null,cv().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),br=(0,cy.createContext)(null),bn=(0,cy.forwardRef)(function(e,t){var r,n;let o=(0,cy.useContext)(v8),a=(0,cy.useContext)(v7),i=mz(v5),s=mz(v9),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}=gT(),s=y0(n,o,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yX.get(t),c=y4({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yY({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=gT(),f=(0,cy.useMemo)(()=>{let e=yO(yx(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((yw(yC(n),p,a)+r)/7));return{gridProps:mU(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:yP(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cv().createElement(br.Provider,{value:{headerProps:p,weekDays:f,startDate:u,weeksInMonth:m}},cv().createElement("table",{...m4(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cv().createElement(cv().Fragment,null,cv().createElement(bo,null,e=>cv().createElement(ba,null,e)),cv().createElement(bi,null,e.children))))}),bo=(0,cy.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:a,weekDays:i}=(0,cy.useContext)(br);return cv().createElement("thead",{...m4(e),...a,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cv().createElement("tr",null,i.map((e,t)=>cv().cloneElement(r(e),{key:t}))))}),ba=(0,cy.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cv().createElement("th",{...m4(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),bi=(0,cy.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,a=(0,cy.useContext)(v8),i=(0,cy.useContext)(v7),s=null!=a?a:i,{startDate:l,weeksInMonth:u}=(0,cy.useContext)(br);return cv().createElement("tbody",{...m4(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cv().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cv().cloneElement(r(e),{key:t}):cv().createElement("td",{key:t})))))}),bs=(0,cy.forwardRef)(function({date:e,...t},r){var n,o,a;let i=(0,cy.useContext)(v8),s=(0,cy.useContext)(v7),l=null!=i?i:s,{startDate:u}=null!=(n=(0,cy.useContext)(br))?n:{startDate:l.visibleRange.start},c=(0,cy.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,r){var n;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yX.get(t),u=yU((n=gN)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=yY({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yQ(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&&yg(t.value,a));h&&(d=!0),a=yZ(a,yy);let g=(0,cy.useMemo)(()=>a.toDate(t.timeZone),[a,t.timeZone]),y=yg(a,yx(t.timeZone)),v=(0,cy.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(yg(a,t.value.start)||yg(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&&yg(a,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&yg(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=ve(b),E=(0,cy.useRef)(!1),x=(0,cy.useRef)(!1),D=(0,cy.useRef)(void 0),{pressProps:_,isPressed:S}=hU({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(yg(a,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(a),t.setDragging(!0),x.current=!0;return}else if(yg(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=yg(a,t.focusedDate)?0:-1),(0,cy.useEffect)(()=>{p&&r.current&&(ht(r.current),"pointer"!==hZ&&document.activeElement===r.current&&vn(r.current,{containingElement:vo(r.current)}))},[p,r]);let k=yY({day:"numeric",timeZone:t.timeZone,calendar:a.calendar.identifier}),C=(0,cy.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:mU(_,{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}=gd({...t,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=gi();y&&(y=f.isFocused);let v=(o=u,a=ym(a=e,o.calendar),o=yC(o),a=yC(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=yg(e,l.highlightedRange.start),w=yg(e,l.highlightedRange.end));let E=mH({...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 cv().createElement("td",{...d,ref:r},cv().createElement("div",{...mU(m4(t),p,g,m,x,E),ref:c}))}),bl=(0,cy.createContext)({}),bu=(0,cy.forwardRef)(function(e,t){var r,n;[e,t]=mK(e,t,bl);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=gd({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:m}=gi({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mH({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return cv().createElement("div",{...mU(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)}),bc=(0,cy.createContext)({}),bd=gf(function(e,t){[e,t]=mK(e,t,bc);let{hoverProps:r,isHovered:n}=gd(e),{isFocused:o,isFocusVisible:a,focusProps:i}=gi({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mH({...e,values:{isHovered:n,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cv().createElement("input",{...mU((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 bp={};bp={"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 bf=cv().createContext(null),bm="react-aria-focus-scope-restore",bh=null;function bg(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,cy.useRef)(null),w=(0,cy.useRef)(null),E=(0,cy.useRef)([]),{parentNode:x}=(0,cy.useContext)(bf)||{},D=(0,cy.useMemo)(()=>new bT({scopeRef:E}),[E]);mS(()=>{let e=x||bN.root;if(bN.getTreeNode(e.scopeRef)&&bh&&!bE(bh,e.scopeRef)){let t=bN.getTreeNode(bh);t&&(e=t)}e.addChild(D),bN.addNode(D)},[D,x]),mS(()=>{let e=bN.getTreeNode(E);e&&(e.contain=!!g)},[g]),mS(()=>{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(bm,n),t=t.nextSibling;return E.current=r,()=>{for(let e of r)e.removeEventListener(bm,n)}},[h]),mS(()=>{if(r||n)return;let e=t.current,o=m7(e?e[0]:void 0),a=e=>{let r=hj(e);bb(r,t.current)?bh=t:bw(r)||(bh=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,cy.useRef)(void 0),p=(0,cy.useRef)(void 0),mS(()=>{let e=o.current;if(!a){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=m7(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!bv(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!bb(r,n))return;let a=bC(by(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&&bx(i,!0)},n=e=>{(!bh||bE(bh,o))&&bb(hj(e),o.current)?(bh=o,d.current=hj(e)):bv(o)&&!bw(hj(e),o)?d.current?d.current.focus():bh&&bh.current&&b_(bh.current):bv(o)&&(d.current=hj(e))},i=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=hZ,n=("virtual"===r||null===r)&&hg()&&hh(),a=((e=document)=>e.activeElement)(t);if(!n&&a&&bv(o)&&!bw(a,o)){bh=o;let t=hj(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else bh.current&&b_(bh.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]),mS(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),i=E,s=y,l=g,f=(0,cy.useRef)("u">typeof document?((e=document)=>e.activeElement)(m7(i.current?i.current[0]:void 0)):null),mS(()=>{let e=i.current,t=m7(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!bh||bE(bh,i))&&bb(((e=document)=>e.activeElement)(t),i.current)&&(bh=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]),mS(()=>{let e=m7(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!bv(i)||t.isComposing)return;let r=e.activeElement;if(!bw(r,i)||!bS(i))return;let n=bN.getTreeNode(i);if(!n)return;let o=n.nodeToRestore,a=bC(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||!bw(s,i))&&o){a.currentNode=o;do s=t.shiftKey?a.previousNode():a.nextNode();while(bw(s,i));(t.preventDefault(),t.stopPropagation(),s)?bx(s,!0):bw(o)?bx(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mS(()=>{var e;let t=m7(i.current?i.current[0]:void 0);if(!s)return;let r=bN.getTreeNode(i);if(r)return r.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=bN.getTreeNode(i);if(!e)return;let r=e.nodeToRestore,n=((e=document)=>e.activeElement)(t);if(s&&r&&(n&&bw(n,i)||n===t.body&&bS(i))){let e=bN.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void bk(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bN.getTreeNode(t.scopeRef))return void bk(bD(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,m=cv().useRef(c),(0,cy.useEffect)(()=>{m.current&&(bh=u,!bb(((e=document)=>e.activeElement)(m7(u.current?u.current[0]:void 0)),bh.current)&&u.current&&b_(u.current)),m.current=!1},[u]),(0,cy.useEffect)(()=>{let e=((e=document)=>e.activeElement)(m7(E.current?E.current[0]:void 0)),t=null;if(bb(e,E.current)){for(let r of bN.traverse())r.scopeRef&&bb(e,r.scopeRef.current)&&(t=r);t===bN.getTreeNode(E)&&(bh=t.scopeRef)}},[E]),mS(()=>()=>{var e,t,r;let n=null!=(r=null==(t=bN.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?r:null;(E===bh||bE(E,bh))&&(!n||bN.getTreeNode(n))&&(bh=n),bN.removeTreeNode(E)},[E]);let _=(0,cy.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)(m7(null!=(r=n[0])?r:void 0)),u=n[0].previousElementSibling,c=bC(by(n),{tabbable:a,accept:s},n);c.currentNode=bb(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&bx(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)(m7(null!=(r=n[0])?r:void 0)),u=n[n.length-1].nextElementSibling,c=bC(by(n),{tabbable:a,accept:s},n);c.currentNode=bb(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&bx(d,!0),d},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bC(by(r),{tabbable:n,accept:o},r);a.currentNode=r[0].previousElementSibling;let i=a.nextNode();return i&&bx(i,!0),i},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,a=bC(by(r),{tabbable:n,accept:o},r);a.currentNode=r[r.length-1].nextElementSibling;let i=a.previousNode();return i&&bx(i,!0),i}}},[]),S=(0,cy.useMemo)(()=>({focusManager:_,parentNode:D}),[D,_]);return cv().createElement(bf.Provider,{value:S},cv().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cv().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function by(e){return e[0].parentElement}function bv(e){let t=bN.getTreeNode(bh);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function bb(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function bw(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of bN.traverse(bN.getTreeNode(t)))if(r&&bb(e,r.current))return!0;return!1}function bE(e,t){var r;let n=null==(r=bN.getTreeNode(t))?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function bx(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{ge(e)}catch{}}function bD(e,t=!0){let r=e[0].previousElementSibling,n=by(e),o=bC(n,{tabbable:t},e);o.currentNode=r;let a=o.nextNode();return t&&!a&&((o=bC(n=by(e),{tabbable:!1},e)).currentNode=r,a=o.nextNode()),a}function b_(e,t=!0){bx(bD(e,t))}function bS(e){let t=bN.getTreeNode(bh);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function bk(e){e.dispatchEvent(new CustomEvent(bm,{bubbles:!0,cancelable:!0}))&&bx(e)}function bC(e,t,r){var n,o,a;let i=(null==t?void 0:t.tabbable)?m8:m9,s=m7((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=he(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||bb(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 bP(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)(m7(n)),u=bC(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&&bx(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)(m7(n)),u=bC(n,{tabbable:a,accept:s});if(n.contains(l))u.currentNode=l;else{let e=bO(u);return e&&bx(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=n;let e=bO(u);if(!e)return null;c=e}return c&&bx(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=bC(n,{tabbable:o,accept:a}).nextNode();return i&&bx(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=bO(bC(n,{tabbable:o,accept:a}));return i&&bx(i,!0),null!=i?i:null}}}function bO(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class bR{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 bT({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&&bb(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 bR;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 bT({scopeRef:null}),this.fastMap.set(null,this.root)}}class bT{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 bN=new bR;function bj(e,t,r){let{direction:n}=gT(),o=(0,cy.useMemo)(()=>bP(t),[t]),a=()=>{var e;if(!t.current)return;let r=null==(e=window.event)?void 0:e.target,n=bC(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}=hU({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return mU(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=bA(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=bA(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function bA(e,t,r){let n=bC(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 b$(e,t,r){let n=(0,cy.useRef)(t),o=mk(()=>{r&&r(n.current)});(0,cy.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 bI(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=mL(t);let i=mL(),s={};return r&&(n=n?`${i} ${n}`:i,s={id:i,htmlFor:"label"===a?t:void 0}),{labelProps:s,fieldProps:y4({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mF([!!t,!!r,n,o]),l=mF([!!t,!!r,n,o]);return{labelProps:a,fieldProps:i=mU(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bM(e,t,r){let{validationBehavior:n,focus:o}=e;mS(()=>{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=mk(()=>{t.resetValidation()}),i=mk(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(),hZ="keyboard",h0("keyboard",null)),e.preventDefault()}),s=mk(()=>{t.commitValidation()});(0,cy.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 bL=new WeakMap,bF="__role_"+Date.now(),bB="__focusManager_"+Date.now();function bU(e,t,r){var n,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=bI({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,cy.useRef)(null),{focusWithinProps:m}=ga({...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=yU((o=bp)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=ve(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[bF]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bB],E=(0,cy.useMemo)(()=>w||bP(r),[w,r]),x=bj(t,r,"presentation"===e[bF]);bL.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let D=(0,cy.useRef)(e.autoFocus);a="presentation"===e[bF]?{role:"presentation"}:mU(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cy.useEffect)(()=>{D.current&&E.focusFirst(),D.current=!1},[E]),b$(e.inputRef,t.value,t.setValue),bM({...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=m4(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:mU(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 bV={};bV={"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 bW={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bH={...bW,customError:!0,valid:!1},bz={isInvalid:!1,validationDetails:bW,validationErrors:[]},bK=(0,cy.createContext)({}),bG="__formValidationState"+Date.now();function bZ(e){if(e[bG]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:a}=e[bG];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:bH}:null,u=(0,cy.useMemo)(()=>i&&null!=o?bq(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return bY(r)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let c=(0,cy.useContext)(bK),d=(0,cy.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>bY(c[e])):bY(c[n]):[],[c,n]),[p,f]=(0,cy.useState)(c),[m,h]=(0,cy.useState)(!1);c!==p&&(f(c),h(!1));let g=(0,cy.useMemo)(()=>bq(m?[]:d),[m,d]),y=(0,cy.useRef)(bz),[v,b]=(0,cy.useState)(bz),w=(0,cy.useRef)(bz),[E,x]=(0,cy.useState)(!1);return(0,cy.useEffect)(()=>{if(!E)return;x(!1);let e=u||a||y.current;bJ(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||a||bz,displayValidation:"native"===s?l||g||v:l||g||u||a||v,updateValidation(e){"aria"!==s||bJ(v,e)?y.current=e:b(e)},resetValidation(){bJ(bz,w.current)||(w.current=bz,b(bz)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bY(e){return e?Array.isArray(e)?e:[e]:[]}function bq(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bH}:null}function bJ(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 bX(...e){let t=new Set,r=!1,n={...bW};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 bQ=new y$((en=bV)&&en.__esModule?en.default:en);function b0(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function b1(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=b0(),n=new yL(e,y$.getGlobalDictionaryForPackage("@react-stately/datepicker")||bQ),l=new yW(e,b3({},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 b2={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},b4={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function b3(e,t){var r;e={...t.shouldForceLeadingZeros?b4:b2,...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 b6(e){return e&&"hour"in e?e:new g7}function b5(e,t){return null===e?null:e?ym(e,t):void 0}function b9(e,t,r,n){if(e)return b5(e,r);let o=ym(yE(null!=n?n:yk()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?yp(o):n?o:yf(o)}function b8(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,cy.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 b7=new y$({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"),we={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},wt={year:5,month:2,day:7,hour:2,minute:15,second:15},wr={dayperiod:"dayPeriod"};function wn(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]=b8(p,e.granularity),h=m||"UTC";if(p&&!(f in p))throw Error("Invalid granularity "+f+" for value "+p.toString());let g=(0,cy.useMemo)(()=>new yW(n),[n]),y=(0,cy.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[v,b]=v0(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,cy.useMemo)(()=>{var e;return null!=(e=b5(v,y))?e:null},[v,y]),[E,x]=(0,cy.useState)(()=>b9(e.placeholderValue,f,y,m)),D="gregory"===y.identifier&&"BC"===(w||E).era,_=(0,cy.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,cy.useMemo)(()=>b3({},_),[_]),k=(0,cy.useMemo)(()=>new yW(n,S),[n,S]),C=(0,cy.useMemo)(()=>k.resolvedOptions(),[k]),P=(0,cy.useMemo)(()=>k.formatToParts(new Date).filter(e=>we[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[k]),[O,R]=(0,cy.useState)(()=>e.value||e.defaultValue?{...P}:{}),T=(0,cy.useRef)(null),N=(0,cy.useRef)(y);(0,cy.useEffect)(()=>{yv(y,N.current)||(N.current=y,x(t=>Object.keys(O).length>0?ym(t,y):b9(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(b9(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(b9(e.placeholderValue,f,y,m)),R({})):r.length>=n.length||r.length===n.length-1&&P.dayPeriod&&!O.dayPeriod&&"dayPeriod"!==T.current?b(t=ym(t,(null==p?void 0:p.calendar)||new gF)):x(t),T.current=null},$=(0,cy.useMemo)(()=>j.toDate(h),[j,h]),I=(0,cy.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=we[e.type];"era"===e.type&&1===a.getEras().length&&(r=!1);let u=we[e.type]&&!t[e.type],f=we[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?b7.getStringForLocale(d,i):"––"):null,m={type:wr[e.type]||e.type,text:u?f:e.value,...wo(o,e.type,n),isPlaceholder:u,placeholder:f,isEditable:r};"hour"===e.type?(c.push({type:"literal",text:"⁦",...wo(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(m),e.type===s&&c.push({type:"literal",text:"⁩",...wo(o,"literal",n),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(m),c.push({type:"literal",text:"⁩",...wo(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,cy.useMemo)(()=>b1(v,u,c,d,_),[v,u,c,d,_]),B=bZ({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:$,calendar:y,setValue:A,segments:I,dateFormatter:k,validationState:V,isInvalid:U,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,wt[e]||1)},decrementPage(e){L(e,-(wt[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=b9(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 yW(n,b3(e,_)).format($):"",getDateFormatter:(e,t)=>new yW(e,b3({},{..._,...t}))}}function wo(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 wa=(0,cy.createContext)(null),wi=(0,cy.createContext)(null),ws=(0,cy.createContext)(null),wl=(0,cy.forwardRef)(function(e,t){let r=(0,cy.useContext)(wi),n=(0,cy.useContext)(ws);return r||n?cv().createElement(wc,{...e,ref:t}):cv().createElement(wu,{...e,ref:t})}),wu=(0,cy.forwardRef)((e,t)=>{let[r,n]=mK({slot:e.slot},t,wa),{locale:o}=gT(),a=wn({...r,locale:o,createCalendar:vK}),i=(0,cy.useRef)(null),{fieldProps:s,inputProps:l}=bU({...r,inputRef:i},a,n);return cv().createElement(mW,{values:[[wi,a],[bc,{...l,ref:i}],[bl,{...s,ref:n,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},cv().createElement(wc,e))}),wc=(0,cy.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cy.useContext)(wi),a=(0,cy.useContext)(ws),i=null!=o?o:a;return cv().createElement(cv().Fragment,null,cv().createElement(bu,{...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,cy.cloneElement)(n(e),{key:t}))),cv().createElement(bd,null))}),wd=(0,cy.createContext)({});function wp({children:e}){let t=(0,cy.useMemo)(()=>({register:()=>{}}),[]);return cv().createElement(hk.Provider,{value:t},e)}cv().forwardRef(({children:e,...t},r)=>{let n=(0,cy.useRef)(!1),o=(0,cy.useContext)(hk);r=mD(r||(null==o?void 0:o.ref));let a=mU(o||{},{...t,ref:r,register(){n.current=!0,o&&o.register()}});return hR(o,r),(0,cy.useEffect)(()=>{n.current||(n.current=!0)},[]),cv().createElement(hk.Provider,{value:a},e)});let wf=cv().createContext(null);function wm(e){var t;let r=m$(),{portalContainer:n=r?null:document.body,isExiting:o}=e,[a,i]=(0,cy.useState)(!1),s=(0,cy.useMemo)(()=>({contain:a,setContain:i}),[a,i]),{getContainer:l}=null!=(t=(0,cy.useContext)(wd))?t:{};if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=cv().createElement(bg,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!o},u)),u=cv().createElement(wf.Provider,{value:s},cv().createElement(wp,null,u)),hM().createPortal(u,n)}let wh=(0,cy.createContext)(null),wg=(0,cy.createContext)(null),wy=(0,cy.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=mK(e,t,wh);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,a=mF();a=e["aria-label"]?void 0:a;let i=(0,cy.useRef)(!1);return(0,cy.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){ge(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),ge(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),mS(()=>{null==n||n(!0)},[n=null==(r=(0,cy.useContext)(wf))?void 0:r.setContain]),{dialogProps:{...m4(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,cy.useContext)(wg);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let i=mH({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return cv().createElement("section",{...m4(e),...n,...i,ref:t,slot:e.slot||void 0},cv().createElement(mW,{values:[[gy,{slots:{[mV]:{},title:{...o,level:2}}}],[gh,{slots:{[mV]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),wv=(0,cy.createContext)(null),wb=(0,cy.forwardRef)(function(e,t){let r=(0,cy.useContext)(wv);return(null==r?void 0:r.isInvalid)?cv().createElement(ww,{...e,ref:t}):null}),ww=(0,cy.forwardRef)((e,t)=>{let r=(0,cy.useContext)(wv),n=m4(e),o=mH({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cv().createElement(gb,{slot:"errorMessage",...n,...o,ref:t})}),wE=(0,cy.createContext)(null),wx=(0,cy.createContext)({}),wD=gf(function(e,t){[e,t]=mK(e,t,wx);let{elementType:r="label",...n}=e;return cv().createElement(r,{className:"react-aria-Label",...n,ref:t})}),w_=(0,cy.createContext)({placement:"bottom"}),wS=new WeakMap,wk=[];function wC(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function wP(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 wO(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,a=wP(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(wP(r/n,n))*n):a<t?a=t:!isNaN(r)&&a>r&&(a=t+Math.floor(wP((r-t)/n,n))*n),a=wP(a,n)}let wR={top:"top",bottom:"top",left:"left",right:"left"},wT={top:"bottom",bottom:"top",left:"right",right:"left"},wN={top:"left",left:"top"},wj={top:"height",left:"width"},wA={width:"totalWidth",height:"totalHeight"},w$={},wI="u">typeof document?window.visualViewport:null;function wM(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==wI?void 0:wI.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(r=null==wI?void 0:wI.width)?r:l,s=null!=(n=null==wI?void 0:wI.height)?n:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,wI&&(c=wI.offsetTop,d=wI.offsetLeft)}else({width:i,height:s,top:c,left:d}=wV(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=i,u=s;return hm()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(p.top=0,p.left=0,c=null!=(o=null==wI?void 0:wI.pageTop)?o:0,d=null!=(a=null==wI?void 0:wI.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function wL(e,t,r,n,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,u=n[wj[e]],c=n.scroll[wR[e]]+a,d=u+n.scroll[wR[e]]-a,p=t-l+i[e]-n[wR[e]],f=t-l+r+i[e]-n[wR[e]];return p<c?c-p:f>d?Math.max(d-f,c-p):0}function wF(e){if(w$[e])return w$[e];let[t,r]=e.split(" "),n=wR[t]||"right",o=wN[n];wR[r]||(r="center");let a=wj[n],i=wj[o];return w$[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:a,crossSize:i},w$[e]}function wB(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]=wC(E[v],x,D),h===y){let r=s?i[b]:t[wA[b]];E[wT[y]]=Math.floor(r-e[y]+o)}else E[y]=Math.floor(e[y]+e[b]+o);return E}function wU(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[wT[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[wT[c]]-o)}function wV(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 wW(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=wV(e);let n=wV(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 wH(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 wz=new WeakMap;function wK(e){let{ref:t,box:r,onResize:n}=e;(0,cy.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 wG="u">typeof document?window.visualViewport:null;function wZ(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 wY=[],wq="u">typeof document&&window.visualViewport,wJ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wX=0;function wQ(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function w0(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function w1(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=vo(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 w2={};function w4(e){var t;let{onDismiss:r,...n}=e,o=y4(n,yU((t=w2)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cv().createElement(y5,null,cv().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function w3(e,t,r){mS(()=>{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,hI.flushSync)(()=>{r()})}).catch(()=>{}),()=>{n=!0}}},[e,t,r])}function w6(e){let[t,r]=v0(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cy.useCallback)(()=>{r(!0)},[r]),o=(0,cy.useCallback)(()=>{r(!1)},[r]),a=(0,cy.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:a}}w2={"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 w5=(0,cy.createContext)(null),w9=(0,cy.createContext)(null),w8=(0,cy.forwardRef)(function(e,t){[e,t]=mK(e,t,w5);let r=(0,cy.useContext)(wg),n=w6(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,a=function(e,t){let[r,n]=(0,cy.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return w3(e,o,(0,cy.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,i=(0,cy.useContext)(gp),{direction:s}=gT();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cv().createElement(cv().Fragment,null,t)}return!o||o.isOpen||a?cv().createElement(w7,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:s}):null});function w7({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,a;let i=(0,cy.useRef)(null),[s,l]=(0,cy.useState)(0),u=(0,cy.useRef)(null),d=(0,cy.useContext)(w9),p=d&&"SubmenuTrigger"===n.trigger;mS(()=>{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,u="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,cy.useEffect)(()=>{if(o&&!wY.includes(t))return wY.push(t),()=>{let e=wY.indexOf(t);e>=0&&wY.splice(e,1)}},[o,t]);let l=()=>{wY[wY.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,a=(0,cy.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mk(e=>{r&&wZ(e,t)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mk(e=>{r&&r(e)});(0,cy.useEffect)(()=>{let e=a.current;if(n)return;let r=m7(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wZ(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))&&(wY[wY.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wY[wY.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=ga({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||bw(e.relatedTarget,bh))&&(!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||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:n),{overlayProps:f,arrowProps:m,placement:h}=function(e){var t,r,n;let{direction:o}=gT(),{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,cy.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,p,f,m,g,o,v,b,a],D=(0,cy.useRef)(null==wG?void 0:wG.scale);(0,cy.useEffect)(()=>{g&&(D.current=null==wG?void 0:wG.scale)},[g]);let _=(0,cy.useCallback)(()=>{var e,t,r,n,y,w;if(!1===h||!g||!s.current||!i.current||!p||(null==wG?void 0:wG.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&&!wH(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wH(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?wV(s):wW(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=wV(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=wM(p),k=wM(v),C="BODY"===p.tagName?wV(v):wW(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=wF(e),{size:A,crossAxis:$,crossSize:I,placement:M,crossPlacement:L}=j,F=wB(t,s,r,j,c,d,u,p,m,h),B=c,U=wU(s,u,t,o,a+c,j);if(i&&n[A]>U){let e=wF(`${wT[M]} ${L}`),n=wB(t,s,r,e,c,d,u,p,m,h);wU(s,u,t,o,a+c,e)>U&&(j=e,F=n,B=c)}let V="bottom";"top"===j.axis?"top"===j.placement?V="top":"bottom"===j.placement&&(V="bottom"):"top"===j.crossAxis&&("top"===j.crossPlacement?V="bottom":"bottom"===j.crossPlacement&&(V="top"));let W=wL($,F[$],r[I],s,l,a,u);F[$]+=W;let H=(w=F,E=r.height,x=V,R=p?u.height:s[wA.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=wL($,(F=wB(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[wR[$]],G=m/2+h,Z="left"===wR[$]?(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=wC(K,t[$]+m/2-(F[$]+o[wR[$]]),t[$]+t[I]-m/2-(F[$]+o[wR[$]]));return z[$]=wC(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);mS(_,x),mS(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n=_]),wK({ref:s,onResize:_}),wK({ref:i,onResize:_});let S=(0,cy.useRef)(!1);mS(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),_()},r=()=>{S.current&&t()};return null==wG||wG.addEventListener("resize",t),null==wG||wG.addEventListener("scroll",r),()=>{null==wG||wG.removeEventListener("resize",t),null==wG||wG.removeEventListener("scroll",r)}},[_]);let k=(0,cy.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cy.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||wz.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&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;mS(()=>{if(!t){let e,t,r,n;return 1==++wX&&(c=hf()?(r=null,n=m_(w0(document,"touchstart",r=>{((e=vo(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wQ(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),w0(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}),w0(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),w0(document,"focus",e=>{var t;let n=e.target;((t=n)instanceof HTMLInputElement&&!wJ.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=m_(w0(window,"scroll",()=>{window.scrollTo(0,0)}),wQ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wQ(document.documentElement,"overflow","hidden"),wQ(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",wq&&(wq.height<window.innerHeight?requestAnimationFrame(()=>{w1(n)}):wq.addEventListener("resize",()=>w1(n),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),n()}):m_(wQ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wQ(document.documentElement,"overflow","hidden"))),()=>{0==--wX&&c()}}},[t])}({isDisabled:a||!t.isOpen}),mS(()=>{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=wS.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),wS.set(e,r+1))};wk.length&&wk[wk.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 wk.push(s),()=>{for(let e of(i.disconnect(),n)){let t=wS.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wS.delete(e)):wS.set(e,t-1))}s===wk[wk.length-1]?(wk.pop(),wk.length&&wk[wk.length-1].observe()):wk.splice(wk.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=wk[wk.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[a,t.isOpen,n,o]),{popoverProps:mU(d,f),arrowProps:m,underlayProps:p,placement:h}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:p?d:u},e),y=n.popoverRef,v=function(e,t=!0){let[r,n]=(0,cy.useState)(!0),o=r&&t;return mS(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),w3(e,o,(0,cy.useCallback)(()=>n(!1),[])),o}(y,!!g)||n.isEntering||!1,b=mH({...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,cy.useState)(!1);mS(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,cy.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&ge(y.current)},[E,y]);let D={...f.style,...b.style},_=cv().createElement("div",{...mU(m4(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&&cv().createElement(w4,{onDismiss:e.close}),cv().createElement(w_.Provider,{value:{...h,placement:g,ref:i}},b.children),cv().createElement(w4,{onDismiss:e.close}));return p?cv().createElement(wm,{...n,shouldContainFocus:E,isExiting:t,portalContainer:null!=(a=null!=r?r:null==d?void 0:d.current)?a:void 0},_):cv().createElement(wm,{...n,shouldContainFocus:E,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cv().createElement("div",{"data-testid":"underlay",...m,style:{position:"fixed",inset:0}}),cv().createElement("div",{ref:u,style:{display:"contents"}},cv().createElement(w9.Provider,{value:u},_)))}function Ee(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let Et=(0,cy.createContext)(null),Er=(0,cy.createContext)(null),En=(0,cy.createContext)(null),Eo=(0,cy.createContext)(null),Ea=(0,cy.forwardRef)(function(e,t){var r,n;[e,t]=mK(e,t,Et);let{validationBehavior:o}=mz(wE)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t;let r=w6(e),[n,o]=v0(e.value,e.defaultValue||null,e.onChange),a=n||e.placeholderValue||null,[i,s]=b8(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,cy.useState)(null),[f,m]=(0,cy.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,cy.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,cy.useMemo)(()=>b1(n,y,v,b,g),[n,y,v,b,g]),E=bZ({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{o("timeZone"in t?t.set(yp(e)):yf(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||b6(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||b6(e.defaultValue||e.placeholderValue)),r.setOpen(t)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new yW(e,b3(t,g)).format(l):"",getDateFormatter:(e,t)=>new yW(e,b3({},{...g,...t}))}}({...e,validationBehavior:a}),s=(0,cy.useRef)(null),[l,u]=mG(!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=mL(),a=mL(),i=mL(),s=yU((n=bp)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:m}=bI({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bj(t,r),g=p["aria-labelledby"]||p.id,{locale:y}=gT(),v=t.formatValue(y,{month:"long"}),b=ve(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=m4(e),x=(0,cy.useMemo)(()=>bP(r),[r]),D=(0,cy.useRef)(!1),{focusWithinProps:_}=ga({...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:mU(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,[bF]:"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,[bG]: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}}({...mZ(e),label:u,validationBehavior:a},i,s),[b,w]=(0,cy.useState)(null),E=(0,cy.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wK({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=gi({within:!0}),S=mH({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=m4(e);return delete k.id,cv().createElement(mW,{values:[[En,i],[bl,{...c,ref:s,isInvalid:i.isInvalid}],[wa,p],[gh,{...f,isPressed:i.isOpen}],[wx,{...d,ref:l,elementType:"span"}],[v5,h],[wg,i],[w5,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[wh,m],[gv,{slots:{description:g,errorMessage:y}}],[wv,v]]},cv().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}))}),Ei=(0,cy.forwardRef)(function(e,t){var r,n;[e,t]=mK(e,t,Er);let{validationBehavior:o}=mz(wE)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",i=function(e){var t,r,n;let o=w6(e),[a,i]=v0(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,cy.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}),Ee(e)?i(e):i(null)},[d,p]=b8((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,cy.useState)(null),[y,v]=(0,cy.useState)(null);u&&Ee(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(yp(e.start)):yf(e.start,t.start),end:"timeZone"in t.end?t.end.set(yp(e.end)):yf(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let r="function"==typeof m?m():m;f?Ee(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||b6(e.placeholderValue),end:(null==y?void 0:y.end)||b6(e.placeholderValue)}):g(t):Ee(t)?(c(t),P.commitValidation()):g(t),r&&o.setOpen(!1)},E=e=>{Ee(h)&&Ee(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,cy.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,cy.useMemo)(()=>{var e,t;let r;return r=bX(b1(null!=(e=null==u?void 0:u.start)?e:null,_,S,k,D),b1(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=bX(r,{isInvalid:!0,validationErrors:[(y$.getGlobalDictionaryForPackage("@react-stately/datepicker")||bQ).getStringForLocale("rangeReversed",b0())],validationDetails:{...bW,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[u,_,S,k,D]),P=bZ({...e,value:a,name:(0,cy.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))&&Ee(h)&&f&&b(h,{start:(null==y?void 0:y.start)||b6(e.placeholderValue),end:(null==y?void 0:y.end)||b6(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=b3(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 yW(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 yW(t,b3(r,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yW(e,b3({},{...D,...t}))}}({...e,validationBehavior:a}),s=(0,cy.useRef)(null),[l,u]=mG(!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=yU((l=bp)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:f,fieldProps:m,descriptionProps:h,errorMessageProps:g}=bI({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=m["aria-labelledby"]||m.id,{locale:v}=gT(),b=t.formatValue(v,{month:"long"}),w=ve(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=mL(),_=mL(),S=bj(t,r),k=[w["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,cy.useMemo)(()=>bP(r,{accept:e=>e.id!==D}),[r,D]),P={[bB]:C,[bF]:"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=m4(e),R=(0,cy.useRef)(!1),{focusWithinProps:T}=ga({...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,cy.useRef)(bz),j=(0,cy.useRef)(bz);return{groupProps:mU(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,[bG]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bX(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,[bG]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){j.current=e,t.updateValidation(bX(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}}({...mZ(e),label:u,validationBehavior:a},i,s),[w,E]=(0,cy.useState)(null),x=(0,cy.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wK({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=gi({within:!0}),k=mH({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=m4(e);return delete C.id,cv().createElement(mW,{values:[[Eo,i],[bl,{...c,ref:s,isInvalid:i.isInvalid}],[gh,{...m,isPressed:i.isOpen}],[wx,{...d,ref:l,elementType:"span"}],[v9,g],[wg,i],[w5,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[wh,h],[wa,{slots:{start:p,end:f}}],[gv,{slots:{description:y,errorMessage:v}}],[wv,b]]},cv().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 Es(e){return cv().createElement(gR,e)}function El(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 g9||e instanceof yt||e instanceof yn)return t?ym(e,t):e;{let r=d8()(e).toDate(),n=new g9(r.getFullYear(),r.getMonth()+1,r.getDate());return t?ym(n,t):n}}function Eu(e){if(e)return e.toDate(yk())}function Ec(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Ed(e){let t=e??"",r=Ec(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Ep(){let e=window.i18next.language,t=Ec(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ea=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ea=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Ef=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ea||"en-US"),Em=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Eh={};for(let e=1;e<100;e++)Eh[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Eg={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},Ey="[1234567890一二三四五六七八九〇\\d]",Ev={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},Eb={},Ew={"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},EE={zone:Ew,year:Eh,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:{}},Ex={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(Ew).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,}"},ED={...Ex,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}"},E_={},ES=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Ef){return E_[t.toLowerCase()]||(E_[t.toLowerCase()]=new e(t)),E_[t.toLowerCase()]}constructor(e=Ef){this.locale=e,this.lookups={...EE},this.vars={...Ex};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=Ev: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(Eb[e])return Eb[e];if("fullwide"===e||"hanidec"===e)return{group:Ey,lookup:{...Ev}};let t=Eg[e];if(!t)return{group:"\\d",lookup:{...Ev}};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 Eb[e]={group:`[${r}-${n}]`,lookup:o},Eb[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,ED)ED.hasOwnProperty(r)&&(this.vars[r]=ED[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")}},Ek=["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"],EC={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},EP=()=>new Date;function EO(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 ER=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)}},ET=["year","month","day","hour","minute","second","millisecond","offset"],EN={};function Ej(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 EA=[[/([^\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"]],E$={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," "],...EA],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:EA,id:EA,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function EI(e,t=Ef){let r=function(e){if(!EN[e]){var t,r;let n,o,a=ES.factory(e);EN[e]=new ER({doneChecker:Ej,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:EO(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:EO(["","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:EO(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${Ey}{2,4})\\s*\u5E74\\s*(${Ey}{1,2})\\s*\u6708\\s*(${Ey}{1,2})\\s*\u65E5$`),handler:EO(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:EO(["","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:EO(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=EP(),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?EC[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=EP();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:EO(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:EO(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:EO(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:EO(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:EO(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:EO(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:EO(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:EO(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:EO(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:EO(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:EO(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:EO(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:EO(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:EO(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:EO(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:EO(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:EO(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:EO(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:EO(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:EO(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:EO(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:EO(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:EO(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:EO(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:EO(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:EO(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:EO(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:EO(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:EO(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:EO(["offset"])}],o=a.baseName.slice(0,5),Ek.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(ET.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Eh[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return EN[e]}(t),n=function(e,t){let r=E$[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 EM(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new Em(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 Em(t.valueOf()-60*e.offset*1e3):t}function EL(e,t=Ef){let r=EI(e,t),n=r.invalid?new Em(NaN):EM(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function EF(e,t=Ef){return e instanceof Date?new Em(e.valueOf()):"number"==typeof e?new Em(e):EL(e,t)}Date.fromString=Em.fromString=EL,Date.fromAny=Em.fromAny=EF,"u">typeof window&&(window.anyDateParser={fromString:EL,fromAny:EF,fromObject:EM,attempt:EI});var EB=r(5238),EU=r(3826);let EV=function(e){return null==e};function EW(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}d9.extend(d7),d9.extend(EU),d9.extend(EB);let EH="YYYY-MM-DDTHH:mm:ss.SSSZZ";function Ez(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&d9(e,EH).isValid()}function EK(e){return d9(e).isToday()}function EG(e){return Ez(e)?d9(e,EH).toDate():null}function EZ(e,t=!1){let r=d9(e);return t&&(r=r.utc()),r.format(EH)}function EY(e){return d9(e).toDate()}var Eq=new WeakMap;let EJ=new class{register(e,t){EW(this,Eq).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EW(this,Eq).has(t))return EW(this,Eq).get(t)}if(e.language&&EW(this,Eq).has(e.language))return EW(this,Eq).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EW(this,Eq).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,Eq,{writable:!0,value:new Map})}};function EX(e,t){EJ.register(e,t)}function EQ(e){let t=e??Ep();return EJ.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let E0={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function E1(e,t={}){let r=EI(e,Ep());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!EV(r.day)&&EV(r.month)&&(r=Object.assign({},nn(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},nn(r,"day"),{date:r.day}));let n=d9().set(r).toDate();return EV(r.year)&&(t.year=!1),EV(r.month)&&(t.month=!1),EV(r.date)&&(t.day=!1),E2(n,t)}function E2(e,t){let r,n=t?.locale??Ep(),o=new Intl.Locale(n),{calendar:a,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...E0,...{noToday:"am"===o.language},...t},f={calendar:a??EQ(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},m=d9(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(E4("-"))),"wide"==i&&(t=t.map(E4(" — "))),"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+=`, ${E3(e)}`),r}let E4=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E3(e){return e.toLocaleTimeString(Ep(),{hour:"2-digit",minute:"2-digit"})}function E6(e,t){return E2(e,{...t,time:!0})}function E5(e,t){let r=EQ("string"==typeof t?new Intl.Locale(t):t);return r?ym(e,vK(r)):e}function E9(e,t){return new Intl.DurationFormat(Ep(),t).format(e)}function E8(e,t){if(null==e)return null;if("string"==typeof e){let r=EI(e,Ep());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...nn(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...nn(r,"day"),...{date:r.day}}),d9(t).set(r))}return d9(e)}let E7=["years","months","days","hours","minutes","seconds"],xe={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},xt={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xr(e,t=d9(),r){let n,o=d9(t),a=E8(e,o);if(null==a)return null;if("string"==typeof r){let e=xe[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?xe[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=E7.indexOf(r);for(let o=0;o<E7.length;o++){let a=E7[o];if(t.diff(e,a)>0)return o<=n?a:r}return r}(a,o,t??"seconds"):xe[s]??s,function(e,t,r,n){let o=E7.indexOf(r),a=E7.indexOf(n),i=E7.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={...xt};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[xe[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 xn={style:"short",localeMatcher:"lookup"};function xo(e,t=d9(),r){let n=xr(e,t,r);return null==n?null:E9(n,"object"==typeof r&&r.formatOptions?{...xn,...r.formatOptions}:xn)}let xa=(0,cy.createContext)(null);function xi(){let e=dy({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cy.useMemo)(()=>{let t=Ep();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cy.useMemo)(()=>{let e=EQ(t);return void 0!==e?vK(e):void 0},[t]),n=(0,cy.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cy.useMemo)(()=>r?ym(yx(yk()),r):yx(yk()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xs=new g9(1793,1,1);var xl={};function xu(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}xl={"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 xc=r(137);function xd(e={}){let{locale:t}=gT();return(0,cy.useMemo)(()=>new(0,xc.K)(t,e),[t,e])}var xp={};function xf(e){var t;let r=(0,cy.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=yU((t=xp)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,cy.useEffect)(()=>()=>clearTimeout(r.current),[]);let y=(0,cy.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===o?g.format("Empty"):(o||`${n}`).replace("-","−");(0,cy.useEffect)(()=>{y.current&&(mq&&mq.clear("assertive"),mJ(w,"assertive"))},[w]);let E=mk(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=mk(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}=hT();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}}}xp={"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 xm=r(7120);function xh(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 xg=(0,cy.createContext)(null),xy=(0,cy.createContext)(null),xv=(0,cy.forwardRef)(function(e,t){var r,n;[e,t]=mK(e,t,xg);let{validationBehavior:o}=mz(wE)||{},a=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:i}=gT(),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)?wC(a,t,r):wO(a,t,r,n)),isNaN(i)||(i=void 0===n||isNaN(n)?wC(i,t,r):wO(i,t,r,n));let[d,p]=v0(a,isNaN(i)?NaN:i,s),[f,m]=(0,cy.useState)(()=>isNaN(d)?"":new(0,xc.K)(l,o).format(d)),h=(0,cy.useMemo)(()=>new(0,xm.d)(l,o),[l,o]),g=(0,cy.useMemo)(()=>h.getNumberingSystem(f),[h,f]),y=(0,cy.useMemo)(()=>new(0,xc.K)(l,{...o,numberingSystem:g}),[l,o,g]),v=(0,cy.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,cy.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bZ({...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,cy.useState)(d),[_,S]=(0,cy.useState)(l),[k,C]=(0,cy.useState)(o);Object.is(d,x)&&l===_&&o===k||(m(b(d)),D(d),S(l),C(o));let P=(0,cy.useMemo)(()=>h.parse(f),[h,f]),O=(e,n=0)=>{if(isNaN(P))return wO(isNaN(n)?0:n,t,r,E);{let n=wO(P,t,r,E);return"+"===e&&n>P||"-"===e&&n<P?n:wO(xh(e,P,E),t,r,E)}},R=(0,cy.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===r||isNaN(r)||wO(P,t,r,E)>P||xh("+",P,E)<=r),[u,c,t,r,E,P]),T=(0,cy.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||wO(P,t,r,E)<P||xh("-",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(wO(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)?wC(P,t,r):wO(P,t,r,n),p(e=h.parse(b(e))),m(b(void 0===a?e:d)))}}}({...e,locale:i,validationBehavior:a}),l=(0,cy.useRef)(null),[u,c]=mG(!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=yU((o=xl)&&o.__esModule?o.default:o,"@react-aria/numberfield"),$=mL(i),{focusProps:I}=gt({onBlur(){N()}}),M=xd(g),L=(0,cy.useMemo)(()=>M.resolvedOptions(),[M]),F=xd({...g,currencySign:void 0}),B=(0,cy.useMemo)(()=>isNaN(R)?"":F.format(R),[F,R]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=xf({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,cy.useState)(!1),{focusWithinProps:K}=ga({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cy.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);y9(t,"wheel",n?void 0:o)}({onScroll:(0,cy.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";hd()?Z?Y="text":G&&(Y="decimal"):hg()&&(Z?Y="numeric":G&&(Y="decimal"));let q=m4(e),J=(0,cy.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=mk(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,cy.useEffect)(()=>{if(!xu()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r,n]);let o=xu()?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]=v0(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=go(e,t),d=bZ({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:m}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bI({...e,isInvalid:p,errorMessage:e.errorMessage||f}),b=m4(e,{labelable:!0}),w={type:i,pattern:e.pattern};return b$(t,l,u),bM(e,d,t),(0,cy.useEffect)(()=>{if(t.current instanceof he(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:mU(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(cv().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,cy.useRef)(null);return{inputProps:mU(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,[bG]: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,cy.useMemo)(()=>m_(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:D},t,r);b$(r,t.numberValue,t.setNumberValue);let ea=mU(U,I,er,{role:null,"aria-roledescription":hf()?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=mL(),eu=mL(),ec=mU(V,{"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=mU(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}}({...mZ(e),label:c,validationBehavior:a},s,l),b=mH({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=m4(e);return delete w.id,cv().createElement(mW,{values:[[xy,s],[bl,p],[bc,{...f,ref:l}],[wx,{...d,ref:u}],[gh,{slots:{increment:m,decrement:h}}],[gv,{slots:{description:g,errorMessage:y}}],[wv,v]]},cv().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&&cv().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function xb(e,t){return Number.parseInt(E2(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let xw=(0,cy.forwardRef)(function(e,t){let{className:r}=e,n=(0,cy.useContext)(v8),o=(0,cy.useContext)(v7),a=n??o,i=(0,cy.useContext)(xa),s=yk(),l=E2(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=xb(a.visibleRange.start.toDate(s),i),c=a.maxValue?xb(a.maxValue.toDate(s),i):void 0,d=a.minValue?xb(a.minValue.toDate(s),i):void 0,p=(0,cy.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,pb.jsxs)("span",{ref:t,className:r,children:[(0,pb.jsx)("span",{children:l}),(0,pb.jsxs)(xv,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,pb.jsx)(bd,{}),(0,pb.jsxs)(bu,{children:[(0,pb.jsx)(gg,{slot:"increment",children:(0,pb.jsx)(p8,{size:8})}),(0,pb.jsx)(gg,{slot:"decrement",children:(0,pb.jsx)(p6,{size:8})})]})]})]})}),xE="-esm-cohort-builder__datepicker-module__inputGroup___-wpzr",xx="-esm-cohort-builder__datepicker-module__inputSegment___ocu7L",xD="-esm-cohort-builder__datepicker-module__dateInputWrapper___909Km",x_="-esm-cohort-builder__datepicker-module__invalidText___oHJHi",xS="-esm-cohort-builder__datepicker-module__flatButton___i9LDo",xk="-esm-cohort-builder__datepicker-module__flatButtonMd___VZMkc",xC="-esm-cohort-builder__datepicker-module__flatButtonSm___VA5wy",xP="-esm-cohort-builder__datepicker-module__flatButtonLg___MnYLl";function xO({children:e}){let t=(0,cy.useContext)(En),r=(0,cy.useContext)(Eo),n=t??r,o=dq(()=>n?.close());return(0,pb.jsx)(wy,{className:"-esm-cohort-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let xR=(0,cy.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let a="range"===e;return(0,pb.jsx)(w8,{ref:o,className:"-esm-cohort-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,pb.jsx)(xO,{children:(0,pb.jsxs)(a?bt:be,{...a?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,pb.jsxs)("header",{className:"-esm-cohort-builder__datepicker-module__header___+fi16",children:[(0,pb.jsx)(gg,{className:pE()(xS,xk),slot:"previous",children:(0,pb.jsx)(fa,{size:16})}),(0,pb.jsx)(xw,{className:"-esm-cohort-builder__datepicker-module__monthYear___mGhot"}),(0,pb.jsx)(gg,{className:pE()(xS,xk),slot:"next",children:(0,pb.jsx)(fi,{size:16})})]}),(0,pb.jsx)(bn,{className:"-esm-cohort-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,pb.jsx)(bs,{className:pE()("cds--date-picker__day",{"-esm-cohort-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),xT=(0,cy.forwardRef)(function(e,t){let r=(0,cy.useContext)(En),[n,o]=mK({slot:e.slot},t,wa),{locale:a}=gT(),i=wn({...n,locale:a,createCalendar:vK}),s=(0,cy.useRef)(null),{fieldProps:l,inputProps:u}=bU({...n,inputRef:s},i,o),c=(0,cy.useCallback)(()=>{i.isDisabled||r.toggle()},[]);return(0,pb.jsxs)(mW,{values:[[wi,i],[bc,{...u,ref:s}],[bl,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,pb.jsx)(bu,{...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,cy.cloneElement)(e.children(t),{key:r}))}),(0,pb.jsx)(bd,{})]})}),xN=(0,cy.forwardRef)(function(e,t){let r=(0,cy.useContext)(En),n=(0,cy.useContext)(Eo);return(r??n).isInvalid?(0,pb.jsx)(mf,{ref:t,size:16,...e}):(0,pb.jsx)(p3,{ref:t,size:16,...e})});class xj{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xA=new Map,x$=(0,cy.forwardRef)(function({segment:e,...t},r){let n=(0,cy.useContext)(wi),o=mD(r),{segmentProps:a}=function(e,t,r){let n,o,a,i,s=(0,cy.useRef)(""),{locale:l,direction:u}=gT(),c=function(){var e;let{locale:t}=gT(),r=yB((e=bp)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cy.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xj(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:m}=bL.get(t),h=e.isPlaceholder?"":e.text,g=(0,cy.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yY({month:"long",timeZone:g.timeZone}),v=yY({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}=xf({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,cy.useMemo)(()=>new(0,xm.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}=gT(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xA.has(r))return xA.get(r);let n=new Intl.Collator(t,e);return xA.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cy.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,cy.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,cy.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,cy.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),D=yY({hour:"numeric",hour12:!0}),_=(0,cy.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,cy.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),k=yY({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,cy.useMemo)(()=>{if("era"!==e.type)return[];let r=ym(new g9(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}}};y9((0,cy.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,cy.useRef)("");y9(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)}}),y9(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))}),mS(()=>{let e=r.current;return()=>{document.activeElement===e&&(m.focusPrevious()||m.focusNext())}},[r,m]);let R=hf()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cy.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let T=mL(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j="literal"===e.type?"":c.of(e.type),A=y4({"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:mU(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(cv().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&&(hc()?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&&vn(r.current,{containingElement:vo(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}=gi(),{hoverProps:u,isHovered:c}=gd({...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,cy.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,cy.useCallback)(e=>{e.stopPropagation()},[]);return(0,pb.jsx)("span",{...mU(m4(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})}),xI={short:!1,size:"md"},xM=(0,cy.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}={...xI,...e},{calendar:b,intlLocale:w,today_:E}=xi(),x=(0,cy.useId)(),D=!!(u??l),_=(0,cy.useMemo)(()=>El(n,b),[n,b]),S=(0,cy.useMemo)(()=>El(y,b,!0),[y,b]),k=(0,cy.useMemo)(()=>El(d,b),[d,b]),C=(0,cy.useMemo)(()=>El(p??xs,b),[p,b]),P=(0,cy.useMemo)(()=>a||s,[a,s]),O=(0,cy.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?.(Eu(e)))),[m,f]);return(0,pb.jsx)(Es,{locale:w.toString(),children:(0,pb.jsx)("div",{className:pE()("cds--form-item",r),children:(0,pb.jsx)(mW,{values:[[xa,w]],children:(0,pb.jsxs)(Ea,{className:pE()("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,pb.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,pb.jsx)(wD,{className:pE()("cds--label",{"cds--label--disabled":o}),htmlFor:x,children:u??l}),(0,pb.jsxs)(bu,{className:xE,children:[(0,pb.jsx)(xT,{id:D?x:void 0,ref:t,className:pE()("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,pb.jsx)(x$,{className:xx,segment:e}):(0,pb.jsx)(cv().Fragment,{})}),(0,pb.jsx)(gg,{className:pE()(xS,{[xC]:"sm"===g,[xk]:"md"===g||!g||0===g.length,[xP]:"lg"===g}),children:(0,pb.jsx)(xN,{})})]}),(0,pb.jsx)(wb,{className:x_,children:i})]}),(0,pb.jsx)(xR,{variant:"single",today_:E})]})})})})}),xL=(0,cy.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}=xi(),w=(0,cy.useId)(),E=!!(s??i),x=(0,cy.useMemo)(()=>{if(m)return{start:El(m[0],y,!1),end:El(m[1],y,!1)}},[m,y]),D=(0,cy.useMemo)(()=>{if(t)return{start:El(t[0],y,!1),end:El(t[1],y,!1)}},[t,y]),_=(0,cy.useMemo)(()=>El(c??xs,y,!0),[c,y]),S=(0,cy.useMemo)(()=>El(u,y,!0),[u,y]),k=(0,cy.useMemo)(()=>r||a,[r,a]),C=(0,cy.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?.([Eu(e.start),Eu(e.end)]))),[p,d]);return(0,pb.jsx)(Es,{locale:v.toString(),children:(0,pb.jsx)("div",{className:pE()("cds--form-item",e),children:(0,pb.jsx)(mW,{values:[[xa,v]],children:(0,pb.jsx)(Ei,{id:E?w:void 0,className:pE()("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,pb.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,pb.jsx)(wD,{className:pE()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??i}),(0,pb.jsxs)(bu,{className:xE,children:[(0,pb.jsxs)("div",{className:pE()("-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,pb.jsx)(wl,{className:pE()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__startInput___C8vnM",xD),slot:"start",children:e=>(0,pb.jsx)(x$,{className:xx,segment:e})}),(0,pb.jsx)("div",{className:"-esm-cohort-builder__datepicker-module__separator___vHLFZ",children:(0,pb.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,pb.jsx)(wl,{className:pE()("cds--date-picker-input__wrapper","-esm-cohort-builder__datepicker-module__endInput___25OF9",xD),slot:"end",children:e=>(0,pb.jsx)(x$,{className:xx,segment:e})})]}),(0,pb.jsx)(gg,{className:pE()(xS,{[xC]:"sm"===f,[xk]:"md"===f||!f||0===f.length,[xP]:"lg"===f}),children:(0,pb.jsx)(xN,{})})]}),(0,pb.jsx)(wb,{className:x_,children:n}),(0,pb.jsx)(xR,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),xF=({diagnoses:e})=>{let{diagnosisTags:t}=dy({externalModuleName:"@openmrs/esm-styleguide"});return(0,pb.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,pb.jsx)(pk.Tag,{type:a,children:o},n)})})},xB={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"},xU=({width:e="64",height:t="64"})=>(0,pb.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,pb.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xV=e=>{let t="tablet"===dH(),r=e.launchForm;return(0,pb.jsx)(pk.Layer,{className:xB.layer,children:(0,pb.jsxs)(pk.Tile,{className:xB.tile,children:[(0,pb.jsx)("div",{className:t?xB.tabletHeading:xB.desktopHeading,children:(0,pb.jsx)("h4",{children:e.headerTitle})}),(0,pb.jsx)(xU,{}),(0,pb.jsx)("p",{className:xB.content,children:iG("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,pb.jsx)("p",{className:xB.action,children:r&&(0,pb.jsx)(pk.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:iG("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xW=({error:e,headerTitle:t})=>{let r="tablet"===dH();return(0,pb.jsx)(pk.Layer,{children:(0,pb.jsxs)(pk.Tile,{className:"-esm-cohort-builder__error-state-module__tile___hHM56",children:[(0,pb.jsx)("div",{className:r?"-esm-cohort-builder__error-state-module__tabletHeading___W7a4U":"-esm-cohort-builder__error-state-module__desktopHeading___VL8Rv",children:(0,pb.jsx)("h4",{children:t})}),(0,pb.jsxs)("p",{className:"-esm-cohort-builder__error-state-module__errorMessage___IytZy",children:[iG("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,pb.jsx)("p",{className:"-esm-cohort-builder__error-state-module__errorCopy___E1yZO",children:iG("errorCopy")})]})})},xH=xW,xz=cv().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:a}=dG(),i=window.location??{pathname:""},s=cN(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,pb.jsxs)(pk.SideNav,{"aria-label":iG("leftNavigation","Left navigation"),className:"-esm-cohort-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,pb.jsx)(c$,{name:"global-nav-menu-slot"}),r?(0,pb.jsx)(ds,{value:o,fallback:(0,pb.jsx)(c$,{name:r,state:{basePath:n,currentPath:i,...a}}),children:(0,pb.jsx)(cb.Provider,{value:o,children:(0,pb.jsx)(c$,{name:r,state:{basePath:n,currentPath:i,...a}})})}):null]}):null}),xK=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[a,i]=(0,cy.useState)(""),s=(0,cy.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dE()(t,se,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cy.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=db(r),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dI()(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=`${i9}/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()},se);return(0,cy.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,cy.useMemo)(()=>l&&!a&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,a]),g=(0,cy.useCallback)(e=>{o(),i(e.trim())},[o]),y=dJ((0,cy.useCallback)(()=>{!p&&d&&m(e=>e+1)},[p,d,m])),v=d?Math.max(0,Math.floor(h.length-n/2)):-1;return(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)(pk.Search,{"aria-describedby":f?`${s}-error`:void 0,labelText:iG("searchForLocation"),id:s,placeholder:iG("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,pb.jsx)(pk.InlineNotification,{kind:"error",subtitle:iG("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iG("error","Error")})}),(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__searchResults___aCL93",children:c?(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,pb.jsx)(pk.RadioButtonSkeleton,{className:"-esm-cohort-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,pb.jsx)(pk.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,pb.jsx)(pk.RadioButton,{className:"-esm-cohort-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,pb.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__emptyState___qiPqQ",children:(0,pb.jsx)("p",{className:"-esm-cohort-builder__location-picker-module__locationNotFound___tKDOJ",children:iG("noResultsToDisplay")})})}),p&&(0,pb.jsx)("div",{className:"-esm-cohort-builder__location-picker-module__loadingIcon___PGwvc",children:(0,pb.jsx)(pk.InlineLoading,{description:iG("loading")})})]})})]})},xG=B("modalState",{modalContainer:null,modalStack:[]}),xZ=0;async function xY(e,t,r={}){let n=u3(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:a}=n,i=await a(),s=xZ++;o=await cf({...i,name:`${t}-${s}`},{...r,domElement:e})}else C(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function xq(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xJ(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xX(e){return e.find(e=>!xq(e))}function xQ(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let x0=window.getComputedStyle(document.body).overflow;function x1({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",x4),document.body.style.overflow="hidden",t.style.visibility="unset");let r=xX(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",xY(r,e.modalName,e.props).then(n=>{xq(e)?xJ(e.modalName,n):n?(e.parcel=n,t.prepend(r),xQ(e,xX(xG.getState().modalStack)===e),n.mountPromise.then(()=>{xq(e)||(e.state="MOUNTED")},t=>{C(t),e.parcel=null,x2(e)})):x2(e)},t=>{C(t),x2(e)});break}case"MOUNTING":case"MOUNTED":xQ(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xJ(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xG.getState();xG.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=x0,removeEventListener("keydown",x4)}function x2(e){if(xq(e))return;e.state="TO_BE_DELETED";let t=xG.getState();xG.setState({...t,modalStack:[...t.modalStack]})}function x4(e){"Escape"===e.key&&function(){let[e]=xG.getState().modalStack;e&&x2(e)}()}function x3(e){xG.subscribe(x1),xG.setState({...xG.getState(),modalContainer:e})}function x6(e,t={},r=()=>{}){let n=()=>{let e=xG.getState().modalStack.find(e=>e.onClose===r);e&&x2(e)};if(u3(e)){var o;let a,i;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},i=[o,...(a=xG.getState()).modalStack],xG.setState({...a,modalStack:i})}else C(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}var x5=Object.prototype.hasOwnProperty;let x9=function(e){if(null==e)return!0;if(tn(e)&&(tt(e)||"string"==typeof e||"function"==typeof e.splice||ts(e)||tg(e)||te(e)))return!e.length;var t=rh(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(e3(e))return!t6(e).length;for(var r in e)if(x5.call(e,r))return!1;return!0},x8=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:a,onAction:i}=e;return(0,pb.jsx)(pk.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:a||"",inline:!0,onActionButtonClick:i})},x7=({subject:e})=>{let[t,r]=(0,cy.useState)([]);return(0,cy.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,pb.jsx)(pb.Fragment,{children:t.map(e=>(0,pb.jsx)(x8,{notification:e},e.id))})},De=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,cy.useState)(t);return(0,pb.jsx)(pk.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:iG("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:iG("actionableNotification","Actionable notification"),subtitle:n,title:a,lowContrast:i,inline:!0,...u})},Dt=({subject:e})=>{let[t,r]=(0,cy.useState)([]);return(0,cy.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,pb.jsx)(pb.Fragment,{children:t.map(e=>(0,pb.jsx)(De,{notification:e},e.id))})};class Dr{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 Dn=new Dr,Do=0,Da=new Dr,Di=0;function Ds(e){e&&(0,cI.createRoot)(e).render((0,pb.jsx)(x7,{subject:Dn}))}function Dl(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!x9(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{Dn.next({...e,id:Do++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function Du(e){e&&(0,cI.createRoot)(e).render((0,pb.jsx)(Dt,{subject:Da}))}function Dc(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!x9(t))?setTimeout(()=>{Da.next({...e,id:Di++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Dd=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Dp=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Df={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"},Dm=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,cy.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${i5}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${i5}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:a}=dE()(r,se),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,cy.useMemo)(()=>{if(n)return n?"--"===n?"normal":Dd.includes(n)?n.toLowerCase():Dp.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:iG("notAvailable","Not available"),w=pE()({[Df["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[Df["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[Df.low]:"low"===p,[Df.high]:"high"===p,[Df["off-scale-low"]]:"off_scale_low"===p,[Df["off-scale-high"]]:"off_scale_high"===p}),E=pE()({[Df.container]:!0,[Df.card]:!0,[Df["critical-value"]]:f,[Df["abnormal-value"]]:m&&!f}),x=pE()({[Df.cell]:!0,[w]:!0});return"cell"===i?(0,pb.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,pb.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[r&&(0,pb.jsxs)("div",{className:Df["label-container"],children:[(0,pb.jsx)("span",{id:h,className:Df.label,children:r}),m&&(0,pb.jsx)("span",{className:Df[p.replace("_","-")],title:iG("abnormalValue","Abnormal value")})]}),(0,pb.jsxs)("div",{className:Df["value-container"],children:[(0,pb.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:Df.value,children:b}),v&&t&&(0,pb.jsx)("span",{id:y,className:Df.units,children:t})]})]})},Dh="-esm-cohort-builder__page-header-module__pageHeader___XNJYe",Dg=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,pb.jsx)("div",{className:pE()(Dh,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,pb.jsx)("div",{className:pE()(Dh,n),...o,children:(0,pb.jsx)(Dy,{title:t,illustration:r})})}},Dy=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cy.useState)(null);return(0,cy.useEffect)(()=>{nq("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,pb.jsxs)("div",{className:pE()("-esm-cohort-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,pb.jsxs)("div",{className:"-esm-cohort-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,pb.jsx)("p",{children:iG(n.implementationName)}),(0,pb.jsx)("p",{className:"-esm-cohort-builder__page-header-module__pageName___+eYMc",children:e})]})]})},Dv=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=d0(t,e,n,a),u="tablet"===dH(),c=iG("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,pb.jsx)(pb.Fragment,{children:e>0&&(0,pb.jsxs)("div",{className:pE()({"-esm-cohort-builder__pagination-module__tablet___DdaYk":u,"-esm-cohort-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,pb.jsxs)("div",{children:[c,o&&(0,pb.jsx)(cw,{to:o,className:"-esm-cohort-builder__pagination-module__configurableLink___cTCLf",children:i??iG("seeAll","See all")})]}),(0,pb.jsx)(pk.Pagination,{className:"-esm-cohort-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>iG("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Db(e){return DE(DD(e,"usual","official"))}function Dw(e){return Db(e)}function DE(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Dx(e){return DE(e)}function DD(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 D_(e,t=d9()){let r=d9(t),n=E8(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 DS(e,t=d9()){let r=D_(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),E9(r,n)}let Dk={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 DC({showIdentifierLabel:e,type:t,value:r}){return(0,pb.jsx)("span",{className:Dk.primaryIdentifier,children:(0,pb.jsxs)(pk.Tag,{className:Dk.tag,type:"gray",children:[e&&t?.text&&(0,pb.jsxs)("span",{className:Dk.label,children:[t.text,": "]}),(0,pb.jsx)("span",{className:Dk.value,children:r})]})})}function DP({showIdentifierLabel:e,type:t,value:r}){return(0,pb.jsxs)(pk.FormLabel,{className:Dk.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,pb.jsxs)("span",{className:Dk.label,children:[t?.text,": "]}),(0,pb.jsx)("span",{className:Dk.value,children:r})]})}function DO({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=dy(),{primaryIdentifierCode:n}=d4(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,pb.jsx)(pb.Fragment,{children:o?.length?o.map(({value:e,type:r},a)=>(0,pb.jsxs)(cv().Fragment,{children:[(0,pb.jsx)("span",{className:Dk.identifier,children:r?.coding?.[0]?.code===n?(0,pb.jsx)(DC,{showIdentifierLabel:t,type:r,value:e}):(0,pb.jsx)(DP,{showIdentifierLabel:t,type:r,value:e})}),a<o.length-1&&(0,pb.jsx)("span",{className:Dk.separator,children:"\xb7"})]},e)):""})}let DR={Female:fv,Male:fb,Other:fw,Unknown:fE},DT=({gender:e})=>{let t=DR[e];return t?(0,pb.jsx)(t,{fill:"#525252"}):null},DN={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Dj({patient:e,renderedFrom:t}){var r;let n,o,a=Db(e),i=e?.gender&&(o=DN[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:iG(n,r),iconKey:o}),s=(0,cy.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,pb.jsxs)("div",{className:Dk.patientInfo,children:[(0,pb.jsx)("div",{className:pE()(Dk.row,Dk.patientNameRow),children:(0,pb.jsxs)("div",{className:Dk.flexRow,children:[(0,pb.jsx)("span",{className:Dk.patientName,children:a}),i&&(0,pb.jsxs)("div",{className:Dk.gender,children:[(0,pb.jsx)(DT,{gender:i.iconKey}),(0,pb.jsx)("span",{children:i.displayText})]}),(0,pb.jsx)(c$,{className:Dk.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,pb.jsxs)("div",{className:Dk.demographics,children:[e.birthDate&&(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)("span",{children:DS(e.birthDate)}),(0,pb.jsx)("span",{className:Dk.separator,children:"\xb7"}),(0,pb.jsx)("span",{children:E1(e.birthDate,{time:!1})}),(0,pb.jsx)("span",{className:Dk.separator,children:"\xb7"})]}),(0,pb.jsx)(DO,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,pb.jsx)(c$,{className:Dk.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var DA=r(1673);function D$({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,a]=(0,cy.useState)(!1),{extensions:i}=cj(r),s="tablet"===dH(),l=dq(()=>a(!1),o),u=(0,cy.useRef)(null),c=(0,cy.useRef)(null),d=(0,cy.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,m=(0,cy.useCallback)(()=>a(e=>!e),[]),h=(0,cy.useCallback)(()=>{a(!1),u.current?.focus()},[]),g=(0,cy.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,cy.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,cy.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...n}),[t,e,h,n]);return 0===i.length?null:(0,pb.jsx)("div",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,pb.jsxs)("div",{"data-overflow-menu":!0,className:pE()("cds--overflow-menu",pO),ref:l,children:[(0,pb.jsxs)("button",{className:pE()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},pN),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:m,onKeyDown:g,ref:u,children:[(0,pb.jsx)("span",{className:"-esm-cohort-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:iG("actions","Actions")})," ",(0,pb.jsx)(DA.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,pb.jsxs)("div",{className:pE()("cds--overflow-menu-options","cds--overflow-menu--flip",pR,{[pT]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,pb.jsx)("ul",{className:pE()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,pb.jsx)(c$,{name:r,state:y},r)}),(0,pb.jsx)("span",{})]})]})})}var DI=r(6767),DM=r.n(DI);function DL(e){let{patientPhotoConceptUuid:t}=dy({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${i5}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:a}=cX()(e?r:null,se),i=n?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let DF=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,cq.useTranslation)();return(0,pb.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,pb.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,pb.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"})]})},DB="-esm-cohort-builder__patient-photo-module__avatar___R93LX";function DU({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=DL(e),[a,i]=(0,cy.useState)(null),[s,l]=(0,cy.useState)(!1),u=(0,cy.useMemo)(()=>DM().generate(e),[e]);(0,cy.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,cy.useMemo)(()=>r||(a?iG("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iG("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,a,t]);return o||s?(0,pb.jsx)(pk.SkeletonIcon,{className:"-esm-cohort-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!a?(0,pb.jsx)(DF,{"aria-label":iG("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):a?(0,pb.jsx)("div",{"aria-label":c,children:(0,pb.jsx)("img",{className:DB,src:a,alt:c,title:t})}):(0,pb.jsx)("div",{"aria-label":c,children:(0,pb.jsx)("div",{className:DB,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,pb.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 DV=["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-documents","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"],DW=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),DH=DW,Dz=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),DK=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),DG=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),DZ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),DY=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Dq=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),DJ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),DX=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),DQ=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),D0=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),D1=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),D2=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),D4=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),D3=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),D6=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),D5=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),D9=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),D8=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),D7=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_e=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_t=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_r=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_n=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_o=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_a=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),_i=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_s=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_l=(0,cy.memo)((0,cy.forwardRef)(function(e,t){return(0,pb.jsx)(_p,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_u=DQ,_c=D7,_d=(0,cy.memo)((0,cy.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cy.useRef)(document.getElementById(e));return(0,cy.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,pb.jsx)(ds,{value:o.current,fallback:t,children:(0,pb.jsx)(_p,{ref:n,pictogram:e,pictogramProps:r})})})),_p=(0,cy.memo)((0,cy.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,pb.jsx)("svg",{ref:r,className:pE()("-esm-cohort-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,pb.jsx)("use",{href:`#${e}`})})})),_f=({children:e})=>"tablet"===dH()?(0,pb.jsx)(pk.Layer,{children:e}):(0,pb.jsx)(pb.Fragment,{children:e}),_m=({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,cy.useState)(r),[h,g]=(0,cy.useState)(!0),[y,v]=(0,cy.useState)(!1),b=(0,cy.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,cy.useCallback)(()=>{v(!0),b()},[b]);return(0,cy.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,cy.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,pb.jsx)(pk.ActionableNotification,{actionButtonLabel:f,"aria-label":iG("closeSnackbar","Close snackbar"),className:pE()("-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:iG("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},_h=({subject:e})=>{let[t,r]=(0,cy.useState)([]),n=(0,cy.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cy.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,pb.jsx)(pb.Fragment,{children:t.map(e=>(0,pb.jsx)(_m,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},_g=new Dr,_y=0;function _v(e){e&&(0,cI.createRoot)(e).render((0,pb.jsx)(_h,{subject:_g}))}function _b(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_g.next({...e,id:_y++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _w=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,cy.useCallback)(()=>{s(),t()},[t,s]);return(0,pb.jsx)("div",{children:(0,pb.jsx)(pk.ActionableNotification,{actionButtonLabel:i,kind:n||"info",lowContrast:o,subtitle:r,title:a||"",onActionButtonClick:l,onClose:t})})},_E=({subject:e})=>{let[t,r]=(0,cy.useState)([]),n=(0,cy.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,cy.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,pb.jsx)(pb.Fragment,{children:t.map(e=>(0,pb.jsx)(_w,{toast:e,closeToast:()=>n(e)},e.id))})},_x=new Dr,_D=0;function __(e){e&&(0,cI.createRoot)(e).render((0,pb.jsx)(_E,{subject:_x}))}function _S(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!x9(t))?setTimeout(()=>{_x.next({...e,id:_D++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function _k(e,t=!1){if(t)return!0;let r=_T[e];return!r||!r()}function _C(e,t){let r=_F.getState()?.workspaceGroup,n=r?.name;n&&e===n&&_W(()=>{let n=_Z(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),_F.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function _P(e,t){let{name:r,additionalProps:n}=t;ce(r);let o=()=>{_I(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>_O(r,n),closeWorkspaceGroup:!1})};_k(e.name)?o():_z("closing-workspace-launching-new-workspace",o,e.title??e.name)}function _O(e,t){let r=ce(e),n=_F.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void _C(n.name,()=>{_O(e,t)});let o=_F.getState().workspaceGroup?.name,a={...r,title:_K(r,t),closeWorkspace:(t={})=>_I(e,t),closeWorkspaceWithSavedChanges:t=>_I(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(_T[r]=n)},setTitle:(t,r)=>{a.title=t,a.titleNode=r,_F.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){_F.setState(r=>{let n=[e,...t??r.openWorkspaces],o=_V(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&_Z(o,t);let s=_F.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===_K(t,t.additionalProps)&&{title:_K(a,a.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,_F.getState().openWorkspaces.filter(e=>e.type!=a.type)),_P(u,{name:e,additionalProps:t})):i(a);else _P(s[0],{name:e,additionalProps:t})}function _R({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){_M(t),_O(r,n),iq({to:e})}let _T={};function _N(e,t){_T[e]=t}function _j(e){return _T[e]}function _A(){let e=_F.getState();_F.setState({...e,prompt:null})}let _$={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function _I(e,t={}){t={..._$,...t};let r=()=>{let r=_F.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=_F.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&_C(o),_T[e]=()=>!1,_F.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:_V(n?.[0])})),t?.onWorkspaceClose?.()};return _k(e,t?.ignoreChanges)?(r(),!0):(_z("closing-workspace",r,ce(e).title??e),!1)}function _M(e){_F.getState().context!=e&&_F.setState({context:e,openWorkspaces:[],prompt:null})}let _L={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},_F=B("workspace",_L);function _B(){return _F}function _U(e){let t=_F.getState();_F.setState({...t,workspaceWindowState:e})}function _V(e){return e?.preferredWindowSize??"normal"}function _W(e=()=>{},t=()=>!0){let r=_F.getState().openWorkspaces.filter(t).every(({name:e})=>_k(e)),n=()=>{_G(),e?.()};r?n():_z("closing-all-workspaces",n)}function _H(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=cS(_F);return(0,cy.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function _z(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:iG("unsavedChangesTitleText","Unsaved changes"),body:iG("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:iG("discard","Discard")};break;case"closing-all-workspaces":{let e=_F.getState().openWorkspaces.filter(({name:e})=>!_k(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:iG("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:iG("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:iG("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:iG("unsavedChangesTitleText","Unsaved changes"),body:iG("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{_F.setState(e=>({...e,prompt:null})),t?.()},confirmText:iG("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}_F.setState(e=>({...e,prompt:n}))}function _K(e,t){return t?.workspaceTitle??e.title}function _G(){_F.setState(_L)}function _Z(e,t={}){if(!e||"default"===e)return;let r=V(e,{});return t&&r.setState(e=>({...e,...t})),r}let _Y="-esm-cohort-builder__action-menu-button-module__container___Uwne-",_q="-esm-cohort-builder__action-menu-button-module__elementContainer___vWkQO",_J="-esm-cohort-builder__action-menu-button-module__active___D7Idw";function _X({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,pb.jsxs)(pb.Fragment,{children:[e({size:16}),t?(0,pb.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,pb.jsx)("span",{className:"-esm-cohort-builder__action-menu-button-module__countTag___XJRiM",children:r})]})}let _Q=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:a})=>{let i=dH(),{workspaces:s,workspaceWindowState:l}=_H(),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,pb.jsxs)(pk.Button,{className:pE()(_Y,{[_J]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,pb.jsx)("span",{className:_q,children:(0,pb.jsx)(_X,{formOpenInTheBackground:d,getIcon:e,tagContent:a})}),(0,pb.jsx)("span",{children:t})]}):(0,pb.jsx)(pk.IconButton,{align:"left","aria-label":r,className:pE()(_Y,{[_J]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,pb.jsx)("div",{className:_q,children:(0,pb.jsx)(_X,{formOpenInTheBackground:d,getIcon:e,tagContent:a})})})};var _0=r(4535),_1=r(771),_2=/[\\^$.*+?()[\]{}|]/g,_4=RegExp(_2.source);let _3=function(e){return(e=r1(e))&&_4.test(e)?e.replace(_2,"\\$&"):e};function _6({contextKey:e}){let{prompt:t}=_H();return(0,cy.useEffect)(()=>{RegExp(`/${_3(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,cy.useEffect)(()=>(_M(e),()=>{_M(null)}),[e]),(0,cy.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${_3(e)}(/|$)`),a=new URL(n),i=o.test(a.pathname),s=_F.getState().openWorkspaces.every(({name:e})=>_k(e));i||(s?_G():(r?.(),_W(()=>{iq({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,pb.jsxs)(pk.ComposedModal,{open:!0,onClose:_A,children:[(0,pb.jsx)(pk.ModalHeader,{title:t.title}),(0,pb.jsx)(pk.ModalBody,{children:(0,pb.jsx)("p",{className:"-esm-cohort-builder__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,pb.jsxs)(pk.ModalFooter,{children:[(0,pb.jsx)(pk.Button,{kind:"secondary",onClick:_A,children:t.cancelText??iG("cancel")}),(0,pb.jsx)(pk.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??iG("confirm")})]})]}):null}function _5(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 _9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_5(Object(r),!0).forEach(function(t){_7(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _8(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 _7(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sr(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sn=function(e){var t=cy.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&&St(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=Se(i);e=r?Reflect.construct(t,arguments,Se(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 Sr(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),_7(Sr(t=a.call(this,e)),"handleRef",function(e){t.el=e}),_7(Sr(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}))}),_7(Sr(t),"getParcelProps",function(){var e=_9(_9({},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,_9({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 cV&&cV.Consumer?cy.createElement(cV.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cV&&cV.Consumer?cy.createElement(cV.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cy.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],_8(i.prototype,n),o&&_8(i,o),i}();_7(Sn,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function So({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,cy.useState)(),o=function(e){let[t,r]=(0,cy.useState)({}),[n,o]=(0,cy.useState)(e);return(0,cy.useEffect)(()=>{n!==e&&o(e)},[e]),(0,cy.useEffect)(()=>{let e,t=_Z(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,cy.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let a=(0,cy.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,pb.jsx)(Sn,{config:r,mountParcel:ch,...a},e.name):(0,pb.jsx)(pk.InlineLoading,{className:"-esm-cohort-builder__workspace-module__loader___v7QFg",description:`${iG("loading","Loading")} ...`})}function Sa({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,cy.useState)(!1),a=(0,cy.useRef)(window.innerHeight),{featureName:i}=(0,cy.useContext)(cb),s=dH();(0,cy.useEffect)(()=>{let e=()=>{o(!dz(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,pb.jsx)("aside",{className:pE()("-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,pb.jsx)("div",{className:"-esm-cohort-builder__action-menu-module__container___mzfAh",children:(0,pb.jsx)(c$,{className:"-esm-cohort-builder__action-menu-module__chartExtensions___DiJtm",name:l,state:r})})})}function Si({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let a=dH(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=_H(),u=l?.name,c=i[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,cy.useMemo)(()=>r||u&&!d,[u,d,r]);return dm(!d&&!dz(a)),(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsxs)("div",{className:r?"-esm-cohort-builder__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-cohort-builder__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,pb.jsx)("aside",{className:pE()(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,pb.jsx)("div",{className:pE()("-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,pb.jsx)("div",{className:pE()("-esm-cohort-builder__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-cohort-builder__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,pb.jsx)(cy.Suspense,{fallback:null,children:(0,pb.jsx)(cq.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,pb.jsx)(Ss,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,pb.jsx)(_6,{contextKey:e})]}),f&&(0,pb.jsx)(Sa,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function Ss({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,cq.useTranslation)(),n=dH(),{workspaceWindowState:o,workspaceGroup:a}=_H(),i=a?.name,s="maximized"===o;(0,cy.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,cy.useContext)(cb),u=(0,cy.useCallback)(()=>{_U(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,cy.useMemo)(()=>e??{},[e]),m=(0,cy.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsxs)(pk.Header,{"aria-label":iG("workspaceHeader","Workspace Header"),className:"-esm-cohort-builder__workspace-module__header___nACZO",children:[!dz(n)&&!c&&(0,pb.jsx)(pk.HeaderMenuButton,{"aria-label":iG("close","Close"),renderMenuIcon:(0,pb.jsx)(pQ,{}),onClick:()=>f()}),(0,pb.jsx)(pk.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,pb.jsx)("div",{className:"-esm-cohort-builder__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,pb.jsxs)(pk.HeaderGlobalBar,{className:"-esm-cohort-builder__workspace-module__headerButtons___heP0Q",children:[(0,pb.jsx)(c$,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:m}),(0,pb.jsx)(c$,{name:`workspace-header-type-${e.type}-slot`,state:m}),(0,pb.jsx)(c$,{name:`workspace-header-${l}-slot`,state:m}),dz(n)&&(0,pb.jsxs)(pb.Fragment,{children:[(d||s)&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":s?iG("minimize","Minimize"):iG("maximize","Maximize"),onClick:u,children:s?(0,pb.jsx)(_0.Xj,{}):(0,pb.jsx)(_0.hz,{})}),c&&!i?(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("hide","Hide"),onClick:()=>_U("hidden"),children:(0,pb.jsx)(p0,{})}):(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("close","Close"),onClick:()=>f?.(),children:(0,pb.jsx)(fl,{})})]}),"tablet"===n&&c&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("close","Close"),onClick:()=>f?.(),children:(0,pb.jsx)(_1.d3,{})})]})]}),(0,pb.jsx)("div",{className:pE()("-esm-cohort-builder__workspace-module__workspaceContent___oYdxI",{"-esm-cohort-builder__workspace-module__marginWorkspaceContent___7hwHu":!!p}),children:(0,pb.jsx)(So,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let Sl="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Su=new Uint8Array(16),Sc=[];for(let e=0;e<256;++e)Sc.push((e+256).toString(16).slice(1));let Sd=function(e,t,r){if(Sl&&!t&&!e)return Sl();let n=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(Su)}();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(Sc[e[t+0]]+Sc[e[t+1]]+Sc[e[t+2]]+Sc[e[t+3]]+"-"+Sc[e[t+4]]+Sc[e[t+5]]+"-"+Sc[e[t+6]]+Sc[e[t+7]]+"-"+Sc[e[t+8]]+Sc[e[t+9]]+"-"+Sc[e[t+10]]+Sc[e[t+11]]+Sc[e[t+12]]+Sc[e[t+13]]+Sc[e[t+14]]+Sc[e[t+15]]).toLowerCase()}(n)};async function Sp(e,t){let{openedGroup:r}=cr.getState();if(r){if(r.groupName===e&&Sh(r.props,t))return!0;else if(!await Sg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return cr.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Sf(e){let{openedGroup:t,openedWindows:r}=cr.getState();if(t){if(r.length>0&&!(e||await Sg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;cr.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Sm(e,t=null,r=null,n=null){let o=cr.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=cn(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=co(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let u=ca(e);if(i&&(i.groupName!==l.name||!Sh(i.props,n)))return!!await Sg({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(cr.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[SE(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(Sh(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Sh(d.props,t)?((i||u!==o.openedWindows.length-1)&&cr.setState(Sy.restoreWindow(o,s)),!0):!!await Sg({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(cr.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[SE(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Sg({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(cr.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[SE(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(cr.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[SE(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Sg({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(cr.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[SE(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Sh(e,t){return null==e||null==t||R(e,t)}function Sg(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}=cr.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=x6("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Sy={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=ca(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,SE(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=ca(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 Sv(){return ck(cr,Sy)}let Sb=()=>(0,cy.useContext)(cV),Sw=()=>Object.keys(cr.getState().registeredWorkspacesByName);function SE(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Sd()}}let Sx={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"},SD=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=dH(),{setWindowMaximized:o,hideWindow:a,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:m}=Sv(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=Sb(),b=ca(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,cy.useEffect)(()=>{E?.hasUnsavedChanges!=r&&i(h,r??!1)},[E?.hasUnsavedChanges,r,h,i]),(0,cy.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,pb.jsxs)("div",{className:pE()(Sx.workspaceOuterContainer,{[Sx.narrowWorkspace]:"narrow"===R,[Sx.widerWorkspace]:"wider"===R,[Sx.extraWideWorkspace]:"extra-wide"===R,[Sx.isActionMenuOpened]:T}),children:[(0,pb.jsx)("div",{className:pE()(Sx.workspaceSpacer,{[Sx.hidden]:N})}),(0,pb.jsx)("div",{className:pE()(Sx.workspaceMiddleContainer,{[Sx.maximized]:O,[Sx.hidden]:N,[Sx.isRootWorkspace]:g,[Sx.showActionMenu]:v}),children:(0,pb.jsxs)("div",{className:pE()(Sx.workspaceInnerContainer,{[Sx.maximized]:O,[Sx.hidden]:N,[Sx.isRootWorkspace]:g}),children:[(0,pb.jsxs)(pk.Header,{"aria-label":iG("workspaceHeader"),className:Sx.header,children:[(0,pb.jsx)(pk.HeaderName,{prefix:"",children:e}),(0,pb.jsx)("div",{className:Sx.overlayHeaderSpacer}),(0,pb.jsx)(pk.HeaderGlobalBar,{className:Sx.headerButtons,children:dz(n)?(0,pb.jsxs)(pb.Fragment,{children:[(k||O)&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":O?iG("minimize"):iG("maximize"),onClick:()=>o(D,!O),children:O?(0,pb.jsx)(_0.Xj,{}):(0,pb.jsx)(_0.hz,{})}),P&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("hide"),onClick:()=>a(),children:(0,pb.jsx)(p0,{})}),!C&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("close"),onClick:()=>y({closeWindow:!0}),children:(0,pb.jsx)(fl,{})})]}):(0,pb.jsxs)(pb.Fragment,{children:[P&&(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("hide"),onClick:()=>a(),children:(0,pb.jsx)(_1.d3,{})}),(0,pb.jsx)(pk.HeaderGlobalAction,{"aria-label":iG("close"),onClick:()=>{C?Sf():y({closeWindow:!0})},children:(0,pb.jsx)(fl,{})})]})})]}),(0,pb.jsx)("div",{className:pE()(Sx.workspaceContent),children:t})]})})]})},S_="-esm-cohort-builder__action-menu-button2-module__container___gYRoa",SS="-esm-cohort-builder__action-menu-button2-module__elementContainer___vBViO",Sk="-esm-cohort-builder__action-menu-button2-module__active___uRJRA",SC="-esm-cohort-builder__action-menu-button2-module__focused___D4VYB";function SP({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,pb.jsxs)(pb.Fragment,{children:[e({size:16}),t?(0,pb.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,pb.jsx)("span",{className:"-esm-cohort-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let SO=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let a=dH(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Sv(),{extension:c}=(0,cy.useContext)(cb),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;Sm(e,t,r)}};return"tablet"===a||"phone"===a?(0,pb.jsxs)(pk.Button,{className:pE()(S_,{[Sk]:f&&!h,[SC]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,pb.jsx)("span",{className:SS,children:(0,pb.jsx)(SP,{hasUnsavedChanges:g,getIcon:e,tagContent:r})}),(0,pb.jsx)("span",{children:t})]}):(0,pb.jsx)(pk.IconButton,{align:"left","aria-label":t,className:pE()(S_,{[Sk]:f&&!h,[SC]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,pb.jsx)("div",{className:SS,children:(0,pb.jsx)(SP,{hasUnsavedChanges:g,getIcon:e,tagContent:r})})})};function SR({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,pb.jsx)(pk.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?fs:fo,children:e?iG("showLess","Show less"):iG("showMore","Show more")})}let ST={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"},SN=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${i5}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=cX()(t,se),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cy.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsxs)("p",{className:ST.heading,children:[iG("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,pb.jsx)(pk.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,pb.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EY(e?.startDate).getTime()-EY(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,pb.jsx)("li",{children:(0,pb.jsx)(cw,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,pb.jsx)("li",{children:"--"})})(),t.length>3&&(0,pb.jsx)("li",{className:ST.link,children:(0,pb.jsx)(cw,{to:`${window.spaBase}/home/patient-lists`,children:iG("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Sj=({patientId:e})=>{let{patient:t,isLoading:r}=d2(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,pb.jsx)(pk.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)("p",{className:ST.heading,children:iG("address","Address")}),(0,pb.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,pb.jsxs)("li",{children:[iG(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,pb.jsxs)("li",{children:[iG(e,e),": ",t]},`address-${e}`)):(0,pb.jsx)("li",{children:"--"})})]})},SA=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=dy({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dE()(`${i5}/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)))`,se);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cy.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cy.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?iG(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)("p",{className:ST.heading,children:iG("contactDetails","Contact Details")}),t?(0,pb.jsx)(pk.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,pb.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,pb.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,pb.jsx)("li",{children:"--"})})]})},S$=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${i5}/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}=cX()(e?t:null,se),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,pb.jsxs)(pb.Fragment,{children:[(0,pb.jsx)("p",{className:ST.heading,children:iG("relationships","Relationships")}),r?(0,pb.jsx)(pk.InlineLoading,{description:`${iG("loading","Loading")} ...`,role:"progressbar"}):(0,pb.jsx)("ul",{children:t&&t.length>0?(0,pb.jsx)(pb.Fragment,{children:t.map(e=>(0,pb.jsxs)("li",{className:ST.relationship,children:[(0,pb.jsx)("div",{children:(0,pb.jsx)(cw,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,pb.jsx)("div",{children:e.relationshipType}),(0,pb.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iG("yearAbbreviation","yr"):iG("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,pb.jsx)("li",{children:"--"})})]})};function SI({patientId:e,deceased:t}){return(0,pb.jsxs)("div",{className:pE()(ST.contactDetails,{[ST.deceased]:t}),children:[(0,pb.jsxs)("div",{className:ST.row,children:[(0,pb.jsx)("div",{className:ST.col,children:(0,pb.jsx)(Sj,{patientId:e})}),(0,pb.jsx)("div",{className:ST.col,children:(0,pb.jsx)(SA,{patientUuid:e})})]}),(0,pb.jsxs)("div",{className:ST.row,children:[(0,pb.jsx)("div",{className:ST.col,children:(0,pb.jsx)(S$,{patientId:e})}),(0,pb.jsx)("div",{className:ST.col,children:(0,pb.jsx)(SN,{patientUuid:e})})]})]})}function SM(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 SL="-esm-cohort-builder__action-menu2-module__container___4aX3S";function SF({workspaceGroup:e,groupProps:t}){let r=dH(),{persistence:n}=e;return(0,pb.jsx)("aside",{className:"-esm-cohort-builder__action-menu2-module__sideRail___a7qg9",children:(0,pb.jsxs)("div",{className:SL,children:["closable"==n&&dz(r)&&(0,pb.jsx)(pk.IconButton,{align:"left",onClick:()=>Sf(),label:iG("close"),kind:"ghost",children:(0,pb.jsx)(fl,{})}),(0,pb.jsx)(cb.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,pb.jsx)(c$,{className:SL,name:e.name,state:{groupProps:t}})})]})})}function SB(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 SU=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:a})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Sv(),u=(0,cy.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Sg({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Sg({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 Sg({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:cr.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:a},[t,s,i,r]);if(!e){let{registeredWorkspacesByName:e}=cr.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=cr.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,pb.jsxs)("div",{className:pE()(Sx.workspaceOuterContainer,{[Sx.narrowWorkspace]:"narrow"===u,[Sx.widerWorkspace]:"wider"===u,[Sx.extraWideWorkspace]:"extra-wide"===u,[Sx.isActionMenuOpened]:c}),children:[(0,pb.jsx)("div",{className:Sx.workspaceSpacer}),(0,pb.jsx)("div",{className:pE()(Sx.workspaceMiddleContainer,{[Sx.isRootWorkspace]:n,[Sx.showActionMenu]:a}),children:(0,pb.jsx)("div",{className:pE()(Sx.workspaceInnerContainer,{[Sx.isRootWorkspace]:n}),children:(0,pb.jsx)(pk.InlineLoading,{className:Sx.loader,description:`${iG("loading")} ...`})})})]})}return(0,pb.jsx)(Sn,{config:e,mountParcel:ch,...u},t.workspaceName)},SV=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,cy.useState)({}),{registeredWorkspacesByName:a}=cr.getState();return(0,cy.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=a[e.workspaceName];return[e.uuid,await pl(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,pb.jsx)(pb.Fragment,{children:r.map((o,a)=>(0,pb.jsx)(SU,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===a,isLeafWorkspace:a===r.length-1,showActionMenu:t},o.uuid))})};function SW(e){e&&(0,cI.createRoot)(e).render((0,pb.jsx)(SH,{}))}function SH(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Sv();if((0,cy.useEffect)(()=>lg("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:a,newUrl:i}=t;if(!e)return;if(n)return void o(Sf().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=SB(t),a=SB(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(Sf().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,pb.jsxs)("div",{className:pE()("-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,pb.jsx)("div",{className:"-esm-cohort-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,pb.jsx)(SV,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,pb.jsx)(SF,{workspaceGroup:o,groupProps:e.props})]})}function Sz(e,t,r){if(null==e)return r;let n=Ec(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Ec(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 SK(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SG(e){return!!e&&e.constructor===Object}var SZ=r(7638);function SY(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Sq(e,t){return SZ(function(e){let t=e.indexOf("-");if(t>=0){let r=SY(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return SY(e)}(t),e,{includePrerelease:!0})}async function SJ(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 SX(o(i)),await e()}catch(e){a?.(e,i),r=e}while(n(i++));throw r}async function SX(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function SQ(e,t,r,n){}function S0(e){}function S1(e){return Promise.resolve([])}function S2(e){return Promise.resolve([])}function S4(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 S3(e){return()=>{}}function S6(){return!0}}}]);