@openmrs/esm-form-engine-app 12.3.5-pre.12416 → 12.3.5-pre.12423

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.
@@ -1,43 +1,43 @@
1
- (globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["8224"],{85602(e){e.exports=function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},44397(e){e.exports=function(e,t,n){var r=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||r.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?n.utc():n();Object.keys(t).forEach(function(e){var n;i["date"===(n=r.$utils().p(e))?"day":n]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.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},i=r.parse;r.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=r.set,s=r.add,l=r.subtract,u=function(e,t,n,r){void 0===r&&(r=1);var o=Object.keys(t),i=this;return o.forEach(function(n){i=e.bind(i)(t[n]*r,n)}),i};r.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},r.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},r.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},57657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.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=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r)))return this;var a=16>=Math.abs(r)?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=i(e).local();return p.call(r,o,t,n)}}}()},35570(e,t,n){!function(t){"use strict";var r=n(19109);function o(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=new Date().toString()),n||(n={}),e.call(this,t,n)}}var i=e.exports={generate:o(function(e,t){return new r(e,t)})};t&&(t.fn.geopattern=o(function(e,n){return this.each(function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var o=i.generate(e,n);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},51812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});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,n,r=e.r,o=e.g,i=e.b,a=Math.max(r/=255,o/=255,i/=255),s=Math.min(r,o,i),l=(a+s)/2;if(a===s)t=n=0;else{var u=a-s;switch(n=l>.5?u/(2-a-s):u/(a+s),a){case r:t=(o-i)/u+6*(o<i);break;case o:t=(i-r)/u+2;break;case i:t=(r-o)/u+4}t/=6}return{h:t,s:n,l:l}},hsl2rgb:function(e){function t(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,o,i=e.h,a=e.s,s=e.l;if(0===a)n=r=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;n=t(u,l,i+1/3),r=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},19109(e,t,n){"use strict";var r=n(64751),o=n(51812),i=n(32742),a=n(83153),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,n){return parseInt(e.substr(t,n||1),16)}function d(e,t,n,r,o){return(parseFloat(e)-t)*(o-r)/(n-t)+r}function p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=r({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,n,r,o){var i=y(r),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+r,n+2*r],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+r,n],scale:[1,1]})}function b(e,t,n,r,o){var i=f(o),a=p(o),s=y(r),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,n,r;this.opts.color?n=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),r=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,r%2==0?e.s=Math.min(1,(100*e.s+r)/100):e.s=Math.max(0,(100*e.s-r)/100),n=o.hsl2rgb(e)),this.color=o.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(n)})},h.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)]()},h.prototype.geoHexagons=function(){var e,t,n,r,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,n=f(o),r={fill:p(o),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,r).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,r).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,r).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,r).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,n,r,o,i,a,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++)n=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:n,"stroke-width":""+u+"px"},r="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(r,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(r,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),r={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(r).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,n,r,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),n=0,s=0;s<6;s++)for(a=0;a<6;a++)r=f(i=c(this.hash,n)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),n++},h.prototype.geoXes=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,r={fill:p(o),opacity:n},this.svg.group(r).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(r).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(r).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:p(r),opacity:t},this.svg.circle(o*a,i*a,a,n),0===o&&this.svg.circle(6*a,i*a,a,n),0===i&&this.svg.circle(o*a,6*a,a,n),0===o&&0===i&&this.svg.circle(6*a,6*a,a,n),e++},h.prototype.geoOctogons=function(){var e,t,n,r,o,i,a,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),n=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,n)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),n+=1},h.prototype.geoSquares=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=f(r=c(this.hash,t)),e=p(r),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=f(r=c(this.hash,t)),e=p(r),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:n,"stroke-width":s+"px"}),n=f(r=c(this.hash,39-t)),e=p(r),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":n}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,n),0===o&&this.svg.circle(6*a,i*a,a-s/2,n),0===i&&this.svg.circle(o*a,6*a,a-s/2,n),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,n),e+=1},h.prototype.geoTriangles=function(){var e,t,n,r,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),r={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},n=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,r).transform({translate:[i*l*.5-l/2,h*a],rotate:[n,l/2,h/2]}),0===i&&this.svg.polyline(m,r).transform({translate:[6*l*.5-l/2,h*a],rotate:[n,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),r={fill:p(o),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,r).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,r).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,r).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,n),t=f(r=c(this.hash,39-e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,n),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,n,r=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?b(this.svg,t*r*2,n*r*2,r,c(this.hash,e)):g(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):n%2==0?g(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*r*2,n*r*2,r,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,n,r,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,n=f(i=c(this.hash,t+1)),e=p(i),r=i+5,this.svg.rect(0,a,"100%",r,{opacity:n,fill:e}),a+=r,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,n=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:n,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,n,r,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:p(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,n),this.svg.rect(h-o/2,-o/2,o,o,n),this.svg.rect(-o/2,m-o/2,o,o,n),this.svg.rect(h-o/2,m-o/2,o,o,n);break;case 1:this.svg.rect(a/2+s,i/2,o,o,n);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,n),this.svg.rect(h-o/2,m/2-o/2,o,o,n);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,n);break;case 4:this.svg.polyline(l,n).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,n).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,n).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,n).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,n).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,n).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,n).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,n).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,n).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,n).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,n).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,n).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,n).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},32742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,n=0x98badcfe,r=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=n,h=r,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,n=n+f|0,r=r+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var n=0;n<t;n++)c(e.charCodeAt(n));return}var r=e.length;l+=8*r;for(var o=0;o<r;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(n)+d(r)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},83153(e,t,n){"use strict";var r=n(64751),o=n(57338);function i(){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=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,n,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,r({x:e,y:t,width:n,height:i},a)),this},i.prototype.circle=function(e,t,n,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,r({cx:e,cy:t,r:n},i)),this},i.prototype.path=function(e,t){var n=o("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:e},t)),this},i.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach(function(e){n.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,r({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,r({},e)),this}},57338(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("")}},64751(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(!e||"[object Object]"!==n.call(e)||e.nodeType||e.setInterval)return!1;var r,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)}e.exports=function e(){var t,n,o,i,a,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(n in t)o=l[n],l!==(i=t[n])&&(d&&i&&(r(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&r(o)?o:{},l[n]=e(d,s,i)):void 0!==i&&(l[n]=i));return l}},82034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],h="",m=0;!function e(c){if(Array.isArray(c)){for(let t of c)e(t);return}let d="object"==typeof c?c:function(e,t={}){let{encodePath:i=n}=t,l=[...e],u=0;return new a(function t(n){let a=[],c="";function d(){c&&(a.push({type:"text",value:i(c)}),c="")}for(;u<l.length;){let i=l[u++];if(i===n)return d(),a;if("\\"===i){if(u===l.length)throw new s(`Unexpected end after \\ at index ${u}`,e);c+=l[u++];continue}if(":"===i||"*"===i){let t=":"===i?"param":"wildcard",n="";if(r.test(l[u]))do n+=l[u++];while(o.test(l[u]));else if('"'===l[u]){let t=u;for(;u<l.length;){if('"'===l[++u]){u++,t=0;break}"\\"===l[u]&&u++,n+=l[u]}if(t)throw new s(`Unterminated quote at index ${t}`,e)}if(!n)throw new s(`Missing parameter name at index ${u}`,e);d(),a.push({type:t,name:n});continue}if("{"===i){d(),a.push({type:"group",tokens:t("}")});continue}if("}"===i||"("===i||")"===i||"["===i||"]"===i||"+"===i||"?"===i||"!"===i)throw new s(`Unexpected ${i} at index ${u-1}`,e);c+=i}if(n)throw new s(`Unexpected end at index ${u}, expected ${n}`,e);return d(),a}(""),e)}(c,t);!function e(t,n,r,o){for(;n<t.length;){let i=t[n++];if("group"===i.type){let a=r.length;e(i.tokens,0,r,r=>e(t,n,r,o)),r.length=a;continue}r.push(i)}o(r)}(d.tokens,0,[],e=>{if(m>=256)throw new s("Too many path combinations",d.originalPath);m>0&&(h+="|"),h+=function(e,t,n,r){let o="",a="",u="",c=0,d=0,p=0;for(;p<e.length;){let f=e[p++];if("text"===f.type){o+=i(f.value),a+=f.value,2===c&&(u+=f.value),f.value.includes(t)&&(d=0);continue}if("param"===f.type||"wildcard"===f.type){if(c&&!a)throw new s(`Missing text before "${f.name}" ${f.type}`,r);"param"===f.type?(o+=2&d?`(${l(t,a)}+)`:!function(n,r){for(;n<e.length;){let o=e[n++];if(o.type===r)return!0;if("text"===o.type&&o.value.includes(t))break}return!1}(p,"wildcard")?1&d?`(${l(t,a)}+|${i(a)})`:`(${l(t,"")}+)`:`(${l(t,function(t){let n="";for(;t<e.length;){let r=e[t++];if("text"!==r.type)break;n+=r.value}return n}(p))}+)`,d|=c=1):(o+=2&d?`(${l(a,"")}+)`:u?`(${l(u,"")}+|${l(t,"")}+)`:"([^]+)",u="",d|=c=2),n.push(f),a="";continue}throw TypeError(`Unknown token type: ${f.type}`)}return o}(e,u,f,d.originalPath),m++})}(e);let y=`^(?:${h})`;return p&&(y+="(?:"+i(u)+"$)?"),{regexp:new RegExp(y+=c?"$":"(?="+i(u)+"|$)",d?"":"i"),keys:f}};let n=e=>e,r=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u;function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let n=e;t&&(n+=`: ${t}`),super(n+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}function l(e,t){return t.length>e.length?l(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${i(e)}|${i(t)})[^])`:e.length>1?`(?:(?!${i(e)})[^${i(t)}])`:`[^${i(e+t)}]`}},25873(e,t,n){"use strict";var r=n(43144);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},38513(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(21016);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},8791(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(18860);t.BehaviorSubject=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},1359(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(77759).Subscriber)},4942(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(34914),i=n(47986),a=n(11673);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C",t.Notification=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},95092(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21226),o=n(67595),i=n(46713),a=n(27928),s=n(5319);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),r.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))(function(t,r){var o;o=n.subscribe(function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}()},74143(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5319),o=n(59468);t.empty={closed:!0,next:function(e){},error:function(e){if(r.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},89152(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(77759).Subscriber)},20328(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(63792),s=n(21016),l=n(24654),u=n(18860),c=n(43716);t.ReplaySubject=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0);var o=e.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(e-r[i].time<n);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&r.splice(0,i),r},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},94688(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()},71077(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(95092),a=n(77759),s=n(21016),l=n(18860),u=n(43716),c=n(58636),d=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(p);t.AnonymousSubject=f},43716(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(21016).Subscription)},77759(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(84864),a=n(74143),s=n(21016),l=n(58636),u=n(5319),c=n(59468),d=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!n){i.destination=a.empty;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,n,r,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,n,r,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==a.empty&&(u=Object.create(n),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=r,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,n):this.__tryOrUnsub(n),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,n)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},21016(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(6727),i=n(84864),a=n(11806);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,n=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var d=0;d<n.length;++d)n[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(r.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},5319(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):n&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),n=value},get useDeprecatedSynchronousErrorHandling(){return n}}},75901(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(95092),s=n(41727);t.SimpleInnerSubscriber=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var n;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{n=s.subscribeTo(e)(t)}catch(e){t.error(e)}return n}}},27432(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(71077),s=n(95092),l=n(77759),u=n(21016),c=n(85203),d=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new f(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o};var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()},t}(l.Subscriber)},17563(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(95092),a=n(73766),s=n(19673);t.SubscribeOnObservable=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=n,o.scheduler=r,(!s.isNumeric(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=a.asap),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(i.Observable)},92413(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(23935),a=n(80743),s=n(89152),l=n(87778),u=n(67446),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return i.isScheduler(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,r).lift(new d(n))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(l.subscribeToResult(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,o=r[n],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;r[n]=t,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},99623(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(47986),o=n(60208);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(r.of.apply(void 0,e))}},26691(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(85295),i=n(34914);t.defer=function(e){return new r.Observable(function(t){var n;try{n=e()}catch(e){t.error(e);return}return(n?o.from(n):i.empty()).subscribe(t)})}},34914(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){var n;return e?(n=e,new r.Observable(function(e){return n.schedule(function(){return e.complete()})})):t.EMPTY}},85295(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(41727),i=n(67670);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof r.Observable?e:new r.Observable(o.subscribeTo(e))}},67446(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(422),i=n(85791);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new r.Observable(o.subscribeToArray(e))}},33395(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(23935),i=n(80980),a=n(67446);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof l&&(n=e.pop()),null===s&&1===e.length&&e[0]instanceof r.Observable)?e[0]:i.mergeAll(n)(a.fromArray(e,s))}},47986(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23935),o=n(67446),i=n(85791);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return r.isScheduler(n)?(e.pop(),i.scheduleArray(e,n)):o.fromArray(e)}},57894(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(80743),a=n(67446),s=n(89152),l=n(87778);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],o=l.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var o=this.subscriptions[r];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},11673(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new r.Observable(t?function(n){return t.schedule(o,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}},27954(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(86735),i=n(19673),a=n(23935);function s(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}t.timer=function(e,t,n){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(n=t),a.isScheduler(n)||(n=o.async),new r.Observable(function(t){var r=i.isNumeric(e)?e:e-n.now();return n.schedule(s,r,{index:0,period:l,subscriber:t})})}},85356(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(67446),a=n(80743),s=n(77759),l=n(78258),u=n(75901);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),i.fromArray(e,void 0).lift(new c(n))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){var o=e[r];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],r=0;r<t;r++){var o=e[r],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void n.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):n.next(a),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},18780(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},13441(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(18780),i=n(27954);t.auditTime=function(e,t){return void 0===t&&(t=r.async),o.audit(function(){return i.timer(e,t)})}},11853(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(r))),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},77650(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,n=this.startBufferEvery,r=this.buffers,o=this.count;this.count++,o%n==0&&r.push([]);for(var i=r.length;i--;){var a=r[i];a.push(e),a.length===t&&(r.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(i.Subscriber)},94360(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(77759),s=n(23935);t.bufferTime=function(e){var t=arguments.length,n=i.async;s.isScheduler(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,r,o,n))}};var l=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=r,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==r||r<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,n,{subscriber:a,context:s,bufferTimeSpan:n})):(a.add(s.closeAction=i.schedule(f,n,{subscriber:a,context:s})),a.add(i.schedule(p,r,{bufferTimeSpan:n,bufferCreationInterval:r,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(d,n,r))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,o=e.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(f,n,{subscriber:r,context:i})),this.schedule(e,t))}function f(e){var t=e.subscriber,n=e.context;t.closeContext(n)}},43381(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(21016),a=n(87778),s=n(89152);t.bufferToggle=function(e,t){return function(n){return n.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.closingSelector=r,o.contexts=[],o.add(a.subscribeToResult(o,n)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new i.Subscription,r={buffer:[],subscription:n};t.push(r);var o=a.subscribeToResult(this,e,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},t}(s.OuterSubscriber)},51069(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(21016),a=n(75901);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},85916(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.catchError=function(e){return function(t){var n=new a(e),r=t.lift(n);return n.caught=r}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.selector=n,o.caught=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var r=new i.SimpleInnerSubscriber(this);this.add(r);var o=i.innerSubscribe(n,r);o!==r&&this.add(o)}},t}(i.SimpleOuterSubscriber)},90239(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92413);t.combineAll=function(e){return function(t){return t.lift(new r.CombineLatestOperator(e))}}},79397(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(92413),i=n(85295);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&r.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(n))}}},66255(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.concat.apply(void 0,[t].concat(e)))}}},60208(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80980);t.concatAll=function(){return r.mergeAll(1)}},92209(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781);t.concatMap=function(e,t){return r.mergeMap(e,t,1)}},83232(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92209);t.concatMapTo=function(e,t){return r.concatMap(function(){return e},t)}},85476(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},59768(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},92661(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},90952(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},17436(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(66740),s=n(77759),l=n(4942);t.delay=function(e,t){void 0===t&&(t=i.async);var n=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(n,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,o=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new d(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},41136(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(95092),s=n(89152),l=n(87778);t.delayWhen=function(e,t){return t?function(n){return new d(n,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=l.subscribeToResult(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},56051(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},85343(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.distinct=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(e){n.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},88179(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.distinctUntilChanged=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,n=this.keySelector;t=n?n(e):e}catch(e){return this.destination.error(e)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},43670(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88179);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},57366(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2519),o=n(64629),i=n(8347),a=n(90952),s=n(85624);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,n){return n===e}),s.take(1),n?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},61650(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623),o=n(47986);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return r.concat(t,o.of.apply(void 0,e))}}},92472(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.every=function(e,t){return function(n){return n.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},65893(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},29219(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);t.exhaustMap=function e(t,n){return n?function(r){return r.pipe(e(function(e,r){return a.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},76527(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,o=e.index;t.subscribeToProjection(n,r,o)},t.prototype._next=function(e){var n=this.destination;if(n.closed)return void this._complete();var r=this.index++;if(this.active<this.concurrent){n.next(e);try{var o=(0,this.project)(e,r);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:r})):this.subscribeToProjection(o,e,r)}catch(e){n.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},64629(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.filter=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},4349(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(21016);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new a.Subscription(n)),r}return o(t,e),t}(i.Subscriber)},32376(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(n){return n.lift(new a(e,n,!1,t))}};var a=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.predicate=n,a.source=r,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},8674(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32376);t.findIndex=function(e,t){return function(n){return n.lift(new r.FindValueOperator(e,n,!0,t))}}},77089(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(85624),a=n(90952),s=n(8347),l=n(78522);t.first=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):l.identity,i.take(1),n?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},36217(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(21016),s=n(95092),l=n(71077);t.groupBy=function(e,t,n,r){return function(o){return o.lift(new u(e,t,n,r))}};var u=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.keySelector=n,a.elementSelector=r,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var n,r=this.groups;r||(r=this.groups=new Map);var o=r.get(t);if(this.elementSelector)try{n=this.elementSelector(e)}catch(e){this.error(e)}else n=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,r.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(n)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,n,r){var o=e.call(this,n)||this;return o.key=t,o.group=n,o.parent=r,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=r,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new f(n)),t.add(r.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},76024(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},87362(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},6047(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(96696),a=n(8347),s=n(90952),l=n(78522);t.last=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):l.identity,i.takeLast(1),n?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new r.EmptyError}))}}},89233(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.map=function(e,t){return function(n){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},27296(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},75434(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(4942);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},57001(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);t.max=function(e){return r.reduce("function"==typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},14779(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(33395);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.merge.apply(void 0,[t].concat(e)))}}},80980(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781),o=n(78522);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(o.identity,e)}},60781(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);function l(e,t,n){return(void 0===n&&(n=1/0),"function"==typeof t)?function(r){return r.pipe(l(function(n,r){return a.from(e(n,r)).pipe(i.map(function(e,o){return t(n,e,r,o)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new u(e,n))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,n,r){void 0===r&&(r=1/0);var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},62988(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781);t.mergeMapTo=function(e,t,n){return(void 0===n&&(n=1/0),"function"==typeof t)?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},86430(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,e,t)}catch(e){return n.error(e)}this.active++,this._innerSub(r)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=i.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},21547(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);t.min=function(e){return r.reduce("function"==typeof e?function(t,n){return 0>e(t,n)?t:n}:function(e,t){return e<t?e:t})}},49529(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27432);t.multicast=function(e,t){return function(n){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return n.lift(new o(i,t));var i,a=Object.create(n,r.connectableObservableDescriptor);return a.source=n,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(e);return o.add(t.subscribe(r)),o},e}();t.MulticastOperator=o},24654(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(4942);t.observeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return o(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},45276(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(85295),a=n(80743),s=n(75901);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),n=e.shift(),i.from(n).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},98155(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},27337(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86484),o=n(64629);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},86050(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89233);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw Error("list of properties cannot be empty.");return function(t){var o,i;return r.map((o=e,i=n,function(e){for(var t=e,n=0;n<i;n++){var r=null!=t?t[o[n]]:void 0;if(void 0===r)return;t=r}return t}))(t)}}},96904(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71077),o=n(49529);t.publish=function(e){return e?o.multicast(function(){return new r.Subject},e):o.multicast(new r.Subject)}},82334(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8791),o=n(49529);t.publishBehavior=function(e){return function(t){return o.multicast(new r.BehaviorSubject(e))(t)}}},20232(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38513),o=n(49529);t.publishLast=function(){return function(e){return o.multicast(new r.AsyncSubject)(e)}}},24355(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20328),o=n(49529);t.publishReplay=function(e,t,n,i){n&&"function"!=typeof n&&(i=n);var a="function"==typeof n?n:void 0,s=new r.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},89646(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(57894);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&r.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},71929(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85002),o=n(96696),i=n(90952),a=n(27928);t.reduce=function(e,t){return arguments.length>=2?function(n){return a.pipe(r.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(n)}:function(t){return a.pipe(r.scan(function(t,n,r){return e(t,n,r+1)}),o.takeLast(1))(t)}}},85203(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new s(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()},t}(i.Subscriber)},30068(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(34914);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},58440(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},39933(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},53325(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new i.Subject;try{r=(0,this.notifier)(n)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(r,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},27677(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new s(e),r=t.subscribe(n);return r.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n))),r},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},88360(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(u,n,{subscriber:o,period:n})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}},85002(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.scan=function(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},54332(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.sequenceEqual=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,n=this.comparator;e.length>0&&t.length>0;){var r=e.shift(),o=t.shift(),i=!1;try{i=n?n(r,o):r===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},49184(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(49529),o=n(85203),i=n(71077);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(r.multicast(a)(e))}}},91451(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20328);t.shareReplay=function(e,t,n){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){var t,n,i,a,s,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!n||f?(f=!1,t=(n=new r.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){n.next(e)},error:function(e){f=!0,n.error(e)},complete:function(){h=!0,i=void 0,n.complete()}}),h&&(i=void 0)):t=n.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(i.unsubscribe(),i=void 0,n=void 0)})}))}}},76003(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(62637);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},67124(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},31444(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=Array(n),r}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,o=this._ring,i=o[r];o[r]=e,this.destination.next(i)}},t}(i.Subscriber)},51026(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;r.hasValue=!1;var o=new i.SimpleInnerSubscriber(r);r.add(o),r.innerSubscription=o;var a=i.innerSubscribe(n,o);return a!==o&&(r.add(a),r.innerSubscription=a),r}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},79159(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},89155(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623),o=n(23935);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return o.isScheduler(n)?(e.pop(),function(t){return r.concat(e,t,n)}):function(t){return r.concat(e,t)}}},30162(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17563);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new r.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},21324(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20917),o=n(78522);t.switchAll=function(){return r.switchMap(o.identity)}},20917(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);t.switchMap=function e(t,n){return"function"==typeof n?function(r){return r.pipe(e(function(e,r){return a.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var n=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(n),this.innerSubscription=s.innerSubscribe(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},35428(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20917);t.switchMapTo=function(e,t){return t?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},85624(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519),s=n(34914);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},96696(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519),s=n(34914);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=[],r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=t++%n;e.next(r[i])}e.complete()},t}(i.Subscriber)},41534(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new s(e),r=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.seenValue=!1,n}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},5179(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(e){n.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;t?n.next(e):(this.inclusive&&n.next(e),n.complete())},t}(i.Subscriber)},68022(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(53912),s=n(84864);t.tap=function(e,t,n){return function(r){return r.lift(new l(e,t,n))}};var l=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=r||a.noop,i._tapComplete=o||a.noop,s.isFunction(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||a.noop,i._tapError=n.error||a.noop,i._tapComplete=n.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},15019(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!n.leading,!!n.trailing))}};var a=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7406(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735),s=n(15019);t.throttleTime=function(e,t,n){return void 0===t&&(t=a.async),void 0===n&&(n=s.defaultThrottleConfig),function(r){return r.lift(new l(e,t,n.leading,n.trailing))}};var l=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.duration=n,a.scheduler=r,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},8347(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(62637),a=n(77759);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},61115(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(85002),i=n(26691),a=n(89233);t.timeInterval=function(e){return void 0===e&&(e=r.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,n=e.last;return new s(e.value,t-n)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},82784(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(31027),i=n(35816),a=n(11673);t.timeout=function(e,t){return void 0===t&&(t=r.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},35816(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(66740),s=n(75901);t.timeoutWith=function(e,t,n){return void 0===n&&(n=i.async),function(r){var o=a.isDate(e),i=o?e-n.now():Math.abs(e);return r.lift(new l(i,o,t,n))}};var l=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=n,a.waitFor=r,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},20367(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(89233);t.timestamp=function(e){return void 0===e&&(e=r.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},89133(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);function o(e,t,n){return 0===n?[t]:(e.push(t),e)}t.toArray=function(){return r.reduce(o,[])}},22363(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new l(e),r=t.subscribe(n);return r.closed||n.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(n))),r},e}(),l=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new i.Subject,t.next(n.window),n}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new i.Subject;t.next(n)},t}(a.SimpleOuterSubscriber)},32216(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(71077);t.windowCount=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=n,o.startWindowEvery=r,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-r+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),n.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},93886(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(86735),s=n(77759),l=n(19673),u=n(23935);t.windowTime=function(e){var t=a.async,n=null,r=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(r=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(o){return o.lift(new c(e,n,r,t))}};var c=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=n,a.windowCreationInterval=r,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==r&&r>=0?(a.add(i.schedule(m,n,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,r,{windowTimeSpan:n,windowCreationInterval:r,subscriber:a,scheduler:i}))):a.add(i.schedule(f,n,{subscriber:a,window:s,windowTimeSpan:n})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var o=t[r];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function h(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,o=e.windowCreationInterval,i=n.openWindow(),a={action:this,subscription:null};a.subscription=r.schedule(m,t,{subscriber:n,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}},83903(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(21016),s=n(89152),l=n(87778);t.windowToggle=function(e,t){return function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,n,n)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,o=n.subscription;t.splice(e,1),r.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},27539(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(89152),s=n(87778);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,n=this.window;n&&n.complete();var r=this.window=new i.Subject;this.destination.next(r);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},76788(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89152),a=n(87778);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;return"function"==typeof e[e.length-1]&&(n=e.pop()),t.lift(new s(e,n))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=n[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,n){this.values[n]=t;var r=this.toRespond;if(r.length>0){var o=r.indexOf(n);-1!==o&&r.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},64868(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85356);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.zip.apply(void 0,[t].concat(e)))}}},85517(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85356);t.zipAll=function(e){return function(t){return t.lift(new r.ZipOperator(e))}}},85791(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=new o.Subscription,i=0;return r.add(t.schedule(function(){i===e.length?n.complete():(n.next(e[i++]),n.closed||r.add(this.schedule()))})),r})}},34178(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(78258);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new r.Observable(function(n){var r,a=new o.Subscription;return a.add(function(){r&&"function"==typeof r.return&&r.return()}),a.add(t.schedule(function(){r=e[i.iterator](),a.add(t.schedule(function(){if(!n.closed){try{var e,t,o=r.next();e=o.value,t=o.done}catch(e){n.error(e);return}t?n.complete():(n.next(e),this.schedule())}}))})),a})}},12873(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(46713);t.scheduleObservable=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){var o=e[i.observable]();r.add(o.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}},91039(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016);t.schedulePromise=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}},67670(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12873),o=n(91039),i=n(85791),a=n(34178),s=n(67606),l=n(94215),u=n(90624),c=n(74442);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return r.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},55169(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(21016).Subscription)},82900(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(42839);t.AsapAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(i.Immediate.clearImmediate(n),t.scheduled=void 0)},t}(n(70469).AsyncAction)},3069(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,o=n.length;e=e||n.shift();do if(t=e.execute(e.state,e.delay))break;while(++r<o&&(e=n.shift()));if(this.active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(n(25646).AsyncScheduler)},70469(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(n(55169).Action)},25646(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(94688);t.AsyncScheduler=function(e){function t(n,r){void 0===r&&(r=i.Scheduler.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(n,r,o){return(void 0===r&&(r=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t,n=this.actions;if(this.active)return void n.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this.active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},58538(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return(void 0===n&&(n=0),n>0)?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(70469).AsyncAction)},78831(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(25646).AsyncScheduler)},73766(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82900);t.asapScheduler=new(n(3069)).AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},86735(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70469);t.asyncScheduler=new(n(25646)).AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},63792(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58538);t.queueScheduler=new(n(78831)).QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},78258(e,t){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=n,t.iterator=n(),t.$$iterator=t.iterator},46713(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},58636(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},2519(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},62637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},42839(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=1,r=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return o[t]=!0,r.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},18860(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},31027(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},11806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},21226(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77759);t.canReportError=function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&o instanceof r.Subscriber?o:null}return!0}},59468(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},78522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},80743(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},90624(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},66740(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},84864(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},67606(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(46713);t.isInteropObservable=function(e){return e&&"function"==typeof e[r.observable]}},74442(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78258);t.isIterable=function(e){return e&&"function"==typeof e[r.iterator]}},19673(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743);t.isNumeric=function(e){return!r.isArray(e)&&e-parseFloat(e)+1>=0}},6727(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},94215(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},23935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},53912(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},86484(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}},27928(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78522);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},41727(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(422),o=n(63266),i=n(47429),a=n(13394),s=n(90624),l=n(94215),u=n(6727),c=n(78258),d=n(46713);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return r.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},422(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}},47429(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78258);t.subscribeToIterable=function(e){return function(t){for(var n=e[r.iterator]();;){var o=void 0;try{o=n.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}}},13394(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(46713);t.subscribeToObservable=function(e){return function(t){var n=e[r.observable]();if("function"==typeof n.subscribe)return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},63266(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(59468);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,r.hostReportError),t}}},87778(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1359),o=n(41727),i=n(95092);t.subscribeToResult=function(e,t,n,a,s){if(void 0===s&&(s=new r.InnerSubscriber(e,n,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},67595(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77759),o=n(58636),i=n(74143);t.toSubscriber=function(e,t,n){if(e){if(e instanceof r.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||n?new r.Subscriber(e,t,n):new r.Subscriber(i.empty)}},99549(e,t,n){"use strict";n(18780).audit,n(13441).auditTime,n(11853).buffer,n(77650).bufferCount,n(94360).bufferTime,n(43381).bufferToggle,n(51069).bufferWhen,n(85916).catchError,n(90239).combineAll,n(79397).combineLatest,n(66255).concat,n(60208).concatAll,n(92209).concatMap,n(83232).concatMapTo,n(85476).count,n(59768).debounce,n(92661).debounceTime,n(90952).defaultIfEmpty,n(17436).delay,n(41136).delayWhen,n(56051).dematerialize,n(85343).distinct,n(88179).distinctUntilChanged,n(43670).distinctUntilKeyChanged,n(57366).elementAt,n(61650).endWith,n(92472).every,n(65893).exhaust,n(29219).exhaustMap,n(76527).expand,n(64629).filter,n(4349).finalize,n(32376).find,n(8674).findIndex,n(77089).first,n(36217).groupBy,n(76024).ignoreElements,n(87362).isEmpty,n(6047).last,t.map=n(89233).map,n(27296).mapTo,n(75434).materialize,n(57001).max,n(14779).merge,n(80980).mergeAll;var r=n(60781);r.mergeMap,r.flatMap,n(62988).mergeMapTo,n(86430).mergeScan,n(21547).min,n(49529).multicast,n(24654).observeOn,n(45276).onErrorResumeNext,n(98155).pairwise,n(27337).partition,n(86050).pluck,n(96904).publish,n(82334).publishBehavior,n(20232).publishLast,n(24355).publishReplay,n(89646).race,n(71929).reduce,n(30068).repeat,n(58440).repeatWhen,n(39933).retry,n(53325).retryWhen,n(85203).refCount,n(27677).sample,n(88360).sampleTime,n(85002).scan,n(54332).sequenceEqual,n(49184).share,n(91451).shareReplay,n(76003).single,n(67124).skip,n(31444).skipLast,n(51026).skipUntil,n(79159).skipWhile,n(89155).startWith,n(30162).subscribeOn,n(21324).switchAll,n(20917).switchMap,n(35428).switchMapTo,t.take=n(85624).take,n(96696).takeLast,n(41534).takeUntil,n(5179).takeWhile,n(68022).tap,n(15019).throttle,n(7406).throttleTime,n(8347).throwIfEmpty,n(61115).timeInterval,n(82784).timeout,n(35816).timeoutWith,n(20367).timestamp,n(89133).toArray,n(22363).window,n(32216).windowCount,n(93886).windowTime,n(83903).windowToggle,n(27539).windowWhen,n(76788).withLatestFrom,n(64868).zip,n(85517).zipAll},69571(e,t,n){"use strict";let r,o,i,a,s,l,u,c,d,p,f,h,m;n.r(t),n.d(t,{GenderUnknownIcon:()=>mx,evaluateAsNumber:()=>cY,getImportMapOverrideMap:()=>i$,StockManagementPictogram:()=>OF,ChemistryIcon:()=>mo,BabyIcon:()=>h4,DashboardExtension:()=>yx,openmrsComponentDecorator:()=>fs,tryRegisterExtension:()=>hS,pictogramIds:()=>Of,ActivityIcon:()=>hJ,compile:()=>c0,removeRouteMapOverride:()=>ar,checkStatus:()=>dv,TableBatchActions:()=>hB,getAsyncLifecycle:()=>fu,subscribeOpenmrsEvent:()=>cS,dispatchConnectivityChanged:()=>g,PasswordIcon:()=>mH,Assessment2Pictogram:()=>Og,CloseIcon:()=>mu,setupRouteMapOverrides:()=>aa,getWorkspaceGroupRegistration:()=>pm,registerWorkspace:()=>pd,useFeatureFlag:()=>fU,reset:()=>pn,LabOrderIcon:()=>mR,VisitMode:()=>cj,offlineUuidPrefix:()=>ce,useLocations:()=>f9,getLifecycle:()=>fl,formatDatetime:()=>EC,getVisitsForPatient:()=>cL,subscribeConnectivity:()=>v,formatPartialDate:()=>ED,CustomOverflowMenu:()=>hq,LocationIcon:()=>mN,GroupIcon:()=>mE,canBeginEditSynchronizationItemsOfType:()=>u2,VisitStatus:()=>cT,createUseStore:()=>pV,getCurrentImportMap:()=>iZ,getSessionLocation:()=>ig,usePatient:()=>hi,useRenderableExtensions:()=>hs,getOpenedWindowIndexByWorkspace:()=>pv,checkStatusFor:()=>dw,clearHistory:()=>o6,clearConfigErrors:()=>nP,formatTime:()=>Ek,isDevEnabled:()=>i_,setLeftNav:()=>po,syncOfflinePatientData:()=>cb,closeWorkspaceGroup2:()=>PY,getCurrentRouteMap:()=>i9,ConfigurableLink:()=>pN,sessionStore:()=>is,subscribeSnackbarShown:()=>A,getDynamicOfflineDataEntriesFor:()=>cs,getLoggedInUser:()=>iy,GenderMaleIcon:()=>mw,getExtensionSlotConfigFromStore:()=>tW,evaluateAsNumberAsync:()=>cJ,putDynamicOfflineDataFor:()=>cu,getImportMapDefaultMap:()=>iA,unregisterExtensionRendering:()=>dT,implementerToolsConfigStore:()=>t4,Type:()=>tC,InPatientPictogram:()=>OP,cleanupObsoleteFeatureFlags:()=>df,getAttachmentsUrl:()=>ac,showSnackbar:()=>OX,PatientBannerActionsMenu:()=>Oa,PatientSearchPictogram:()=>OR,DocumentAttachmentIcon:()=>mf,Snackbar:()=>OG,CardiologyPictogram:()=>Ov,ImageMedicalIcon:()=>mP,ActionableNotificationComponent:()=>DN,DiagnosisTags:()=>Dc,iconIds:()=>hY,PatientsPictogram:()=>OM,interpolateUrl:()=>oJ,setupHistory:()=>o2,subscribeToastShown:()=>N,detachAll:()=>d7,convertToLocaleCalendar:()=>Ej,DocumentIcon:()=>mp,configInternalStore:()=>t$,ActionMenuButton2:()=>kn,setupDynamicOfflineDataHandler:()=>ci,makeUrl:()=>ir,oneOf:()=>nN,selectPreferredName:()=>D4,launchWorkspaceGroup:()=>function e(t,n){let r=pm(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=n,l=function(){return Pu}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?O7(r?.name,()=>{e(t,n)}):Pf(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:a}})),Pb(t,o),i?.(),s&&O8(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>cf,MobileCheckIcon:()=>mB,createErrorHandler:()=>$,openmrsObservableFetch:()=>ii,parseDate:()=>Ev,getAttachmentByUuid:()=>al,LeftNavMenu:()=>Dy,getExtensionRegistration:()=>d4,ShoppingCartAddItemIcon:()=>yv,ReferralOrderIcon:()=>mQ,ReportIcon:()=>m0,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>iI,registerExtension:()=>d3,setupOfflineSync:()=>u6,DownloadIcon:()=>mh,useConnectivity:()=>fR,provide:()=>na,getSynchronizationItemsFor:()=>uJ,ShoppingCartArrowDownIcon:()=>m7,featureFlagsStore:()=>dd,promptBeforeClosing:()=>Pn,removeDynamicOfflineDataFor:()=>cd,jsep:()=>cV,GeriatricsPictogram:()=>OD,SearchIcon:()=>m4,reportError:()=>I,slugify:()=>iH,isOmrsDateToday:()=>Ey,getExtensionStore:()=>dR,BloodBankPictogram:()=>Ob,TriagePictogram:()=>OV,Workspace2:()=>P5,refetchCurrentUser:()=>ip,CheckmarkOutlineIcon:()=>mr,registerExtensionSlot:()=>pt,AllergiesIcon:()=>ym,ArrowDownIcon:()=>hX,useOpenmrsInfinite:()=>fJ,getExtensionConfigFromExtensionSlotStore:()=>tq,OpenmrsDatePicker:()=>Dl,getExtensionConfigFromStore:()=>tH,getDynamicOfflineDataEntries:()=>ca,getLocaleDisplayName:()=>Sz,messageOmrsServiceWorker:()=>aC,navigate:()=>oX,launchWorkspace2:()=>PJ,getGroupByWindowName:()=>pb,CustomOverflowMenuItem:()=>hG,isUrl:()=>nM,CaretDownIcon:()=>h5,ArrowLeftIcon:()=>h0,FacilityPictogram:()=>OE,ViewOffIcon:()=>yp,setCurrentOfflineMode:()=>a$,updateInternalExtensionStore:()=>dD,dispatchActionableNotificationShown:()=>C,resetRouteMapOverrides:()=>ao,formatDurationBetween:()=>EL,defaultVisitCustomRepresentation:()=>cR,getBreadcrumbsFor:()=>nW,useOpenmrsPagination:()=>fK,Pagination:()=>DQ,CheckmarkFilledIcon:()=>mn,clearCurrentUser:()=>ih,showModal:()=>Dj,ChevronUpIcon:()=>ml,saveVisit:()=>cI,useAttachments:()=>fO,Pictogram:()=>OH,useExtensionSlot:()=>pq,ChevronDownIcon:()=>mi,OpenmrsDateRangePicker:()=>Du,deleteAttachmentPermanently:()=>ap,getVisitTypes:()=>ck,OverflowMenuHorizontalIcon:()=>mK,EventScheduleIcon:()=>mg,getSessionStore:()=>ic,ActionMenu:()=>PB,ProcedureOrderIcon:()=>mY,preloadImport:()=>iG,registerWorkspaceWindows2:()=>p_,useOnVisible:()=>he,setSessionLocation:()=>ib,userHasAccess:()=>im,ChartAverageIcon:()=>me,getFeatureFlag:()=>dh,UserAvatarIcon:()=>yl,renderExtension:()=>pj,useFhirInfinite:()=>f2,toVisitTypeObject:()=>cP,useSession:()=>hl,EmergencyDepartmentPictogram:()=>OS,Notification:()=>DR,dispatchSnackbarShown:()=>j,getSynchronizationItem:()=>u1,navigateAndLaunchWorkspace:()=>Pe,omrsOfflineCachingStrategyHttpHeaderName:()=>ak,formatDate:()=>EO,workspace2StoreActions:()=>P0,SwitcherIcon:()=>m6,esmStyleGuideSchema:()=>h$,getImportMapDisabledOverrides:()=>iL,useAssignedExtensionIds:()=>fE,CaretRightIcon:()=>h9,evaluateAsType:()=>cQ,PageHeader:()=>DY,TranslateIcon:()=>yo,setUserProperties:()=>iv,MovementIcon:()=>mW,renderInlineNotifications:()=>DV,subscribePrecacheStaticDependencies:()=>S,PaymentsDeskPictogram:()=>ON,usePrimaryIdentifierCode:()=>ha,dispatchPrecacheStaticDependencies:()=>x,getCurrentUser:()=>iu,useLayoutType:()=>f3,XrayPictogram:()=>OU,CaretUpIcon:()=>h8,renderActionableNotifications:()=>DW,OpenmrsAppContext:()=>fv,setupModals:()=>DC,omrsOfflineResponseBodyHttpHeaderName:()=>aO,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(kw(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;kw(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>Q,recordConfigDerivationError:()=>t1,useAbortController:()=>f_,Extension:()=>pA,getFhirServerPaginationHandlers:()=>fG,useConnectedExtensions:()=>fT,registerApp:()=>hD,queueSynchronizationItemFor:()=>uZ,HospitalBedIcon:()=>mO,useExtensionInternalStore:()=>fF,configExtensionStore:()=>tF,getSynchronizationItems:()=>uX,getExtensionSlotsConfigStore:()=>tV,registerExtensionRendering:()=>dj,RenderIfValueIsTruthy:()=>fw,registerFeatureFlag:()=>dp,useFhirFetchAll:()=>f1,restBaseUrl:()=>o8,CalendarHeatMapIcon:()=>h3,getWorkspaceRegistration:()=>ph,isImportMapOverrideDisabled:()=>iF,resetConfigSystem:()=>nk,getFullSynchronizationItems:()=>u0,getExtensionInternalStore:()=>dS,registerGlobalStore:()=>Y,runSynchronization:()=>uH,evaluateAsBoolean:()=>cG,PatientBannerPatientInfo:()=>Or,addRouteMapOverride:()=>an,getDefaultCalendar:()=>ES,SettingsIcon:()=>m3,DrugOrderIcon:()=>mm,isOnline:()=>dg,ProgramsIcon:()=>mJ,useAssignedExtensions:()=>pH,CloseFilledIcon:()=>mc,canAccessStorage:()=>kv,registerDefaultCalendar:()=>Ex,TreeViewAltIcon:()=>ya,OverflowMenuVerticalIcon:()=>mz,clearConfigDerivationError:()=>t2,getConfigStore:()=>tB,registerWorkspaceGroup:()=>pp,InformationSquareIcon:()=>mj,EmptyCard:()=>Df,ChevronLeftIcon:()=>ma,RadiologyIcon:()=>yb,useCandidateExtensions:()=>fD,renderToasts:()=>O3,isDesktop:()=>f6,integrateBreakpoints:()=>hj,RegistrationPictogram:()=>O$,CardHeader:()=>hN,getExtensionRegistrationFrom:()=>d2,InformationIcon:()=>mk,TrashCanIcon:()=>yi,useShallowStableValue:()=>pI,useOpenmrsSWR:()=>ht,Assessment1Pictogram:()=>Oy,finishRegisteringAllApps:()=>hO,importDynamic:()=>iq,useFhirPagination:()=>fq,useVisitContextStore:()=>hy,ArrowUpIcon:()=>h2,showActionableNotification:()=>DK,getDynamicOfflineDataHandlers:()=>co,useForceUpdate:()=>fW,updateWorkspaceWindowState:()=>Pd,useVisit:()=>hg,PatientBannerPatientIdentifiers:()=>D8,WorkspaceNotification:()=>Pj,TransferPictogram:()=>OB,usePagination:()=>hn,Breakpoint:()=>hP,PatientBannerToggleContactDetailsButton:()=>kr,CloseOutlineIcon:()=>md,ObstetricsPictogram:()=>OT,parseDateInput:()=>ER,getConfig:()=>nl,attach:()=>d6,getLocale:()=>SH,ActionMenuButton:()=>PS,isUrlWithTemplateParameters:()=>nR,useEmrConfiguration:()=>f$,useLeftNav:()=>f5,ToolsIcon:()=>yr,ErrorState:()=>Dh,detach:()=>d5,setCurrentVisit:()=>cA,registerOmrsServiceWorker:()=>aE,ConditionsIcon:()=>yg,SaveIcon:()=>m2,activateOfflineCapability:()=>aL,useWorkspaces:()=>Ph,resetWorkspaceStore:()=>Pg,useConfig:()=>fj,validator:()=>tj,CalendarIcon:()=>h6,getHistory:()=>o4,StickyNoteAddIcon:()=>m9,useWorkspace2Store:()=>P1,getPatientName:()=>DX,getVisitStore:()=>cN,getCoreTranslation:()=>oY,registerModuleWithConfigSystem:()=>nn,isOfflineUuid:()=>cn,registerModuleLoad:()=>nr,getBreadcrumbs:()=>nB,extractVariableNames:()=>dl,getOfflineSynchronizationStore:()=>uz,translateFrom:()=>oZ,EditIcon:()=>my,useStoreWithActions:()=>pB,getCandidateExtensions:()=>pe,putDynamicOfflineData:()=>cl,shallowEqual:()=>F,subscribeNotificationShown:()=>R,MaximizeIcon:()=>mI,promptForClosingWorkspaces:()=>PX,WarningIcon:()=>yh,closeAllWorkspaces:()=>Pf,fhirBaseUrl:()=>ie,matchLocale:()=>kb,registerBreadcrumb:()=>nL,usePatientPhoto:()=>Ou,EventsIcon:()=>mb,createGlobalStore:()=>Z,workspaceStore:()=>Pu,getCurrentOfflineMode:()=>aI,subscribeToFeatureFlag:()=>dm,useExtensionStore:()=>fV,closeWorkspace:()=>Pa,createAttachment:()=>ad,useLeftNavStore:()=>f7,TableIcon:()=>yt,Icon:()=>y_,InformationFilledIcon:()=>mC,getCurrentPageMap:()=>iN,LaboratoryPictogram:()=>Ok,temporaryConfigStore:()=>tL,getPromptBeforeClosingFcn:()=>Pr,toDateObjectStrict:()=>Eg,defineConfigSchema:()=>nt,filterBreadcrumbs:()=>nU,invalidateImplementerToolsConfig:()=>tX,PatientBannerContactDetails:()=>ku,getAssignedExtensions:()=>d8,PatientPhoto:()=>Op,MaterialOrderIcon:()=>mA,MicroscopeIcon:()=>mF,scheduleRecomputation:()=>d$,PharmacyPictogram:()=>OA,AttachmentIcon:()=>yy,MoneyIcon:()=>mV,getAttachments:()=>au,getFullSynchronizationItemsFor:()=>uQ,PageHeaderContent:()=>DJ,MedicationIcon:()=>m$,PrinterIcon:()=>mZ,getWorkspaceGroupStore:()=>Pb,PatientListsPictogram:()=>OK,useAppContext:()=>fx,isOpenmrsRoutes:()=>iQ,AppointmentsAltPictogram:()=>Om,GenericOrderTypeIcon:()=>mS,batchExtensionUpdates:()=>dA,useExtensionSlotStore:()=>pK,ViewIcon:()=>yf,formattedName:()=>D2,sessionEndpoint:()=>it,duration:()=>EI,resetImportMapOverrides:()=>iU,TableOfContentsIcon:()=>ye,CaretLeftIcon:()=>h7,getTranslationOverrides:()=>nu,isVersionSatisfied:()=>kS,EmptyCardIllustration:()=>Dp,PenIcon:()=>mG,getWorkspaceStore:()=>Pc,registerOfflinePatientHandler:()=>cg,setupImportMapOverrides:()=>iz,showToast:()=>O6,useDefineAppContext:()=>fb,validators:()=>nA,getGlobalStore:()=>J,useOnClickOutside:()=>f8,getWindowByWorkspaceName:()=>pg,ArrowRightIcon:()=>h1,loadLifeCycles:()=>hw,registerBreadcrumbs:()=>nF,MotherIcon:()=>mU,fetchCurrentPatient:()=>cw,Toast:()=>O0,MessageQueueIcon:()=>mL,TwoFactorAuthenticationIcon:()=>ys,Pharmacy2Pictogram:()=>OI,goBackInHistory:()=>o3,GroupAccessIcon:()=>mD,getExtensionRenderingsStore:()=>dE,setImplementerToolsConfigRecomputer:()=>tQ,getAsyncExtensionLifecycle:()=>fd,setupApiModule:()=>iS,renderLoadingSpinner:()=>kc,WorkspaceContainer:()=>PV,showNotification:()=>DU,queueSynchronizationItem:()=>uY,getModalRegistration:()=>pl,ListCheckedIcon:()=>mM,ResponsiveWrapper:()=>Oq,GynaecologyPictogram:()=>OO,ShoppingCartIcon:()=>m5,getRouteMapNextPageMap:()=>ae,MetadataExportPictogram:()=>Oj,updateVisit:()=>c$,backendDependencies:()=>ix,MaybePictogram:()=>Oz,beginEditSynchronizationItem:()=>u4,createParcelMounter:()=>pk,getStartedVisit:()=>cF,omrsOfflineResponseStatusHttpHeaderName:()=>aP,isOpenmrsAppRoutes:()=>iJ,openmrsFetch:()=>io,HomePictogram:()=>OW,DentistryPictogram:()=>O_,ServiceQueuesPictogram:()=>OL,toLanguageTag:()=>SK,launchWorkspace:()=>O8,setFeatureFlag:()=>dy,useStore:()=>pF,DigitalTrustPictogram:()=>Ox,NumericObservation:()=>DG,attachmentUrl:()=>as,interpolateString:()=>oQ,inRange:()=>nT,useExtensionSlotMeta:()=>fB,AppointmentsPictogram:()=>Oh,renderSnackbars:()=>OQ,getRegisteredWorkspace2Names:()=>P4,toLocationObject:()=>cD,ChartLineIcon:()=>mt,UserHasAccess:()=>hu,evaluateAsBooleanAsync:()=>cZ,changeWorkspaceContext:()=>Ps,createDashboard:()=>yS,getLocations:()=>cO,getOfflineDb:()=>uV,useExtensionContext:()=>fL,canCloseWorkspaceWithoutPrompting:()=>O5,getExtensionsConfigStore:()=>tK,getRouteMapDefaultMap:()=>i8,age:()=>D6,syncAllDynamicOfflineData:()=>cp,isOmrsDateStrict:()=>Em,registerWorkspaceGroups2:()=>pw,usePaginationInfo:()=>hr,evaluateAsync:()=>cq,useOpenmrsFetchAll:()=>fX,removeImportMapOverride:()=>iV,showWorkspacePrompts:()=>Pm,useVisitTypes:()=>hb,ageAsDuration:()=>D3,removeDynamicOfflineData:()=>cc,getExtensionNameFromId:()=>d1,deleteSynchronizationItem:()=>u3,renderParcel:()=>pP,useWorkspace2Context:()=>P2,ResetIcon:()=>m1,RenewIcon:()=>mX,subscribeActionableNotificationShown:()=>M,ErrorCard:()=>Dm,GenderFemaleIcon:()=>mv,enableImportMapOverride:()=>iW,getOfflinePatientDataStore:()=>cy,retry:()=>kE,ComponentContext:()=>pM,ExtensionSlot:()=>pZ,getOmrsServiceWorker:()=>aD,addImportMapOverride:()=>iB,subscribeConnectivityChanged:()=>b,unsetLeftNav:()=>pi,MaybeIcon:()=>yw,useCustomOverflowMenu:()=>hH,PedestrianFamilyIcon:()=>mq,generateOfflineUuid:()=>ct,cancelPrompt:()=>Po,CtScanPictogram:()=>Ow,dispatchNotificationShown:()=>k,leftNavStore:()=>pr,OpenmrsFetchError:()=>ia,UserFollowIcon:()=>yu,launchWorkspaceGroup2:()=>PZ,ChevronRightIcon:()=>ms,UserXrayIcon:()=>yc,GenderOtherIcon:()=>m_,formatDuration:()=>ET,toOmrsIsoString:()=>Eb,Labs2Pictogram:()=>OC,workspace2Store:()=>py,setUserLanguage:()=>id,useBodyScrollLock:()=>fP,getExtensionConfig:()=>tz,SyringeIcon:()=>m8,LocationPicker:()=>Dg,useDebounce:()=>fM,TimeIcon:()=>yn,getExtensionSlotConfig:()=>tU,AddIcon:()=>hQ,getRouteMapOverrideMap:()=>at,processConfig:()=>nc,InventoryManagementIcon:()=>mT,registerWorkspaces2:()=>px,UserIcon:()=>yd,formatPatientName:()=>D1,fireOpenmrsEvent:()=>cx,registerModal:()=>ps,registerTranslationNamespace:()=>no,displayName:()=>D0,evaluate:()=>cH,defineExtensionConfigSchema:()=>ni,renderWorkspaceWindowsAndMenu:()=>ky,getSyncLifecycle:()=>fc,evaluateAsTypeAsync:()=>cX});let y="openmrs:connectivity-changed";function g(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))}function b(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function v(e){return e({online:!window.offlineEnabled||navigator.onLine}),b(e)}let w="openmrs:precache-static-dependencies";function x(e={}){window.dispatchEvent(new CustomEvent(w,{detail:e}))}function S(e){let t=t=>e(t.detail);return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}let E="openmrs:notification-shown",D="openmrs:actionable-notification-shown",O="openmrs:toast-shown",P="openmrs:snack-bar-shown";function k(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(P,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function R(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function M(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(P,t),()=>window.removeEventListener(P,t)}function I(e){let t=L(e);setTimeout(()=>{throw t})}function $(){let e=Error();return t=>{let n=L(t);n.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["3413"],{85602(e){e.exports=function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},44397(e){e.exports=function(e,t,n){var r=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||r.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?n.utc():n();Object.keys(t).forEach(function(e){var n;i["date"===(n=r.$utils().p(e))?"day":n]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.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},i=r.parse;r.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=r.set,s=r.add,l=r.subtract,u=function(e,t,n,r){void 0===r&&(r=1);var o=Object.keys(t),i=this;return o.forEach(function(n){i=e.bind(i)(t[n]*r,n)}),i};r.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},r.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},r.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},57657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.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=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r)))return this;var a=16>=Math.abs(r)?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=i(e).local();return p.call(r,o,t,n)}}}()},35570(e,t,n){!function(t){"use strict";var r=n(19109);function o(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=new Date().toString()),n||(n={}),e.call(this,t,n)}}var i=e.exports={generate:o(function(e,t){return new r(e,t)})};t&&(t.fn.geopattern=o(function(e,n){return this.each(function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var o=i.generate(e,n);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},51812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});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,n,r=e.r,o=e.g,i=e.b,a=Math.max(r/=255,o/=255,i/=255),s=Math.min(r,o,i),l=(a+s)/2;if(a===s)t=n=0;else{var u=a-s;switch(n=l>.5?u/(2-a-s):u/(a+s),a){case r:t=(o-i)/u+6*(o<i);break;case o:t=(i-r)/u+2;break;case i:t=(r-o)/u+4}t/=6}return{h:t,s:n,l:l}},hsl2rgb:function(e){function t(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,o,i=e.h,a=e.s,s=e.l;if(0===a)n=r=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;n=t(u,l,i+1/3),r=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},19109(e,t,n){"use strict";var r=n(64751),o=n(51812),i=n(32742),a=n(83153),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,n){return parseInt(e.substr(t,n||1),16)}function d(e,t,n,r,o){return(parseFloat(e)-t)*(o-r)/(n-t)+r}function p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=r({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,n,r,o){var i=y(r),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+r,n+2*r],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+r,n],scale:[1,1]})}function b(e,t,n,r,o){var i=f(o),a=p(o),s=y(r),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,n,r;this.opts.color?n=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),r=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,r%2==0?e.s=Math.min(1,(100*e.s+r)/100):e.s=Math.max(0,(100*e.s-r)/100),n=o.hsl2rgb(e)),this.color=o.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(n)})},h.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)]()},h.prototype.geoHexagons=function(){var e,t,n,r,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,n=f(o),r={fill:p(o),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,r).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,r).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,r).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,r).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,n,r,o,i,a,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++)n=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:n,"stroke-width":""+u+"px"},r="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(r,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(r,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),r={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(r).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,n,r,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),n=0,s=0;s<6;s++)for(a=0;a<6;a++)r=f(i=c(this.hash,n)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),n++},h.prototype.geoXes=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,r={fill:p(o),opacity:n},this.svg.group(r).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(r).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(r).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:p(r),opacity:t},this.svg.circle(o*a,i*a,a,n),0===o&&this.svg.circle(6*a,i*a,a,n),0===i&&this.svg.circle(o*a,6*a,a,n),0===o&&0===i&&this.svg.circle(6*a,6*a,a,n),e++},h.prototype.geoOctogons=function(){var e,t,n,r,o,i,a,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),n=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,n)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),n+=1},h.prototype.geoSquares=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=f(r=c(this.hash,t)),e=p(r),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=f(r=c(this.hash,t)),e=p(r),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:n,"stroke-width":s+"px"}),n=f(r=c(this.hash,39-t)),e=p(r),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":n}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,n),0===o&&this.svg.circle(6*a,i*a,a-s/2,n),0===i&&this.svg.circle(o*a,6*a,a-s/2,n),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,n),e+=1},h.prototype.geoTriangles=function(){var e,t,n,r,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),r={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},n=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,r).transform({translate:[i*l*.5-l/2,h*a],rotate:[n,l/2,h/2]}),0===i&&this.svg.polyline(m,r).transform({translate:[6*l*.5-l/2,h*a],rotate:[n,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,n,r,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[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,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,t)),r={fill:p(o),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,r).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,r).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,r).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,n,r,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,n),t=f(r=c(this.hash,39-e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,n),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,n,r=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?b(this.svg,t*r*2,n*r*2,r,c(this.hash,e)):g(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):n%2==0?g(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*r*2,n*r*2,r,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,n,r,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,n=f(i=c(this.hash,t+1)),e=p(i),r=i+5,this.svg.rect(0,a,"100%",r,{opacity:n,fill:e}),a+=r,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,n=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:n,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,n,r,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:p(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,n),this.svg.rect(h-o/2,-o/2,o,o,n),this.svg.rect(-o/2,m-o/2,o,o,n),this.svg.rect(h-o/2,m-o/2,o,o,n);break;case 1:this.svg.rect(a/2+s,i/2,o,o,n);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,n),this.svg.rect(h-o/2,m/2-o/2,o,o,n);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,n);break;case 4:this.svg.polyline(l,n).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,n).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,n).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,n).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,n).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,n).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,n).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,n).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,n).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,n).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,n).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,n).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,n).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},32742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,n=0x98badcfe,r=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=n,h=r,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,n=n+f|0,r=r+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var n=0;n<t;n++)c(e.charCodeAt(n));return}var r=e.length;l+=8*r;for(var o=0;o<r;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(n)+d(r)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},83153(e,t,n){"use strict";var r=n(64751),o=n(57338);function i(){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=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,n,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,r({x:e,y:t,width:n,height:i},a)),this},i.prototype.circle=function(e,t,n,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,r({cx:e,cy:t,r:n},i)),this},i.prototype.path=function(e,t){var n=o("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:e},t)),this},i.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach(function(e){n.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,r({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,r({},e)),this}},57338(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("")}},64751(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(!e||"[object Object]"!==n.call(e)||e.nodeType||e.setInterval)return!1;var r,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)}e.exports=function e(){var t,n,o,i,a,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(n in t)o=l[n],l!==(i=t[n])&&(d&&i&&(r(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&r(o)?o:{},l[n]=e(d,s,i)):void 0!==i&&(l[n]=i));return l}},82034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],h="",m=0;!function e(c){if(Array.isArray(c)){for(let t of c)e(t);return}let d="object"==typeof c?c:function(e,t={}){let{encodePath:i=n}=t,l=[...e],u=0;return new a(function t(n){let a=[],c="";function d(){c&&(a.push({type:"text",value:i(c)}),c="")}for(;u<l.length;){let i=l[u++];if(i===n)return d(),a;if("\\"===i){if(u===l.length)throw new s(`Unexpected end after \\ at index ${u}`,e);c+=l[u++];continue}if(":"===i||"*"===i){let t=":"===i?"param":"wildcard",n="";if(r.test(l[u]))do n+=l[u++];while(o.test(l[u]));else if('"'===l[u]){let t=u;for(;u<l.length;){if('"'===l[++u]){u++,t=0;break}"\\"===l[u]&&u++,n+=l[u]}if(t)throw new s(`Unterminated quote at index ${t}`,e)}if(!n)throw new s(`Missing parameter name at index ${u}`,e);d(),a.push({type:t,name:n});continue}if("{"===i){d(),a.push({type:"group",tokens:t("}")});continue}if("}"===i||"("===i||")"===i||"["===i||"]"===i||"+"===i||"?"===i||"!"===i)throw new s(`Unexpected ${i} at index ${u-1}`,e);c+=i}if(n)throw new s(`Unexpected end at index ${u}, expected ${n}`,e);return d(),a}(""),e)}(c,t);!function e(t,n,r,o){for(;n<t.length;){let i=t[n++];if("group"===i.type){let a=r.length;e(i.tokens,0,r,r=>e(t,n,r,o)),r.length=a;continue}r.push(i)}o(r)}(d.tokens,0,[],e=>{if(m>=256)throw new s("Too many path combinations",d.originalPath);m>0&&(h+="|"),h+=function(e,t,n,r){let o="",a="",u="",c=0,d=0,p=0;for(;p<e.length;){let f=e[p++];if("text"===f.type){o+=i(f.value),a+=f.value,2===c&&(u+=f.value),f.value.includes(t)&&(d=0);continue}if("param"===f.type||"wildcard"===f.type){if(c&&!a)throw new s(`Missing text before "${f.name}" ${f.type}`,r);"param"===f.type?(o+=2&d?`(${l(t,a)}+)`:!function(n,r){for(;n<e.length;){let o=e[n++];if(o.type===r)return!0;if("text"===o.type&&o.value.includes(t))break}return!1}(p,"wildcard")?1&d?`(${l(t,a)}+|${i(a)})`:`(${l(t,"")}+)`:`(${l(t,function(t){let n="";for(;t<e.length;){let r=e[t++];if("text"!==r.type)break;n+=r.value}return n}(p))}+)`,d|=c=1):(o+=2&d?`(${l(a,"")}+)`:u?`(${l(u,"")}+|${l(t,"")}+)`:"([^]+)",u="",d|=c=2),n.push(f),a="";continue}throw TypeError(`Unknown token type: ${f.type}`)}return o}(e,u,f,d.originalPath),m++})}(e);let y=`^(?:${h})`;return p&&(y+="(?:"+i(u)+"$)?"),{regexp:new RegExp(y+=c?"$":"(?="+i(u)+"|$)",d?"":"i"),keys:f}};let n=e=>e,r=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u;function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let n=e;t&&(n+=`: ${t}`),super(n+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}function l(e,t){return t.length>e.length?l(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${i(e)}|${i(t)})[^])`:e.length>1?`(?:(?!${i(e)})[^${i(t)}])`:`[^${i(e+t)}]`}},25873(e,t,n){"use strict";var r=n(43144);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},38513(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(21016);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},8791(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(18860);t.BehaviorSubject=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},1359(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(77759).Subscriber)},4942(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(34914),i=n(47986),a=n(11673);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C",t.Notification=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},95092(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21226),o=n(67595),i=n(46713),a=n(27928),s=n(5319);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),r.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))(function(t,r){var o;o=n.subscribe(function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}()},74143(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5319),o=n(59468);t.empty={closed:!0,next:function(e){},error:function(e){if(r.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},89152(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(77759).Subscriber)},20328(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(63792),s=n(21016),l=n(24654),u=n(18860),c=n(43716);t.ReplaySubject=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0);var o=e.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(e-r[i].time<n);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&r.splice(0,i),r},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},94688(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()},71077(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(95092),a=n(77759),s=n(21016),l=n(18860),u=n(43716),c=n(58636),d=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(p);t.AnonymousSubject=f},43716(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(21016).Subscription)},77759(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(84864),a=n(74143),s=n(21016),l=n(58636),u=n(5319),c=n(59468),d=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!n){i.destination=a.empty;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,n,r,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,n,r,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==a.empty&&(u=Object.create(n),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=r,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,n):this.__tryOrUnsub(n),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,n)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},21016(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(6727),i=n(84864),a=n(11806);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,n=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var d=0;d<n.length;++d)n[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(r.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},5319(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):n&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),n=value},get useDeprecatedSynchronousErrorHandling(){return n}}},75901(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(95092),s=n(41727);t.SimpleInnerSubscriber=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var n;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{n=s.subscribeTo(e)(t)}catch(e){t.error(e)}return n}}},27432(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(71077),s=n(95092),l=n(77759),u=n(21016),c=n(85203),d=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new f(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o};var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()},t}(l.Subscriber)},17563(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(95092),a=n(73766),s=n(19673);t.SubscribeOnObservable=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=n,o.scheduler=r,(!s.isNumeric(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=a.asap),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(i.Observable)},92413(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(23935),a=n(80743),s=n(89152),l=n(87778),u=n(67446),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return i.isScheduler(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,r).lift(new d(n))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(l.subscribeToResult(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,o=r[n],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;r[n]=t,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},99623(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(47986),o=n(60208);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(r.of.apply(void 0,e))}},26691(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(85295),i=n(34914);t.defer=function(e){return new r.Observable(function(t){var n;try{n=e()}catch(e){t.error(e);return}return(n?o.from(n):i.empty()).subscribe(t)})}},34914(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){var n;return e?(n=e,new r.Observable(function(e){return n.schedule(function(){return e.complete()})})):t.EMPTY}},85295(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(41727),i=n(67670);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof r.Observable?e:new r.Observable(o.subscribeTo(e))}},67446(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(422),i=n(85791);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new r.Observable(o.subscribeToArray(e))}},33395(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(23935),i=n(80980),a=n(67446);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof l&&(n=e.pop()),null===s&&1===e.length&&e[0]instanceof r.Observable)?e[0]:i.mergeAll(n)(a.fromArray(e,s))}},47986(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23935),o=n(67446),i=n(85791);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return r.isScheduler(n)?(e.pop(),i.scheduleArray(e,n)):o.fromArray(e)}},57894(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(80743),a=n(67446),s=n(89152),l=n(87778);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],o=l.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var o=this.subscriptions[r];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},11673(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new r.Observable(t?function(n){return t.schedule(o,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}},27954(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(86735),i=n(19673),a=n(23935);function s(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}t.timer=function(e,t,n){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(n=t),a.isScheduler(n)||(n=o.async),new r.Observable(function(t){var r=i.isNumeric(e)?e:e-n.now();return n.schedule(s,r,{index:0,period:l,subscriber:t})})}},85356(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(67446),a=n(80743),s=n(77759),l=n(78258),u=n(75901);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),i.fromArray(e,void 0).lift(new c(n))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){var o=e[r];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],r=0;r<t;r++){var o=e[r],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void n.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):n.next(a),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},18780(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},13441(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(18780),i=n(27954);t.auditTime=function(e,t){return void 0===t&&(t=r.async),o.audit(function(){return i.timer(e,t)})}},11853(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(r))),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},77650(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,n=this.startBufferEvery,r=this.buffers,o=this.count;this.count++,o%n==0&&r.push([]);for(var i=r.length;i--;){var a=r[i];a.push(e),a.length===t&&(r.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(i.Subscriber)},94360(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(77759),s=n(23935);t.bufferTime=function(e){var t=arguments.length,n=i.async;s.isScheduler(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,r,o,n))}};var l=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=r,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==r||r<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,n,{subscriber:a,context:s,bufferTimeSpan:n})):(a.add(s.closeAction=i.schedule(f,n,{subscriber:a,context:s})),a.add(i.schedule(p,r,{bufferTimeSpan:n,bufferCreationInterval:r,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(d,n,r))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,o=e.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(f,n,{subscriber:r,context:i})),this.schedule(e,t))}function f(e){var t=e.subscriber,n=e.context;t.closeContext(n)}},43381(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(21016),a=n(87778),s=n(89152);t.bufferToggle=function(e,t){return function(n){return n.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.closingSelector=r,o.contexts=[],o.add(a.subscribeToResult(o,n)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new i.Subscription,r={buffer:[],subscription:n};t.push(r);var o=a.subscribeToResult(this,e,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},t}(s.OuterSubscriber)},51069(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(21016),a=n(75901);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},85916(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.catchError=function(e){return function(t){var n=new a(e),r=t.lift(n);return n.caught=r}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.selector=n,o.caught=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var r=new i.SimpleInnerSubscriber(this);this.add(r);var o=i.innerSubscribe(n,r);o!==r&&this.add(o)}},t}(i.SimpleOuterSubscriber)},90239(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92413);t.combineAll=function(e){return function(t){return t.lift(new r.CombineLatestOperator(e))}}},79397(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(92413),i=n(85295);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&r.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(n))}}},66255(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.concat.apply(void 0,[t].concat(e)))}}},60208(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80980);t.concatAll=function(){return r.mergeAll(1)}},92209(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781);t.concatMap=function(e,t){return r.mergeMap(e,t,1)}},83232(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92209);t.concatMapTo=function(e,t){return r.concatMap(function(){return e},t)}},85476(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},59768(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},92661(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},90952(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},17436(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(66740),s=n(77759),l=n(4942);t.delay=function(e,t){void 0===t&&(t=i.async);var n=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(n,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,o=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new d(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},41136(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(95092),s=n(89152),l=n(87778);t.delayWhen=function(e,t){return t?function(n){return new d(n,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=l.subscribeToResult(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},56051(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},85343(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.distinct=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(e){n.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},88179(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.distinctUntilChanged=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,n=this.keySelector;t=n?n(e):e}catch(e){return this.destination.error(e)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},43670(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88179);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},57366(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2519),o=n(64629),i=n(8347),a=n(90952),s=n(85624);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,n){return n===e}),s.take(1),n?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},61650(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623),o=n(47986);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return r.concat(t,o.of.apply(void 0,e))}}},92472(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.every=function(e,t){return function(n){return n.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},65893(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},29219(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);t.exhaustMap=function e(t,n){return n?function(r){return r.pipe(e(function(e,r){return a.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},76527(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,o=e.index;t.subscribeToProjection(n,r,o)},t.prototype._next=function(e){var n=this.destination;if(n.closed)return void this._complete();var r=this.index++;if(this.active<this.concurrent){n.next(e);try{var o=(0,this.project)(e,r);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:r})):this.subscribeToProjection(o,e,r)}catch(e){n.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},64629(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.filter=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},4349(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(21016);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new a.Subscription(n)),r}return o(t,e),t}(i.Subscriber)},32376(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(n){return n.lift(new a(e,n,!1,t))}};var a=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.predicate=n,a.source=r,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},8674(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32376);t.findIndex=function(e,t){return function(n){return n.lift(new r.FindValueOperator(e,n,!0,t))}}},77089(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(85624),a=n(90952),s=n(8347),l=n(78522);t.first=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):l.identity,i.take(1),n?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},36217(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(21016),s=n(95092),l=n(71077);t.groupBy=function(e,t,n,r){return function(o){return o.lift(new u(e,t,n,r))}};var u=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.keySelector=n,a.elementSelector=r,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var n,r=this.groups;r||(r=this.groups=new Map);var o=r.get(t);if(this.elementSelector)try{n=this.elementSelector(e)}catch(e){this.error(e)}else n=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,r.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(n)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,n,r){var o=e.call(this,n)||this;return o.key=t,o.group=n,o.parent=r,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=r,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new f(n)),t.add(r.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},76024(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},87362(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},6047(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(96696),a=n(8347),s=n(90952),l=n(78522);t.last=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):l.identity,i.takeLast(1),n?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new r.EmptyError}))}}},89233(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.map=function(e,t){return function(n){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},27296(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},75434(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(4942);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},57001(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);t.max=function(e){return r.reduce("function"==typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},14779(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(33395);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.merge.apply(void 0,[t].concat(e)))}}},80980(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781),o=n(78522);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(o.identity,e)}},60781(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);function l(e,t,n){return(void 0===n&&(n=1/0),"function"==typeof t)?function(r){return r.pipe(l(function(n,r){return a.from(e(n,r)).pipe(i.map(function(e,o){return t(n,e,r,o)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new u(e,n))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,n,r){void 0===r&&(r=1/0);var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},62988(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60781);t.mergeMapTo=function(e,t,n){return(void 0===n&&(n=1/0),"function"==typeof t)?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},86430(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,e,t)}catch(e){return n.error(e)}this.active++,this._innerSub(r)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=i.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},21547(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);t.min=function(e){return r.reduce("function"==typeof e?function(t,n){return 0>e(t,n)?t:n}:function(e,t){return e<t?e:t})}},49529(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27432);t.multicast=function(e,t){return function(n){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return n.lift(new o(i,t));var i,a=Object.create(n,r.connectableObservableDescriptor);return a.source=n,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(e);return o.add(t.subscribe(r)),o},e}();t.MulticastOperator=o},24654(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(4942);t.observeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return o(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},45276(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(85295),a=n(80743),s=n(75901);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),n=e.shift(),i.from(n).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=s.innerSubscribe(e,t);r!==t&&n.add(r)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},98155(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},27337(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86484),o=n(64629);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},86050(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89233);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw Error("list of properties cannot be empty.");return function(t){var o,i;return r.map((o=e,i=n,function(e){for(var t=e,n=0;n<i;n++){var r=null!=t?t[o[n]]:void 0;if(void 0===r)return;t=r}return t}))(t)}}},96904(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71077),o=n(49529);t.publish=function(e){return e?o.multicast(function(){return new r.Subject},e):o.multicast(new r.Subject)}},82334(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8791),o=n(49529);t.publishBehavior=function(e){return function(t){return o.multicast(new r.BehaviorSubject(e))(t)}}},20232(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38513),o=n(49529);t.publishLast=function(){return function(e){return o.multicast(new r.AsyncSubject)(e)}}},24355(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20328),o=n(49529);t.publishReplay=function(e,t,n,i){n&&"function"!=typeof n&&(i=n);var a="function"==typeof n?n:void 0,s=new r.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},89646(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743),o=n(57894);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&r.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},71929(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85002),o=n(96696),i=n(90952),a=n(27928);t.reduce=function(e,t){return arguments.length>=2?function(n){return a.pipe(r.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(n)}:function(t){return a.pipe(r.scan(function(t,n,r){return e(t,n,r+1)}),o.takeLast(1))(t)}}},85203(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new s(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()},t}(i.Subscriber)},30068(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(34914);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},58440(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},39933(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},53325(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new i.Subject;try{r=(0,this.notifier)(n)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(r,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},27677(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new s(e),r=t.subscribe(n);return r.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n))),r},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},88360(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(u,n,{subscriber:o,period:n})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}},85002(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.scan=function(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new a(e,t,n))}};var a=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},54332(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.sequenceEqual=function(e,t){return function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,n=this.comparator;e.length>0&&t.length>0;){var r=e.shift(),o=t.shift(),i=!1;try{i=n?n(r,o):r===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},49184(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(49529),o=n(85203),i=n(71077);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(r.multicast(a)(e))}}},91451(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20328);t.shareReplay=function(e,t,n){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){var t,n,i,a,s,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!n||f?(f=!1,t=(n=new r.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){n.next(e)},error:function(e){f=!0,n.error(e)},complete:function(){h=!0,i=void 0,n.complete()}}),h&&(i=void 0)):t=n.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(i.unsubscribe(),i=void 0,n=void 0)})}))}}},76003(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(62637);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},67124(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},31444(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=Array(n),r}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,o=this._ring,i=o[r];o[r]=e,this.destination.next(i)}},t}(i.Subscriber)},51026(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;r.hasValue=!1;var o=new i.SimpleInnerSubscriber(r);r.add(o),r.innerSubscription=o;var a=i.innerSubscribe(n,o);return a!==o&&(r.add(a),r.innerSubscription=a),r}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},79159(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},89155(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99623),o=n(23935);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return o.isScheduler(n)?(e.pop(),function(t){return r.concat(e,t,n)}):function(t){return r.concat(e,t)}}},30162(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17563);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new r.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},21324(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20917),o=n(78522);t.switchAll=function(){return r.switchMap(o.identity)}},20917(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89233),a=n(85295),s=n(75901);t.switchMap=function e(t,n){return"function"==typeof n?function(r){return r.pipe(e(function(e,r){return a.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var n=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(n),this.innerSubscription=s.innerSubscribe(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},35428(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20917);t.switchMapTo=function(e,t){return t?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},85624(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519),s=n(34914);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},96696(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(2519),s=n(34914);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=[],r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=t++%n;e.next(r[i])}e.complete()},t}(i.Subscriber)},41534(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new s(e),r=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n.seenValue=!1,n}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},5179(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(e){n.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;t?n.next(e):(this.inclusive&&n.next(e),n.complete())},t}(i.Subscriber)},68022(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(53912),s=n(84864);t.tap=function(e,t,n){return function(r){return r.lift(new l(e,t,n))}};var l=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=r||a.noop,i._tapComplete=o||a.noop,s.isFunction(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||a.noop,i._tapError=n.error||a.noop,i._tapComplete=n.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},15019(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(75901);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!n.leading,!!n.trailing))}};var a=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7406(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(86735),s=n(15019);t.throttleTime=function(e,t,n){return void 0===t&&(t=a.async),void 0===n&&(n=s.defaultThrottleConfig),function(r){return r.lift(new l(e,t,n.leading,n.trailing))}};var l=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.duration=n,a.scheduler=r,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},8347(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(62637),a=n(77759);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},61115(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(85002),i=n(26691),a=n(89233);t.timeInterval=function(e){return void 0===e&&(e=r.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,n=e.last;return new s(e.value,t-n)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},82784(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(31027),i=n(35816),a=n(11673);t.timeout=function(e,t){return void 0===t&&(t=r.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},35816(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(86735),a=n(66740),s=n(75901);t.timeoutWith=function(e,t,n){return void 0===n&&(n=i.async),function(r){var o=a.isDate(e),i=o?e-n.now():Math.abs(e);return r.lift(new l(i,o,t,n))}};var l=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=n,a.waitFor=r,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},20367(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86735),o=n(89233);t.timestamp=function(e){return void 0===e&&(e=r.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},89133(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71929);function o(e,t,n){return 0===n?[t]:(e.push(t),e)}t.toArray=function(){return r.reduce(o,[])}},22363(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(75901);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new l(e),r=t.subscribe(n);return r.closed||n.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(n))),r},e}(),l=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new i.Subject,t.next(n.window),n}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new i.Subject;t.next(n)},t}(a.SimpleOuterSubscriber)},32216(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(77759),a=n(71077);t.windowCount=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=n,o.startWindowEvery=r,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-r+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),n.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},93886(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(86735),s=n(77759),l=n(19673),u=n(23935);t.windowTime=function(e){var t=a.async,n=null,r=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(r=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(o){return o.lift(new c(e,n,r,t))}};var c=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,n,r,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=n,a.windowCreationInterval=r,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==r&&r>=0?(a.add(i.schedule(m,n,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,r,{windowTimeSpan:n,windowCreationInterval:r,subscriber:a,scheduler:i}))):a.add(i.schedule(f,n,{subscriber:a,window:s,windowTimeSpan:n})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var o=t[r];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function h(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,o=e.windowCreationInterval,i=n.openWindow(),a={action:this,subscription:null};a.subscription=r.schedule(m,t,{subscriber:n,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}},83903(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(21016),s=n(89152),l=n(87778);t.windowToggle=function(e,t){return function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,n,n)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,o=n.subscription;t.splice(e,1),r.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},27539(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71077),a=n(89152),s=n(87778);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,n=this.window;n&&n.complete();var r=this.window=new i.Subject;this.destination.next(r);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},76788(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(89152),a=n(87778);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;return"function"==typeof e[e.length-1]&&(n=e.pop()),t.lift(new s(e,n))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=n[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,n){this.values[n]=t;var r=this.toRespond;if(r.length>0){var o=r.indexOf(n);-1!==o&&r.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},64868(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85356);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.zip.apply(void 0,[t].concat(e)))}}},85517(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85356);t.zipAll=function(e){return function(t){return t.lift(new r.ZipOperator(e))}}},85791(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=new o.Subscription,i=0;return r.add(t.schedule(function(){i===e.length?n.complete():(n.next(e[i++]),n.closed||r.add(this.schedule()))})),r})}},34178(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(78258);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new r.Observable(function(n){var r,a=new o.Subscription;return a.add(function(){r&&"function"==typeof r.return&&r.return()}),a.add(t.schedule(function(){r=e[i.iterator](),a.add(t.schedule(function(){if(!n.closed){try{var e,t,o=r.next();e=o.value,t=o.done}catch(e){n.error(e);return}t?n.complete():(n.next(e),this.schedule())}}))})),a})}},12873(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(46713);t.scheduleObservable=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){var o=e[i.observable]();r.add(o.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}},91039(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95092),o=n(21016);t.schedulePromise=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}},67670(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12873),o=n(91039),i=n(85791),a=n(34178),s=n(67606),l=n(94215),u=n(90624),c=n(74442);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return r.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},55169(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(21016).Subscription)},82900(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(42839);t.AsapAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(i.Immediate.clearImmediate(n),t.scheduled=void 0)},t}(n(70469).AsyncAction)},3069(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,o=n.length;e=e||n.shift();do if(t=e.execute(e.state,e.delay))break;while(++r<o&&(e=n.shift()));if(this.active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(n(25646).AsyncScheduler)},70469(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(n(55169).Action)},25646(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(94688);t.AsyncScheduler=function(e){function t(n,r){void 0===r&&(r=i.Scheduler.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(n,r,o){return(void 0===r&&(r=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t,n=this.actions;if(this.active)return void n.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this.active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},58538(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return(void 0===n&&(n=0),n>0)?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(70469).AsyncAction)},78831(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(25646).AsyncScheduler)},73766(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82900);t.asapScheduler=new(n(3069)).AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},86735(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70469);t.asyncScheduler=new(n(25646)).AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},63792(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58538);t.queueScheduler=new(n(78831)).QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},78258(e,t){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=n,t.iterator=n(),t.$$iterator=t.iterator},46713(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},58636(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},2519(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},62637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},42839(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=1,r=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return o[t]=!0,r.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},18860(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},31027(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},11806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},21226(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77759);t.canReportError=function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&o instanceof r.Subscriber?o:null}return!0}},59468(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},78522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},80743(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},90624(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},66740(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},84864(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},67606(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(46713);t.isInteropObservable=function(e){return e&&"function"==typeof e[r.observable]}},74442(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78258);t.isIterable=function(e){return e&&"function"==typeof e[r.iterator]}},19673(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80743);t.isNumeric=function(e){return!r.isArray(e)&&e-parseFloat(e)+1>=0}},6727(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},94215(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},23935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},53912(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},86484(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}},27928(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78522);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},41727(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(422),o=n(63266),i=n(47429),a=n(13394),s=n(90624),l=n(94215),u=n(6727),c=n(78258),d=n(46713);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return r.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},422(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}},47429(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78258);t.subscribeToIterable=function(e){return function(t){for(var n=e[r.iterator]();;){var o=void 0;try{o=n.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}}},13394(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(46713);t.subscribeToObservable=function(e){return function(t){var n=e[r.observable]();if("function"==typeof n.subscribe)return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},63266(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(59468);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,r.hostReportError),t}}},87778(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1359),o=n(41727),i=n(95092);t.subscribeToResult=function(e,t,n,a,s){if(void 0===s&&(s=new r.InnerSubscriber(e,n,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},67595(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77759),o=n(58636),i=n(74143);t.toSubscriber=function(e,t,n){if(e){if(e instanceof r.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||n?new r.Subscriber(e,t,n):new r.Subscriber(i.empty)}},99549(e,t,n){"use strict";n(18780).audit,n(13441).auditTime,n(11853).buffer,n(77650).bufferCount,n(94360).bufferTime,n(43381).bufferToggle,n(51069).bufferWhen,n(85916).catchError,n(90239).combineAll,n(79397).combineLatest,n(66255).concat,n(60208).concatAll,n(92209).concatMap,n(83232).concatMapTo,n(85476).count,n(59768).debounce,n(92661).debounceTime,n(90952).defaultIfEmpty,n(17436).delay,n(41136).delayWhen,n(56051).dematerialize,n(85343).distinct,n(88179).distinctUntilChanged,n(43670).distinctUntilKeyChanged,n(57366).elementAt,n(61650).endWith,n(92472).every,n(65893).exhaust,n(29219).exhaustMap,n(76527).expand,n(64629).filter,n(4349).finalize,n(32376).find,n(8674).findIndex,n(77089).first,n(36217).groupBy,n(76024).ignoreElements,n(87362).isEmpty,n(6047).last,t.map=n(89233).map,n(27296).mapTo,n(75434).materialize,n(57001).max,n(14779).merge,n(80980).mergeAll;var r=n(60781);r.mergeMap,r.flatMap,n(62988).mergeMapTo,n(86430).mergeScan,n(21547).min,n(49529).multicast,n(24654).observeOn,n(45276).onErrorResumeNext,n(98155).pairwise,n(27337).partition,n(86050).pluck,n(96904).publish,n(82334).publishBehavior,n(20232).publishLast,n(24355).publishReplay,n(89646).race,n(71929).reduce,n(30068).repeat,n(58440).repeatWhen,n(39933).retry,n(53325).retryWhen,n(85203).refCount,n(27677).sample,n(88360).sampleTime,n(85002).scan,n(54332).sequenceEqual,n(49184).share,n(91451).shareReplay,n(76003).single,n(67124).skip,n(31444).skipLast,n(51026).skipUntil,n(79159).skipWhile,n(89155).startWith,n(30162).subscribeOn,n(21324).switchAll,n(20917).switchMap,n(35428).switchMapTo,t.take=n(85624).take,n(96696).takeLast,n(41534).takeUntil,n(5179).takeWhile,n(68022).tap,n(15019).throttle,n(7406).throttleTime,n(8347).throwIfEmpty,n(61115).timeInterval,n(82784).timeout,n(35816).timeoutWith,n(20367).timestamp,n(89133).toArray,n(22363).window,n(32216).windowCount,n(93886).windowTime,n(83903).windowToggle,n(27539).windowWhen,n(76788).withLatestFrom,n(64868).zip,n(85517).zipAll},91700(e,t,n){"use strict";let r,o,i,a,s,l,u,c,d,p,f,h,m;n.r(t),n.d(t,{GenderUnknownIcon:()=>mv,evaluateAsNumber:()=>cG,getImportMapOverrideMap:()=>iA,StockManagementPictogram:()=>OM,ChemistryIcon:()=>mt,BabyIcon:()=>h0,DashboardExtension:()=>yv,openmrsComponentDecorator:()=>fo,tryRegisterExtension:()=>hw,pictogramIds:()=>Ou,ActivityIcon:()=>hq,compile:()=>cJ,removeRouteMapOverride:()=>ae,checkStatus:()=>dy,TableBatchActions:()=>h$,getAsyncLifecycle:()=>fa,subscribeOpenmrsEvent:()=>cw,dispatchConnectivityChanged:()=>g,PasswordIcon:()=>mW,Assessment2Pictogram:()=>Of,CloseIcon:()=>ma,setupRouteMapOverrides:()=>ar,getWorkspaceGroupRegistration:()=>pp,registerWorkspace:()=>pl,useFeatureFlag:()=>fF,reset:()=>d8,LabOrderIcon:()=>mC,VisitMode:()=>cP,offlineUuidPrefix:()=>u7,useLocations:()=>f6,getLifecycle:()=>fi,formatDatetime:()=>EO,getVisitsForPatient:()=>cM,subscribeConnectivity:()=>v,formatPartialDate:()=>Ex,CustomOverflowMenu:()=>hK,LocationIcon:()=>mT,GroupIcon:()=>m_,canBeginEditSynchronizationItemsOfType:()=>uX,VisitStatus:()=>ck,createUseStore:()=>pL,getCurrentImportMap:()=>iz,getSessionLocation:()=>ih,usePatient:()=>hn,useRenderableExtensions:()=>ho,getOpenedWindowIndexByWorkspace:()=>py,checkStatusFor:()=>dg,clearHistory:()=>o2,clearConfigErrors:()=>nE,formatTime:()=>ED,isDevEnabled:()=>ib,setLeftNav:()=>pt,syncOfflinePatientData:()=>cm,closeWorkspaceGroup2:()=>PG,getCurrentRouteMap:()=>i6,ConfigurableLink:()=>pT,sessionStore:()=>io,subscribeSnackbarShown:()=>M,getDynamicOfflineDataEntriesFor:()=>co,getLoggedInUser:()=>ip,GenderMaleIcon:()=>mg,getExtensionSlotConfigFromStore:()=>tB,evaluateAsNumberAsync:()=>cq,putDynamicOfflineDataFor:()=>ca,getImportMapDefaultMap:()=>iR,unregisterExtensionRendering:()=>dk,implementerToolsConfigStore:()=>t0,Type:()=>tO,InPatientPictogram:()=>OS,cleanupObsoleteFeatureFlags:()=>dc,getAttachmentsUrl:()=>as,showSnackbar:()=>OZ,PatientBannerActionsMenu:()=>On,PatientSearchPictogram:()=>Ok,DocumentAttachmentIcon:()=>mc,Snackbar:()=>OK,CardiologyPictogram:()=>Om,ImageMedicalIcon:()=>mE,ActionableNotificationComponent:()=>DT,DiagnosisTags:()=>Ds,iconIds:()=>hG,PatientsPictogram:()=>OC,interpolateUrl:()=>oq,setupHistory:()=>oX,subscribeToastShown:()=>A,detachAll:()=>d3,convertToLocaleCalendar:()=>EP,DocumentIcon:()=>mu,configInternalStore:()=>tA,ActionMenuButton2:()=>P8,setupDynamicOfflineDataHandler:()=>cn,makeUrl:()=>o8,oneOf:()=>nT,selectPreferredName:()=>D0,launchWorkspaceGroup:()=>function e(t,n){let r=pp(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=n,l=function(){return Pi}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?O4(r?.name,()=>{e(t,n)}):Pu(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:a}})),Ph(t,o),i?.(),s&&O6(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>cc,MobileCheckIcon:()=>m$,createErrorHandler:()=>$,openmrsObservableFetch:()=>it,parseDate:()=>Ey,getAttachmentByUuid:()=>ai,LeftNavMenu:()=>Df,getExtensionRegistration:()=>d0,ShoppingCartAddItemIcon:()=>yy,ReferralOrderIcon:()=>mZ,ReportIcon:()=>mJ,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>iN,registerExtension:()=>d1,setupOfflineSync:()=>u2,DownloadIcon:()=>md,useConnectivity:()=>fC,provide:()=>nr,getSynchronizationItemsFor:()=>uq,ShoppingCartArrowDownIcon:()=>m3,featureFlagsStore:()=>dl,promptBeforeClosing:()=>O9,removeDynamicOfflineDataFor:()=>cl,jsep:()=>cL,GeriatricsPictogram:()=>O_,SearchIcon:()=>m0,reportError:()=>I,slugify:()=>iW,isOmrsDateToday:()=>Ef,getExtensionStore:()=>dC,BloodBankPictogram:()=>Oh,TriagePictogram:()=>O$,Workspace2:()=>P4,refetchCurrentUser:()=>iu,CheckmarkOutlineIcon:()=>me,registerExtensionSlot:()=>d9,AllergiesIcon:()=>yp,ArrowDownIcon:()=>hY,useOpenmrsInfinite:()=>fq,getExtensionConfigFromExtensionSlotStore:()=>tK,OpenmrsDatePicker:()=>Di,getExtensionConfigFromStore:()=>tW,getDynamicOfflineDataEntries:()=>cr,getLocaleDisplayName:()=>SU,messageOmrsServiceWorker:()=>aO,navigate:()=>oY,launchWorkspace2:()=>Pq,getGroupByWindowName:()=>pm,CustomOverflowMenuItem:()=>hH,isUrl:()=>nj,CaretDownIcon:()=>h4,ArrowLeftIcon:()=>hJ,FacilityPictogram:()=>Ow,ViewOffIcon:()=>yu,setCurrentOfflineMode:()=>aA,updateInternalExtensionStore:()=>dx,dispatchActionableNotificationShown:()=>C,resetRouteMapOverrides:()=>at,formatDurationBetween:()=>EM,defaultVisitCustomRepresentation:()=>cC,getBreadcrumbsFor:()=>nB,useOpenmrsPagination:()=>fV,Pagination:()=>DZ,CheckmarkFilledIcon:()=>h8,clearCurrentUser:()=>ic,showModal:()=>DP,ChevronUpIcon:()=>mi,saveVisit:()=>cN,useAttachments:()=>fS,Pictogram:()=>OU,useExtensionSlot:()=>pK,ChevronDownIcon:()=>mn,OpenmrsDateRangePicker:()=>Da,deleteAttachmentPermanently:()=>au,getVisitTypes:()=>cD,OverflowMenuHorizontalIcon:()=>mV,EventScheduleIcon:()=>mh,getSessionStore:()=>is,ActionMenu:()=>P$,ProcedureOrderIcon:()=>mG,preloadImport:()=>iH,registerWorkspaceWindows2:()=>pb,useOnVisible:()=>f7,setSessionLocation:()=>im,userHasAccess:()=>id,ChartAverageIcon:()=>h7,getFeatureFlag:()=>dd,UserAvatarIcon:()=>yi,renderExtension:()=>pP,useFhirInfinite:()=>fX,toVisitTypeObject:()=>cE,useSession:()=>hi,EmergencyDepartmentPictogram:()=>Ov,Notification:()=>DC,dispatchSnackbarShown:()=>j,getSynchronizationItem:()=>uQ,navigateAndLaunchWorkspace:()=>O5,omrsOfflineCachingStrategyHttpHeaderName:()=>aD,formatDate:()=>ES,workspace2StoreActions:()=>PJ,SwitcherIcon:()=>m2,esmStyleGuideSchema:()=>hA,getImportMapDisabledOverrides:()=>iM,useAssignedExtensionIds:()=>f_,CaretRightIcon:()=>h6,evaluateAsType:()=>cZ,PageHeader:()=>DG,TranslateIcon:()=>yt,setUserProperties:()=>iy,MovementIcon:()=>mB,renderInlineNotifications:()=>DL,subscribePrecacheStaticDependencies:()=>S,PaymentsDeskPictogram:()=>Oj,usePrimaryIdentifierCode:()=>hr,dispatchPrecacheStaticDependencies:()=>x,getCurrentUser:()=>ia,useLayoutType:()=>f1,XrayPictogram:()=>OL,CaretUpIcon:()=>h5,renderActionableNotifications:()=>DB,OpenmrsAppContext:()=>fy,setupModals:()=>DO,omrsOfflineResponseBodyHttpHeaderName:()=>aS,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(kg(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;kg(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>Q,recordConfigDerivationError:()=>tQ,useAbortController:()=>fb,Extension:()=>pR,getFhirServerPaginationHandlers:()=>fH,useConnectedExtensions:()=>fk,registerApp:()=>hx,queueSynchronizationItemFor:()=>uz,HospitalBedIcon:()=>mS,useExtensionInternalStore:()=>fI,configExtensionStore:()=>tI,getSynchronizationItems:()=>uY,getExtensionSlotsConfigStore:()=>tL,registerExtensionRendering:()=>dP,RenderIfValueIsTruthy:()=>fg,registerFeatureFlag:()=>du,useFhirFetchAll:()=>fQ,restBaseUrl:()=>o5,CalendarHeatMapIcon:()=>h1,getWorkspaceRegistration:()=>pd,isImportMapOverrideDisabled:()=>iI,resetConfigSystem:()=>nD,getFullSynchronizationItems:()=>uJ,getExtensionInternalStore:()=>dw,registerGlobalStore:()=>Y,runSynchronization:()=>uW,evaluateAsBoolean:()=>cH,PatientBannerPatientInfo:()=>Oe,addRouteMapOverride:()=>i8,getDefaultCalendar:()=>Ew,SettingsIcon:()=>m1,DrugOrderIcon:()=>mp,isOnline:()=>dh,ProgramsIcon:()=>mq,useAssignedExtensions:()=>pW,CloseFilledIcon:()=>ms,canAccessStorage:()=>ky,registerDefaultCalendar:()=>Ev,TreeViewAltIcon:()=>yr,OverflowMenuVerticalIcon:()=>mU,clearConfigDerivationError:()=>tX,getConfigStore:()=>t$,registerWorkspaceGroup:()=>pu,InformationSquareIcon:()=>mP,EmptyCard:()=>Dc,ChevronLeftIcon:()=>mr,RadiologyIcon:()=>ym,useCandidateExtensions:()=>fx,renderToasts:()=>O0,isDesktop:()=>f2,integrateBreakpoints:()=>hP,RegistrationPictogram:()=>ON,CardHeader:()=>hT,getExtensionRegistrationFrom:()=>dX,InformationIcon:()=>mD,TrashCanIcon:()=>yn,useShallowStableValue:()=>pN,useOpenmrsSWR:()=>f9,Assessment1Pictogram:()=>Op,finishRegisteringAllApps:()=>hS,importDynamic:()=>iK,useFhirPagination:()=>fK,useVisitContextStore:()=>hf,ArrowUpIcon:()=>hX,showActionableNotification:()=>DV,getDynamicOfflineDataHandlers:()=>ct,useForceUpdate:()=>fB,updateWorkspaceWindowState:()=>Ps,useVisit:()=>hh,PatientBannerPatientIdentifiers:()=>D5,WorkspaceNotification:()=>PP,TransferPictogram:()=>OI,usePagination:()=>f8,Breakpoint:()=>hE,PatientBannerToggleContactDetailsButton:()=>ke,CloseOutlineIcon:()=>ml,ObstetricsPictogram:()=>OP,parseDateInput:()=>EC,getConfig:()=>ni,attach:()=>d2,getLocale:()=>SW,ActionMenuButton:()=>Pv,isUrlWithTemplateParameters:()=>nC,useEmrConfiguration:()=>fA,useLeftNav:()=>f4,ToolsIcon:()=>ye,ErrorState:()=>Dd,detach:()=>d4,setCurrentVisit:()=>cR,registerOmrsServiceWorker:()=>a_,ConditionsIcon:()=>yh,SaveIcon:()=>mX,activateOfflineCapability:()=>aM,useWorkspaces:()=>Pc,resetWorkspaceStore:()=>Pf,useConfig:()=>fP,validator:()=>tP,CalendarIcon:()=>h2,getHistory:()=>o0,StickyNoteAddIcon:()=>m6,useWorkspace2Store:()=>PQ,getPatientName:()=>DY,getVisitStore:()=>cT,getCoreTranslation:()=>oG,registerModuleWithConfigSystem:()=>t8,isOfflineUuid:()=>u8,registerModuleLoad:()=>ne,getBreadcrumbs:()=>n$,extractVariableNames:()=>di,getOfflineSynchronizationStore:()=>uU,translateFrom:()=>oz,EditIcon:()=>mf,useStoreWithActions:()=>p$,getCandidateExtensions:()=>d7,putDynamicOfflineData:()=>ci,shallowEqual:()=>F,subscribeNotificationShown:()=>R,MaximizeIcon:()=>mN,promptForClosingWorkspaces:()=>PY,WarningIcon:()=>yd,closeAllWorkspaces:()=>Pu,fhirBaseUrl:()=>o7,matchLocale:()=>km,registerBreadcrumb:()=>nM,usePatientPhoto:()=>Oi,EventsIcon:()=>mm,createGlobalStore:()=>Z,workspaceStore:()=>Pi,getCurrentOfflineMode:()=>aN,subscribeToFeatureFlag:()=>dp,useExtensionStore:()=>fL,closeWorkspace:()=>Pn,createAttachment:()=>al,useLeftNavStore:()=>f3,TableIcon:()=>m9,Icon:()=>yb,InformationFilledIcon:()=>mO,getCurrentPageMap:()=>iT,LaboratoryPictogram:()=>OE,temporaryConfigStore:()=>tM,getPromptBeforeClosingFcn:()=>O8,toDateObjectStrict:()=>Eh,defineConfigSchema:()=>t9,filterBreadcrumbs:()=>nF,invalidateImplementerToolsConfig:()=>tY,PatientBannerContactDetails:()=>ka,getAssignedExtensions:()=>d5,PatientPhoto:()=>Ol,MaterialOrderIcon:()=>mR,MicroscopeIcon:()=>mI,scheduleRecomputation:()=>dA,PharmacyPictogram:()=>OT,AttachmentIcon:()=>yf,MoneyIcon:()=>mL,getAttachments:()=>aa,getFullSynchronizationItemsFor:()=>uZ,PageHeaderContent:()=>Dq,MedicationIcon:()=>mA,PrinterIcon:()=>mz,getWorkspaceGroupStore:()=>Ph,PatientListsPictogram:()=>OB,useAppContext:()=>fv,isOpenmrsRoutes:()=>iZ,AppointmentsAltPictogram:()=>Od,GenericOrderTypeIcon:()=>mw,batchExtensionUpdates:()=>dR,useExtensionSlotStore:()=>pV,ViewIcon:()=>yc,formattedName:()=>DX,sessionEndpoint:()=>o9,duration:()=>EN,resetImportMapOverrides:()=>iF,TableOfContentsIcon:()=>m7,CaretLeftIcon:()=>h3,getTranslationOverrides:()=>na,isVersionSatisfied:()=>kw,EmptyCardIllustration:()=>Du,PenIcon:()=>mH,getWorkspaceStore:()=>Pa,registerOfflinePatientHandler:()=>ch,setupImportMapOverrides:()=>iU,showToast:()=>O1,useDefineAppContext:()=>fm,validators:()=>nR,getGlobalStore:()=>J,useOnClickOutside:()=>f5,getWindowByWorkspaceName:()=>ph,ArrowRightIcon:()=>hQ,loadLifeCycles:()=>hg,registerBreadcrumbs:()=>nI,MotherIcon:()=>mF,fetchCurrentPatient:()=>cg,Toast:()=>OY,MessageQueueIcon:()=>mM,TwoFactorAuthenticationIcon:()=>yo,Pharmacy2Pictogram:()=>OR,goBackInHistory:()=>o1,GroupAccessIcon:()=>mx,getExtensionRenderingsStore:()=>d_,setImplementerToolsConfigRecomputer:()=>tZ,getAsyncExtensionLifecycle:()=>fl,setupApiModule:()=>iw,renderLoadingSpinner:()=>ks,WorkspaceContainer:()=>PL,showNotification:()=>DF,queueSynchronizationItem:()=>uG,getModalRegistration:()=>pi,ListCheckedIcon:()=>mj,ResponsiveWrapper:()=>OW,GynaecologyPictogram:()=>Ox,ShoppingCartIcon:()=>m4,getRouteMapNextPageMap:()=>i7,MetadataExportPictogram:()=>OO,updateVisit:()=>cA,backendDependencies:()=>iv,MaybePictogram:()=>OV,beginEditSynchronizationItem:()=>u0,createParcelMounter:()=>pD,getStartedVisit:()=>cI,omrsOfflineResponseStatusHttpHeaderName:()=>aE,isOpenmrsAppRoutes:()=>iq,openmrsFetch:()=>ie,HomePictogram:()=>OF,DentistryPictogram:()=>Og,ServiceQueuesPictogram:()=>OA,toLanguageTag:()=>SV,launchWorkspace:()=>O6,setFeatureFlag:()=>df,useStore:()=>pI,DigitalTrustPictogram:()=>Ob,NumericObservation:()=>DH,attachmentUrl:()=>ao,interpolateString:()=>oZ,inRange:()=>nk,useExtensionSlotMeta:()=>f$,AppointmentsPictogram:()=>Oc,renderSnackbars:()=>Oq,getRegisteredWorkspace2Names:()=>P0,toLocationObject:()=>cx,ChartLineIcon:()=>h9,UserHasAccess:()=>ha,evaluateAsBooleanAsync:()=>cz,changeWorkspaceContext:()=>Pr,createDashboard:()=>yw,getLocations:()=>cS,getOfflineDb:()=>uL,useExtensionContext:()=>fM,canCloseWorkspaceWithoutPrompting:()=>O2,getExtensionsConfigStore:()=>tV,getRouteMapDefaultMap:()=>i5,age:()=>D2,syncAllDynamicOfflineData:()=>cu,isOmrsDateStrict:()=>Ep,registerWorkspaceGroups2:()=>pg,usePaginationInfo:()=>he,evaluateAsync:()=>cK,useOpenmrsFetchAll:()=>fY,removeImportMapOverride:()=>iL,showWorkspacePrompts:()=>Pd,useVisitTypes:()=>hm,ageAsDuration:()=>D1,removeDynamicOfflineData:()=>cs,getExtensionNameFromId:()=>dQ,deleteSynchronizationItem:()=>u1,renderParcel:()=>pE,useWorkspace2Context:()=>PX,ResetIcon:()=>mQ,RenewIcon:()=>mY,subscribeActionableNotificationShown:()=>N,ErrorCard:()=>Dp,GenderFemaleIcon:()=>my,enableImportMapOverride:()=>iB,getOfflinePatientDataStore:()=>cf,retry:()=>k_,ComponentContext:()=>pj,ExtensionSlot:()=>pz,getOmrsServiceWorker:()=>ax,addImportMapOverride:()=>i$,subscribeConnectivityChanged:()=>b,unsetLeftNav:()=>pn,MaybeIcon:()=>yg,useCustomOverflowMenu:()=>hW,PedestrianFamilyIcon:()=>mK,generateOfflineUuid:()=>u9,cancelPrompt:()=>Pe,CtScanPictogram:()=>Oy,dispatchNotificationShown:()=>k,leftNavStore:()=>pe,OpenmrsFetchError:()=>ir,UserFollowIcon:()=>ya,launchWorkspaceGroup2:()=>Pz,ChevronRightIcon:()=>mo,UserXrayIcon:()=>ys,GenderOtherIcon:()=>mb,formatDuration:()=>Ek,toOmrsIsoString:()=>Em,Labs2Pictogram:()=>OD,workspace2Store:()=>pf,setUserLanguage:()=>il,useBodyScrollLock:()=>fE,getExtensionConfig:()=>tU,SyringeIcon:()=>m5,LocationPicker:()=>Dh,useDebounce:()=>fj,TimeIcon:()=>m8,getExtensionSlotConfig:()=>tF,AddIcon:()=>hZ,getRouteMapOverrideMap:()=>i9,processConfig:()=>ns,InventoryManagementIcon:()=>mk,registerWorkspaces2:()=>pv,UserIcon:()=>yl,formatPatientName:()=>DQ,fireOpenmrsEvent:()=>cv,registerModal:()=>po,registerTranslationNamespace:()=>nt,displayName:()=>DJ,evaluate:()=>cW,defineExtensionConfigSchema:()=>nn,renderWorkspaceWindowsAndMenu:()=>kf,getSyncLifecycle:()=>fs,evaluateAsTypeAsync:()=>cY});let y="openmrs:connectivity-changed";function g(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))}function b(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function v(e){return e({online:!window.offlineEnabled||navigator.onLine}),b(e)}let w="openmrs:precache-static-dependencies";function x(e={}){window.dispatchEvent(new CustomEvent(w,{detail:e}))}function S(e){let t=t=>e(t.detail);return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}let E="openmrs:notification-shown",D="openmrs:actionable-notification-shown",O="openmrs:toast-shown",P="openmrs:snack-bar-shown";function k(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(P,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function R(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function M(e){let t=t=>e(t.detail);return window.addEventListener(P,t),()=>window.removeEventListener(P,t)}function I(e){let t=L(e);setTimeout(()=>{throw t})}function $(){let e=Error();return t=>{let n=L(t);n.stack+=`
2
2
  Async stacktrace:
3
- ${e.stack}`,I(t)}}function L(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(n){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 F(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 n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}function B(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),T({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),T({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let V=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>V(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>V(t)(e)}}},U=e=>{let t,n=new Set,r=(e,r)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.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."),n.clear()}},a=t=e(r,o,i);return i},W=e=>e?U(e):U;function K(){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 z={},H=Symbol.for("openmrs.esm-state.instanceCount"),q=globalThis,G=(q[H]??0)+1;function Z(e,t,n="none"){let r=z[e];if(r)return r.active?K()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value.setState(t,!0),r.active=!0,r.value;{let r=X(e,t,n);return z[e]={value:r,active:!0},r}}function Y(e,t){let n=z[e];return n?(n.active?K()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(z[e]={value:t,active:!0},t)}function J(e,t,n="none"){let r=z[e];if(!r){let r=X(e,t??{},n);return z[e]={value:r,active:!1},r}return r.value}function Q(...e){let[t,n,r]=e,o=void 0===r?n:r,i=void 0===r?e=>e:n,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);F(a,t)||(a=t,o(t))})}function X(e,t,n){return"sessionStorage"===n?W()(((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."),(n,r,o)=>{let i,a,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{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,o);let d=V(s.serialize),p=()=>{let e,t=d({state:s.partialize({...r()}),version:s.version}).then(e=>i.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 h=e((...e)=>{n(...e),p()},r,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(r()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,r()))||void 0;return V(i.getItem.bind(i))(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 n(a=s.merge(e,null!=(t=r())?t:h),!0),p()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(n,r,o)=>{let i,a={storage:B(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,o);let d=()=>{let e=a.partialize({...r()});return c.setItem(a.name,{state:e,version:a.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{n(...e),d()},r,o);o.getInitialState=()=>f;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:f)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=r())?e:f))||void 0;return V(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.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(n(i=a.merge(s,null!=(t=r())?t:f),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=r(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||f}})(()=>t,{name:e,storage:B(()=>sessionStorage)})):W()(()=>t)}q[H]=G,G>1&&!K()&&console.error(`Detected ${G} 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=z)},1e3);let ee=function(e){return void 0===e};var et,en,er,eo,ei,ea,es,el,eu,ec,ed,ep,ef,eh,em,ey,eg=n(85693),eb=n(77361),ev=n(34878),ew=n(47313),e_=Object.prototype,ex=Function.prototype.toString,eS=e_.hasOwnProperty,eE=ex.call(Object);let eD=function(e){if(!(0,ew.A)(e)||"[object Object]"!=(0,eb.A)(e))return!1;var t=(0,ev.A)(e);if(null===t)return!0;var n=eS.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ex.call(n)==eE};var eO=n(21050),eP=n(99271),ek=n(26979);let eC=function(e,t,n){(void 0===n||(0,ek.A)(e[t],n))&&(void 0!==n||t in e)||(0,eP.A)(e,t,n)},ej=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};var eT=n(521),eR=n(65246),eM=n(80084),eN=n(12458),eA=n(86770),eI=n(96956),e$=n(31475),eL=n(11917),eF=n(50405),eB=n(97942),eV=n(60480);let eU=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eW=n(28078),eK=n(25894);let ez=function(e,t,n,r,o,i,a){var s=eU(e,n),l=eU(t,n),u=a.get(l);if(u)return void eC(e,n,u);var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=(0,eI.A)(l),f=!p&&(0,eL.A)(l),h=!p&&!f&&(0,eV.A)(l);(c=l,p||f||h)?(0,eI.A)(s)?c=s:(0,ew.A)(s)&&(0,e$.A)(s)?c=(0,eM.A)(s):f?(d=!1,c=(0,eT.A)(l,!0)):h?(d=!1,c=(0,eR.A)(l,!0)):c=[]:eD(l)||(0,eA.A)(l)?(c=s,(0,eA.A)(s))?c=(0,eW.A)(s,(0,eK.A)(s)):(!(0,eB.A)(s)||(0,eF.A)(s))&&(c=(0,eN.A)(l)):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),eC(e,n,c)},eH=function e(t,n,r,o,i){t!==n&&ej(n,function(a,s){if(i||(i=new eO.A),(0,eB.A)(a))ez(t,n,s,r,e,o,i);else{var l=o?o(eU(t,s),a,s+"",t,n,i):void 0;void 0===l&&(l=a),eC(t,s,l)}},eK.A)},eq=function(e){return e},eG=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var eZ=Math.max;let eY=function(e,t,n){return t=eZ(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=eZ(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),eG(e,this,s)}};var eJ=n(61758),eQ=eJ.A?function(e,t){return(0,eJ.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eq,eX=Date.now,e0=(et=0,en=0,function(){var e=eX(),t=16-(e-en);if(en=e,t>0){if(++et>=800)return arguments[0]}else et=0;return eQ.apply(void 0,arguments)}),e1=n(85378);let e2=function(e,t,n){if(!(0,eB.A)(n))return!1;var r=typeof t;return("number"==r?!!((0,e$.A)(n)&&(0,e1.A)(t,n.length)):"string"==r&&t in n)&&(0,ek.A)(n[t],e)},e4=function(e){var t;return e0(eY(t=function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&e2(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t},void 0,eq),t+"")};var e3=e4(function(e,t,n,r){eH(e,t,n,r)}),e6=n(97685);let e5=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var e7=n(41736),e9=n(84089),e8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/;let tt=function(e,t){if((0,eI.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,e9.A)(e))||te.test(e)||!e8.test(e)||null!=t&&e in Object(t)};var tn=n(90257);function tr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(tr.Cache||tn.A),n}tr.Cache=tn.A;var to=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ti=/\\(\\)?/g,ta=(eo=(er=tr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(to,function(e,n,r,o){t.push(r?o.replace(ti,"$1"):n||e)}),t},function(e){return 500===eo.size&&eo.clear(),e})).cache,er),ts=n(83516),tl=1/0,tu=ts.A?ts.A.prototype:void 0,tc=tu?tu.toString:void 0;let td=function e(t){if("string"==typeof t)return t;if((0,eI.A)(t))return e5(t,e)+"";if((0,e9.A)(t))return tc?tc.call(t):"";var n=t+"";return"0"==n&&1/t==-tl?"-0":n},tp=function(e){return null==e?"":td(e)},tf=function(e,t){return(0,eI.A)(e)?e:tt(e,t)?[e]:ta(tp(e))},th=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var tm=1/0;let ty=function(e){if("string"==typeof e||(0,e9.A)(e))return e;var t=e+"";return"0"==t&&1/e==-tm?"-0":t},tg=function(e,t){t=tf(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[ty(t[n++])];return n&&n==r?e:void 0},tb=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i};var tv=Object.prototype.hasOwnProperty;let tw=function(e,t){t=tf(t,e);var n,r=-1,o=t.length;if(!o)return!0;for(;++r<o;){var i=ty(t[r]);if("__proto__"===i&&!tv.call(e,"__proto__")||("constructor"===i||"prototype"===i)&&r<o-1)return!1}var a=(n=t).length<2?e:tg(e,tb(n,0,-1));return null==a||delete a[ty(th(t))]},t_=function(e){return eD(e)?void 0:e};var tx=n(53271),tS=ts.A?ts.A.isConcatSpreadable:void 0;let tE=function(e){return(0,eI.A)(e)||(0,eA.A)(e)||!!(tS&&e&&e[tS])},tD=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=tE),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):(0,tx.A)(i,l):o||(i[i.length]=l)}return i};var tO=n(7096),tP=e0(eY(ei=function(e,t){var n={};if(null==e)return n;var r=!1;t=e5(t,function(t){return t=tf(t,e),r||(r=t.length>1),t}),(0,eW.A)(e,(0,tO.A)(e),n),r&&(n=(0,e7.A)(n,7,t_));for(var o=t.length;o--;)tw(n,t[o]);return n},void 0,function(e){return(null==e?0:e.length)?tD(e,1):[]}),ei+""),tk=n(43322),tC=((ea={}).Array="Array",ea.Boolean="Boolean",ea.ConceptUuid="ConceptUuid",ea.Number="Number",ea.Object="Object",ea.String="String",ea.UUID="UUID",ea.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ea.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",ea);function tj(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let tT=tj(e=>Array.isArray(e),"must be an array"),tR=tj(e=>"boolean"==typeof e,"must be a boolean"),tM=tj(e=>"number"==typeof e,"must be a number"),tN=tj(e=>"string"==typeof e,"must be a string"),tA=tj(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),tI=tj(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"),t$=Z("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),tL=Z("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});tL.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tF=Z("config-store-of-extension-state",{mountedExtensions:[]});function tB(e){return J(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tV(){return J("config-extension-slots",{slots:{}})}function tU(e){return tW(tV().getState(),e)}function tW(e,t){return e.slots[t]??{loaded:!1,config:{}}}function tK(){return J("config-extensions",{configs:{}})}function tz(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 n=tK(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},subscribe:e=>n.subscribe((t,n)=>{let o=r(t),i=r(n);F(o,i)||e(o,i)})}}function tH(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function tq(e,t,n){return e.configure?.[n]??null}let tG=W()(()=>({config:{}})),tZ=0,tY=!0,tJ=!1;function tQ(e){r=e}function tX(){tY=!0,tZ>0&&t0()}function t0(){if(tY&&r&&!tJ){tJ=!0,tY=!1;try{r()}catch(e){tY=!0,t1(e),console.error("Failed to derive the implementer tools config",e)}finally{tJ=!1}}}function t1(e){tG.setState({derivationError:e instanceof Error?e.message:String(e)})}function t2(){tG.getState().derivationError&&tG.setState({derivationError:void 0})}let t4=Y("config-implementer-tools",{...tG,getState:()=>(0===tZ&&t0(),tG.getState()),setState:(...e)=>(tY=!1,tG.setState(...e)),subscribe(e){tZ++,t0();let t=tG.subscribe(e),n=!1;return()=>{!n&&(n=!0,tZ--),t()}}});function t3(e,t){if(Array.isArray(t))return t}function t6(e,t){return e3({},e,t,t3)}let t5=[];function t7(){let e=t$.getState(),t=tL.getState(),n=tF.getState();!function(e,t){for(let n of Object.keys(e.schemas)){let r,o=tB(n),i=e.schemas[n],a=!!e.moduleLoaded[n],s=ne.get(n);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)r=s.state;else{let o=a?function(e,t,n){let r=t.schemas[e],o=ny(e,nh(t,n));nb(r,o,e);let i=nx(r,o);return nv(r,i,e),delete i.extensionSlots,i}(n,e,t):function(e,t,n){let r=nx(nj,ny(e,nh(t,n)));return nv(nj,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:a,config:o},ne.set(n,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:r})}let l=o.getState();l.loaded===r.loaded&&l.translationOverridesLoaded===r.translationOverridesLoaded&&(0,e6.A)(l.config,r.config)||o.setState(r)}}(e,t);let r=function(e,t){let n=ng(nh(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});var o=r;for(let[e,t]of Object.entries(o))for(let[n,r]of Object.entries(t))!function(e,t,n){let r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&nO(r,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||nO(r,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)||nO(r,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)||nO(r,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!nE(e.configure)&&nO(r,o+".configure' is invalid. Must be an object with extension IDs for keys")}(r,e,n);let i={},a={};for(let e of Object.values(r))for(let[t,n]of Object.entries(e))i[t]=n,n.configure&&(a[t]??(a[t]=[])).push(n.configure);for(let[e,t]of Object.entries(a)){let n=1===t.length?t[0]:ng(t);i[e].configure!==n&&(i[e]={...i[e],configure:n})}return i}(e,t);(function(e){let t=tV(),n=t.getState().slots,r={},o=!1;for(let[t,i]of Object.entries(e)){let e=n[t];e?.loaded&&(0,e6.A)(e.config,i)?r[t]=e:(r[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(n).length!==Object.keys(r).length)&&t.setState({slots:r})})(r),function(e,t,n,r){let o=tK(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,n,r,o,i,a){let s=function(e){let[t]=e.split("#");return t}(r),l=o.schemas[s],u=JSON.stringify([n,r,e,t]),c=nd.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,p=nh(o,i),f=a?.configure?.[r]??{},h=ny(e,p),m=h?.extensionSlots?.[n]?.configure?.[r]??{},y=ng([ny(d,p),f,m]),g=l??o.schemas[t];nb(g,y,d);let b=nx(g,y);return nv(g,b,d),delete b.extensionSlots,nd.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n,r[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&(0,e6.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let n=i[e];n&&Object.keys(n).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>n[e]===t)&&(a[e]=n)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,n,t,r),tX()}function t9(){r=()=>{var e,t;let n,r;return e=t$.getState(),t=tL.getState(),n=t4.getState(),r={config:function(e,t){let n=function(e){let t={};for(let[n,r]of Object.entries(e)){let e=nf.get(n);if(e&&e.schema===r)t[n]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:nE(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}((0,tk.A)(r));nf.set(n,{schema:r,annotated:e}),t[n]=e}}return t}(e.schemas),r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(n));for(let[e]of r)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=n[e],o=r.map(([t])=>t[e]),a=r.map(([,e])=>e),s=np.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===a[t])){i[e]=s.result;continue}let l=t??{};r.forEach(([,e],t)=>{let n=o[t];void 0!==n&&(l=t6(l,function e(t,n){return nE(t)?Object.keys(t).reduce((r,o)=>(r[o]=e(t[o],n),r),{}):{_value:t,_source:n}}(n,e)))}),np.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void((0,e6.A)(n.config,r.config)||t4.setState(r))},t7(),t5.push(t$.subscribe(t8),tL.subscribe(t8),tF.subscribe(t8))}function t8(){t2();try{t7()}catch(e){t1(e),console.error("Failed to recompute the configuration",e)}}t9();let ne=new Map;function nt(e,t){nm(e,t);let n=t6(t,nj);t$.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nn(e){t$.setState(t=>({...t,schemas:{...t.schemas,[e]:nj}}))}function nr(e){t$.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function no(e){t$.setState(t=>({...t,schemas:{...t.schemas,[e]:nC}}))}function ni(e,t){nm(e,t);let n=t6(t,nj);t$.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.`),t$.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function na(e,t="provided"){t$.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function ns(e,t,n){return new Promise(r=>{let o,i=!1;function a(e){!i&&t(e)&&(i=!0,r(n(e)),o?.())}a(e.getState()),i||(o=e.subscribe(a))})}function nl(e){return ns(tB(e),e=>!!(e.loaded&&e.config),e=>tP(e.config,["Display conditions","Translation overrides"]))}function nu(e,t,n){let r=[ns(tB(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&n&&r.push(ns(tz(t,n),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(r)}function nc(e,t,n){nb(e,t,n);let r=nx(e,t);return nv(e,r,n),r}let nd=new Map,np=new Map,nf=new Map;function nh(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function nm(e,t,n=""){let r="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 i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!nE(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||nm(e,a,i);let s=a._elements;if(nS(s)&&nm(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.
3
+ ${e.stack}`,I(t)}}function L(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(n){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 F(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 n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}function B(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),T({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),T({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let V=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>V(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>V(t)(e)}}},U=e=>{let t,n=new Set,r=(e,r)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.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."),n.clear()}},a=t=e(r,o,i);return i},W=e=>e?U(e):U;function K(){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 H={},z=Symbol.for("openmrs.esm-state.instanceCount"),G=globalThis,q=(G[z]??0)+1;function Z(e,t,n="none"){let r=H[e];if(r)return r.active?K()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value.setState(t,!0),r.active=!0,r.value;{let r=X(e,t,n);return H[e]={value:r,active:!0},r}}function Y(e,t){let n=H[e];return n?(n.active?K()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(H[e]={value:t,active:!0},t)}function J(e,t,n="none"){let r=H[e];if(!r){let r=X(e,t??{},n);return H[e]={value:r,active:!1},r}return r.value}function Q(...e){let[t,n,r]=e,o=void 0===r?n:r,i=void 0===r?e=>e:n,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);F(a,t)||(a=t,o(t))})}function X(e,t,n){return"sessionStorage"===n?W()(((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."),(n,r,o)=>{let i,a,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{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,o);let d=V(s.serialize),p=()=>{let e,t=d({state:s.partialize({...r()}),version:s.version}).then(e=>i.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 h=e((...e)=>{n(...e),p()},r,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(r()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,r()))||void 0;return V(i.getItem.bind(i))(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 n(a=s.merge(e,null!=(t=r())?t:h),!0),p()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(n,r,o)=>{let i,a={storage:B(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,o);let d=()=>{let e=a.partialize({...r()});return c.setItem(a.name,{state:e,version:a.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{n(...e),d()},r,o);o.getInitialState=()=>f;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:f)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=r())?e:f))||void 0;return V(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.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(n(i=a.merge(s,null!=(t=r())?t:f),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=r(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||f}})(()=>t,{name:e,storage:B(()=>sessionStorage)})):W()(()=>t)}G[z]=q,q>1&&!K()&&console.error(`Detected ${q} 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=H)},1e3);let ee=function(e){return void 0===e};var et,en,er,eo,ei,ea,es,el,eu,ec,ed,ep,ef,eh=n(85693),em=n(77361),ey=n(34878),eg=n(47313),eb=Object.prototype,ev=Function.prototype.toString,ew=eb.hasOwnProperty,e_=ev.call(Object);let ex=function(e){if(!(0,eg.A)(e)||"[object Object]"!=(0,em.A)(e))return!1;var t=(0,ey.A)(e);if(null===t)return!0;var n=ew.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ev.call(n)==e_};var eS=n(21050),eE=n(99271),eD=n(26979);let eO=function(e,t,n){(void 0===n||(0,eD.A)(e[t],n))&&(void 0!==n||t in e)||(0,eE.A)(e,t,n)},eP=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};var ek=n(521),eC=n(65246),ej=n(80084),eT=n(12458),eR=n(86770),eN=n(96956),eA=n(31475),eM=n(11917),eI=n(50405),e$=n(97942),eL=n(60480);let eF=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eB=n(28078),eV=n(25894);let eU=function(e,t,n,r,o,i,a){var s=eF(e,n),l=eF(t,n),u=a.get(l);if(u)return void eO(e,n,u);var c=i?i(s,l,n+"",e,t,a):void 0,d=void 0===c;if(d){var p=(0,eN.A)(l),f=!p&&(0,eM.A)(l),h=!p&&!f&&(0,eL.A)(l);(c=l,p||f||h)?(0,eN.A)(s)?c=s:(0,eg.A)(s)&&(0,eA.A)(s)?c=(0,ej.A)(s):f?(d=!1,c=(0,ek.A)(l,!0)):h?(d=!1,c=(0,eC.A)(l,!0)):c=[]:ex(l)||(0,eR.A)(l)?(c=s,(0,eR.A)(s))?c=(0,eB.A)(s,(0,eV.A)(s)):(!(0,e$.A)(s)||(0,eI.A)(s))&&(c=(0,eT.A)(l)):d=!1}d&&(a.set(l,c),o(c,l,r,i,a),a.delete(l)),eO(e,n,c)},eW=function e(t,n,r,o,i){t!==n&&eP(n,function(a,s){if(i||(i=new eS.A),(0,e$.A)(a))eU(t,n,s,r,e,o,i);else{var l=o?o(eF(t,s),a,s+"",t,n,i):void 0;void 0===l&&(l=a),eO(t,s,l)}},eV.A)},eK=function(e){return e},eH=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var ez=Math.max;let eG=function(e,t,n){return t=ez(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=ez(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),eH(e,this,s)}};var eq=n(61758),eZ=eq.A?function(e,t){return(0,eq.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eK,eY=Date.now,eJ=(et=0,en=0,function(){var e=eY(),t=16-(e-en);if(en=e,t>0){if(++et>=800)return arguments[0]}else et=0;return eZ.apply(void 0,arguments)}),eQ=n(85378);let eX=function(e,t,n){if(!(0,e$.A)(n))return!1;var r=typeof t;return("number"==r?!!((0,eA.A)(n)&&(0,eQ.A)(t,n.length)):"string"==r&&t in n)&&(0,eD.A)(n[t],e)},e0=function(e){var t;return eJ(eG(t=function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&eX(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t},void 0,eK),t+"")};var e1=e0(function(e,t,n,r){eW(e,t,n,r)}),e2=n(97685);let e4=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var e3=n(41736),e6=n(84089),e5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e7=/^\w*$/;let e9=function(e,t){if((0,eN.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,e6.A)(e))||e7.test(e)||!e5.test(e)||null!=t&&e in Object(t)};var e8=n(90257);function te(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(te.Cache||e8.A),n}te.Cache=e8.A;var tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tn=/\\(\\)?/g,tr=(eo=(er=te(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(tt,function(e,n,r,o){t.push(r?o.replace(tn,"$1"):n||e)}),t},function(e){return 500===eo.size&&eo.clear(),e})).cache,er),to=n(83516),ti=1/0,ta=to.A?to.A.prototype:void 0,ts=ta?ta.toString:void 0;let tl=function e(t){if("string"==typeof t)return t;if((0,eN.A)(t))return e4(t,e)+"";if((0,e6.A)(t))return ts?ts.call(t):"";var n=t+"";return"0"==n&&1/t==-ti?"-0":n},tu=function(e){return null==e?"":tl(e)},tc=function(e,t){return(0,eN.A)(e)?e:e9(e,t)?[e]:tr(tu(e))},td=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var tp=1/0;let tf=function(e){if("string"==typeof e||(0,e6.A)(e))return e;var t=e+"";return"0"==t&&1/e==-tp?"-0":t},th=function(e,t){t=tc(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[tf(t[n++])];return n&&n==r?e:void 0},tm=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i};var ty=Object.prototype.hasOwnProperty;let tg=function(e,t){t=tc(t,e);var n,r=-1,o=t.length;if(!o)return!0;for(;++r<o;){var i=tf(t[r]);if("__proto__"===i&&!ty.call(e,"__proto__")||("constructor"===i||"prototype"===i)&&r<o-1)return!1}var a=(n=t).length<2?e:th(e,tm(n,0,-1));return null==a||delete a[tf(td(t))]},tb=function(e){return ex(e)?void 0:e};var tv=n(53271),tw=to.A?to.A.isConcatSpreadable:void 0;let t_=function(e){return(0,eN.A)(e)||(0,eR.A)(e)||!!(tw&&e&&e[tw])},tx=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=t_),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):(0,tv.A)(i,l):o||(i[i.length]=l)}return i};var tS=n(7096),tE=eJ(eG(ei=function(e,t){var n={};if(null==e)return n;var r=!1;t=e4(t,function(t){return t=tc(t,e),r||(r=t.length>1),t}),(0,eB.A)(e,(0,tS.A)(e),n),r&&(n=(0,e3.A)(n,7,tb));for(var o=t.length;o--;)tg(n,t[o]);return n},void 0,function(e){return(null==e?0:e.length)?tx(e,1):[]}),ei+""),tD=n(43322),tO=((ea={}).Array="Array",ea.Boolean="Boolean",ea.ConceptUuid="ConceptUuid",ea.Number="Number",ea.Object="Object",ea.String="String",ea.UUID="UUID",ea.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ea.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",ea);function tP(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let tk=tP(e=>Array.isArray(e),"must be an array"),tC=tP(e=>"boolean"==typeof e,"must be a boolean"),tj=tP(e=>"number"==typeof e,"must be a number"),tT=tP(e=>"string"==typeof e,"must be a string"),tR=tP(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),tN=tP(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"),tA=Z("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),tM=Z("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});tM.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tI=Z("config-store-of-extension-state",{mountedExtensions:[]});function t$(e){return J(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tL(){return J("config-extension-slots",{slots:{}})}function tF(e){return tB(tL().getState(),e)}function tB(e,t){return e.slots[t]??{loaded:!1,config:{}}}function tV(){return J("config-extensions",{configs:{}})}function tU(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 n=tV(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},subscribe:e=>n.subscribe((t,n)=>{let o=r(t),i=r(n);F(o,i)||e(o,i)})}}function tW(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function tK(e,t,n){return e.configure?.[n]??null}let tH=W()(()=>({config:{}})),tz=0,tG=!0,tq=!1;function tZ(e){r=e}function tY(){tG=!0,tz>0&&tJ()}function tJ(){if(tG&&r&&!tq){tq=!0,tG=!1;try{r()}catch(e){tG=!0,tQ(e),console.error("Failed to derive the implementer tools config",e)}finally{tq=!1}}}function tQ(e){tH.setState({derivationError:e instanceof Error?e.message:String(e)})}function tX(){tH.getState().derivationError&&tH.setState({derivationError:void 0})}let t0=Y("config-implementer-tools",{...tH,getState:()=>(0===tz&&tJ(),tH.getState()),setState:(...e)=>(tG=!1,tH.setState(...e)),subscribe(e){tz++,tJ();let t=tH.subscribe(e),n=!1;return()=>{!n&&(n=!0,tz--),t()}}});function t1(e,t){if(Array.isArray(t))return t}function t2(e,t){return e1({},e,t,t1)}let t4=[];function t3(){let e=tA.getState(),t=tM.getState(),n=tI.getState();!function(e,t){for(let n of Object.keys(e.schemas)){let r,o=t$(n),i=e.schemas[n],a=!!e.moduleLoaded[n],s=t7.get(n);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)r=s.state;else{let o=a?function(e,t,n){let r=t.schemas[e],o=nf(e,nd(t,n));nm(r,o,e);let i=nv(r,o);return ny(r,i,e),delete i.extensionSlots,i}(n,e,t):function(e,t,n){let r=nv(nP,nf(e,nd(t,n)));return ny(nP,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:a,config:o},t7.set(n,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:r})}let l=o.getState();l.loaded===r.loaded&&l.translationOverridesLoaded===r.translationOverridesLoaded&&(0,e2.A)(l.config,r.config)||o.setState(r)}}(e,t);let r=function(e,t){let n=nh(nd(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});var o=r;for(let[e,t]of Object.entries(o))for(let[n,r]of Object.entries(t))!function(e,t,n){let r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&nS(r,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||nS(r,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)||nS(r,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)||nS(r,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!n_(e.configure)&&nS(r,o+".configure' is invalid. Must be an object with extension IDs for keys")}(r,e,n);let i={},a={};for(let e of Object.values(r))for(let[t,n]of Object.entries(e))i[t]=n,n.configure&&(a[t]??(a[t]=[])).push(n.configure);for(let[e,t]of Object.entries(a)){let n=1===t.length?t[0]:nh(t);i[e].configure!==n&&(i[e]={...i[e],configure:n})}return i}(e,t);(function(e){let t=tL(),n=t.getState().slots,r={},o=!1;for(let[t,i]of Object.entries(e)){let e=n[t];e?.loaded&&(0,e2.A)(e.config,i)?r[t]=e:(r[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(n).length!==Object.keys(r).length)&&t.setState({slots:r})})(r),function(e,t,n,r){let o=tV(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,n,r,o,i,a){let s=function(e){let[t]=e.split("#");return t}(r),l=o.schemas[s],u=JSON.stringify([n,r,e,t]),c=nl.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,p=nd(o,i),f=a?.configure?.[r]??{},h=nf(e,p),m=h?.extensionSlots?.[n]?.configure?.[r]??{},y=nh([nf(d,p),f,m]),g=l??o.schemas[t];nm(g,y,d);let b=nv(g,y);return ny(g,b,d),delete b.extensionSlots,nl.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n,r[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&(0,e2.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let n=i[e];n&&Object.keys(n).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>n[e]===t)&&(a[e]=n)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,n,t,r),tY()}function t6(){r=()=>{var e,t;let n,r;return e=tA.getState(),t=tM.getState(),n=t0.getState(),r={config:function(e,t){let n=function(e){let t={};for(let[n,r]of Object.entries(e)){let e=nc.get(n);if(e&&e.schema===r)t[n]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:n_(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}((0,tD.A)(r));nc.set(n,{schema:r,annotated:e}),t[n]=e}}return t}(e.schemas),r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(n));for(let[e]of r)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=n[e],o=r.map(([t])=>t[e]),a=r.map(([,e])=>e),s=nu.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===a[t])){i[e]=s.result;continue}let l=t??{};r.forEach(([,e],t)=>{let n=o[t];void 0!==n&&(l=t2(l,function e(t,n){return n_(t)?Object.keys(t).reduce((r,o)=>(r[o]=e(t[o],n),r),{}):{_value:t,_source:n}}(n,e)))}),nu.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void((0,e2.A)(n.config,r.config)||t0.setState(r))},t3(),t4.push(tA.subscribe(t5),tM.subscribe(t5),tI.subscribe(t5))}function t5(){tX();try{t3()}catch(e){tQ(e),console.error("Failed to recompute the configuration",e)}}t6();let t7=new Map;function t9(e,t){np(e,t);let n=t2(t,nP);tA.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function t8(e){tA.setState(t=>({...t,schemas:{...t.schemas,[e]:nP}}))}function ne(e){tA.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function nt(e){tA.setState(t=>({...t,schemas:{...t.schemas,[e]:nO}}))}function nn(e,t){np(e,t);let n=t2(t,nP);tA.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.`),tA.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function nr(e,t="provided"){tA.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function no(e,t,n){return new Promise(r=>{let o,i=!1;function a(e){!i&&t(e)&&(i=!0,r(n(e)),o?.())}a(e.getState()),i||(o=e.subscribe(a))})}function ni(e){return no(t$(e),e=>!!(e.loaded&&e.config),e=>tE(e.config,["Display conditions","Translation overrides"]))}function na(e,t,n){let r=[no(t$(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&n&&r.push(no(tU(t,n),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(r)}function ns(e,t,n){nm(e,t,n);let r=nv(e,t);return ny(e,r,n),r}let nl=new Map,nu=new Map,nc=new Map;function nd(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function np(e,t,n=""){let r="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 i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!n_(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||np(e,a,i);let s=a._elements;if(nw(s)&&np(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.
4
4
 
5
- If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=a._type;l&&!Object.values(tC).includes(l)&&console.error(`${e} has invalid type for key '${i}' ${r}.
5
+ If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=a._type;l&&!Object.values(tO).includes(l)&&console.error(`${e} has invalid type for key '${i}' ${r}.
6
6
 
7
- If you're the maintainer: the allowed types are ${Object.values(tC).join(", ")}. Received '${l}'`),Object.keys(a).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.
7
+ If you're the maintainer: the allowed types are ${Object.values(tO).join(", ")}. Received '${l}'`),Object.keys(a).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.
8
8
 
9
- If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&l&&![tC.Array,tC.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.
9
+ If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&l&&![tO.Array,tO.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.
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 ny(e,t){return ng(t.map(({[e]:t})=>t).filter(e=>!!e))}function ng(e){return e.reduce((e,t)=>e3(e,t,t3),{})}function nb(e,t,n=""){for(let r of Object.keys(t)){let o=t[r],i=n+"."+r,a=e[r];if(!e.hasOwnProperty(r)){("extensionSlots"!==r||""===n)&&nO(i,`Unknown config key '${i}' provided. Ignoring.`);continue}(function e(t,n,r){nw(r,t._type,n),nE(n)?t._type===tC.Object?function(t,n,r){if(t._elements)for(let o of Object.keys(n)){let i=n[o];e(t._elements,i,`${r}.${o}`)}}(t,n,r):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||nb(t,n,r):t._type===tC.Array&&function(t,n,r){if(nw(r,tC.Array,n)){if(nS(t._elements))for(let o=0;o<n.length;o++)e(t._elements,n[o],`${r}[${o}]`);for(let e=0;e<n.length;e++)nw(`${r}[${e}]`,t._elements?._type,n[e])}}(t,n,r)})(a,o,i)}}function nv(e,t,n=""){if(e){if(t!==e._default&&n_(n,e._validators,t),nE(t))for(let r of Object.keys(t)){let o=t[r],i=n+"."+r,a=e[r];e._type===tC.Object&&e._elements?nv(e._elements,o,i):nv(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)nv(e._elements,t[r],`${n}[${r}]`)}}function nw(e,t,n){return!t||n_(e,[{Array:tT,Boolean:tR,ConceptUuid:tI,Number:tM,Object:tA,String:tN,UUID:tI,PersonAttributeTypeUuid:tI,PatientIdentifierTypeUuid:tI}[t]],n)}function n_(e,t,n){let r=!0;if(t)try{for(let o of t){let t=o(n);if("string"==typeof t){let o="object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`;nO(e,o),r=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
- ${t}`)}return r}let nx=(e,t)=>{let n=structuredClone(t);if(!e)return n;for(let t of Object.keys(e)){let r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);let e=o._elements;if(r&&nS(e)){if(o._type===tC.Array&&Array.isArray(r)){let o=r.map(t=>nx(e,t));n[t]=o}else if(o._type===tC.Object)for(let t of Object.keys(r))r[t]=nx(e,r[t])}}else if(nE(o)){let e=r??{};nE(e)&&(n[t]=nx(o,e))}}return n};function nS(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function nE(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let nD=new Set;function nO(e,t){let n=`${e}:::${t}`;nD||(nD=new Set),nD.has(n)||(console.error(t),nD.add(n))}function nP(e){e?nD.forEach(t=>{t.startsWith(e)&&nD.delete(t)}):nD.clear()}function nk(){t5.forEach(e=>e()),t5.length=0,ne.clear(),nd.clear(),nf.clear(),np.clear(),t9()}let nC={"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:tC.Object,_default:{},_validators:[tj(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(", ")}.`})]}},nj={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tC.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tC.String,_default:void 0}},...nC},nT=(e,t)=>tj(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nR=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tj(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},nM=nR([]),nN=e=>tj(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nA={inRange:nT,isUrl:nM,isUrlWithTemplateParameters:nR,oneOf:nN};var nI=n(82034);let n$=Z("breadcrumbs",[]);function nL(e){return nF([e])}function nF(e){let t=[...nB(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,nI.pathToRegexp)(e.matcher).regexp:(0,nI.pathToRegexp)(e.path).regexp,settings:e}))];n$.setState(t,!0)}function nB(){return n$.getState()}function nV(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=nV(e,n.join("/"));if(t)return t}}(e,t)}function nU(e,t){if(e.length>0){let n=nV(e,t);if(n){let t=[n],r=nV(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nV(e,r.settings.parent);return t.reverse()}}return[]}function nW(e){return nU(nB(),e)}var nK=Object.freeze({__proto__:null,get start(){return oo},get ensureJQuerySupport(){return rW},get setBootstrapMaxTime(){return rE},get setMountMaxTime(){return rD},get setUnmountMaxTime(){return rO},get setUnloadMaxTime(){return rP},get registerApplication(){return r0},get unregisterApplication(){return r2},get getMountedApps(){return rY},get getAppStatus(){return rQ},get unloadApplication(){return r4},get checkActivityFunctions(){return r1},get getAppNames(){return rJ},get pathToActiveWhen(){return r5},get navigateToUrl(){return rN},get patchHistoryApi(){return rB},get triggerAppChange(){return oe},get addErrorHandler(){return nZ},get removeErrorHandler(){return nY},get mountRootParcel(){return rv},get NOT_LOADED(){return nX},get LOADING_SOURCE_CODE(){return n0},get NOT_BOOTSTRAPPED(){return n1},get BOOTSTRAPPING(){return n2},get NOT_MOUNTED(){return n4},get MOUNTING(){return n3},get UPDATING(){return n5},get LOAD_ERROR(){return n8},get MOUNTED(){return n6},get UNLOADING(){return n9},get UNMOUNTING(){return n7},get SKIP_BECAUSE_BROKEN(){return re}}),nz=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nH=!function(){try{var e=new nz("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 n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:nz;let nq=[];function nG(e,t,n){let r=nQ(e,t,n);nq.length?nq.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nZ(e){if("function"!=typeof e)throw Error(nJ(28,!1));nq.push(e)}function nY(e){if("function"!=typeof e)throw Error(nJ(29,!1));let t=!1;return nq=nq.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nJ(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function nQ(e,t,n){let r,o=`${ri(t)} '${rr(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(nJ(30,!1,t.status,rr(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=rr(t),t.status=n,r}let nX="NOT_LOADED",n0="LOADING_SOURCE_CODE",n1="NOT_BOOTSTRAPPED",n2="BOOTSTRAPPING",n4="NOT_MOUNTED",n3="MOUNTING",n6="MOUNTED",n5="UPDATING",n7="UNMOUNTING",n9="UNLOADING",n8="LOAD_ERROR",re="SKIP_BECAUSE_BROKEN";function rt(e){return e.status===n6}function rn(e){try{return e.activeWhen(window.location)}catch(t){return nG(t,e,re),!1}}function rr(e){return e.name}function ro(e){return!!e.unmountThisParcel}function ri(e){return ro(e)?"parcel":"application"}function ra(){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 rs(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function rl(e){return e&&("function"==typeof e||Array.isArray(e)&&!rs(e,e=>"function"!=typeof e))}function ru(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=ri(e),o=rr(e);return function(e){return n.reduce((n,i,a)=>n.then(()=>{let n=i(e);return rc(n)?n:Promise.reject(nJ(15,!1,r,o,t,a))}),Promise.resolve())}}function rc(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let rd=[];function rp(e,t){return Promise.resolve().then(()=>e.status!==n1?e:(e.status=n2,e.bootstrap?rk(e,"bootstrap").then(n).catch(n=>{if(t)throw nQ(n,e,re);return nG(n,e,re),e}):Promise.resolve().then(n)));function n(){return e.status=n4,e}}function rf(e,t){return Promise.resolve().then(()=>{if(e.status!==n6)return e;return e.status=n7,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,r=>n().then(()=>{let n=Error(r.message);if(t)throw nQ(n,e,re);nG(n,e,re)})).then(()=>e);function n(){return rk(e,"unmount").then(()=>{e.status=n4},n=>{if(t)throw nQ(n,e,re);nG(n,e,re)})}})}let rh=!1,rm=!1;function ry(e,t){return Promise.resolve().then(()=>e.status!==n4?e:(rh||(window.dispatchEvent(new nH("single-spa:before-first-mount")),rh=!0),e.status=n3,rk(e,"mount").then(()=>(e.status=n6,rm||(window.dispatchEvent(new nH("single-spa:first-mount")),rm=!0),e)).catch(n=>{return e.status=n6,rf(e,!0).then(r,r);function r(){if(t)throw nQ(n,e,re);return nG(n,e,re),e}})))}let rg=0,rb={parcels:{}};function rv(){return rw.apply(rb,arguments)}function rw(e,t){let n,r,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nJ(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nJ(3,!1,typeof e.name));let a=rg++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(nJ(4,!1,s,typeof t));if(!t.domElement)throw Error(nJ(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?n0:n1,customProps:t,parentName:rr(i),unmountThisParcel:()=>f.then(()=>{if(c.status!==n6)throw Error(nJ(6,!1,s,c.status));return rf(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=re,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nJ(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(nJ(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!rl(e.bootstrap))throw Error(nJ(9,!1,s));if(!rl(e.mount))throw Error(nJ(10,!1,s));if(!rl(e.unmount))throw Error(nJ(11,!1,s));if(e.update&&!rl(e.update))throw Error(nJ(12,!1,s));let t=ru(e,"bootstrap"),r=ru(e,"mount"),o=ru(e,"unmount");c.status=n1,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=o,c.timeouts=rC(e.timeouts),e.update&&(c.update=ru(e,"update"),n.update=function(e){return c.customProps=e,r_(Promise.resolve().then(()=>{if(c.status!==n6)throw Error(nJ(32,!1,rr(c)));return c.status=n5,rk(c,"update").then(()=>(c.status=n6,c)).catch(e=>{throw nQ(e,c,re)})}))})})).then(()=>rp(c,!0)),f=p.then(()=>ry(c,!0)),h=new Promise((e,t)=>{r=e,o=t});return n={mount:()=>r_(Promise.resolve().then(()=>{if(c.status!==n4)throw Error(nJ(13,!1,s,c.status));return i.parcels[a]=c,ry(c)})),unmount:()=>r_(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:r_(d),bootstrapPromise:r_(p),mountPromise:r_(f),unmountPromise:r_(h)}}function r_(e){return e.then(()=>null)}function rx(e){let t=rr(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nJ(40,!1),t,n));let r=ra({},n,{name:t,mountParcel:rw.bind(e),singleSpa:nK});return ro(e)&&(r.unmountSelf=e.unmountThisParcel),r}let rS={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 rE(e,t,n){if("number"!=typeof e||e<=0)throw Error(nJ(16,!1));rS.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rD(e,t,n){if("number"!=typeof e||e<=0)throw Error(nJ(17,!1));rS.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rO(e,t,n){if("number"!=typeof e||e<=0)throw Error(nJ(18,!1));rS.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rP(e,t,n){if("number"!=typeof e||e<=0)throw Error(nJ(19,!1));rS.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rk(e,t){let n=e.timeouts[t],r=n.warningMillis,o=ri(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](rx(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nJ(31,!1,t,o,rr(e),n.millis);function c(e){s||(!0===e?(l=!0,n.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*r+r<n.millis&&setTimeout(()=>c(e+1),r)))}})}function rC(e){let t={};for(let n in rS)t[n]=ra({},rS[n],e&&e[n]||{});return t}function rj(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nX&&e.status!==n8?e:(e.status=n0,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rx(e));if(!rc(r))throw n=!0,Error(nJ(33,!1,rr(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!rl(t.bootstrap)&&(r=35),rl(t.mount)||(r=36),rl(t.unmount)||(r=37);let o=ri(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nJ(r,!1,o,rr(e),n),t),nG(void 0,e,re),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=ra({},e.devtools.overlays,t.devtools.overlays)),e.status=n1,e.bootstrap=ru(t,"bootstrap"),e.mount=ru(t,"mount"),e.unmount=ru(t,"unmount"),e.unload=ru(t,"unload"),e.timeouts=rC(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=re:(r=n8,e.loadErrorTime=(new Date).getTime()),nG(t,e,r),e}))})}let rT="u">typeof window,rR={hashchange:[],popstate:[]},rM=["hashchange","popstate"];function rN(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(nJ(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rV(window.location.href),r=rV(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function rA(e){if(e){let t=e[0].type;rM.indexOf(t)>=0&&rR[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rI(){ot([],arguments)}function r$(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),i=window.location.href;return o&&n===i||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let rL=null,rF=!1;function rB(e){if(rF)throw Error(nJ(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rF=!0,rL=window.history.replaceState,window.addEventListener("hashchange",rI),window.addEventListener("popstate",rI);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rM.indexOf(e)>=0)||rs(rR[e],e=>e===n))return t.apply(this,arguments);rR[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rM.indexOf(e)>=0&&(rR[e]=rR[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=r$(window.history.pushState,"pushState"),window.history.replaceState=r$(rL,"replaceState")}function rV(e){let t=document.createElement("a");return t.href=e,t}rT&&(window.singleSpaNavigate?console.warn(nJ(41,!1)):window.singleSpaNavigate=rN);let rU=!1;function rW(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rU){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rK.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rK.call(this,n,window.removeEventListener,e,t,arguments)},rU=!0}}function rK(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach(e=>{rM.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,o))}let rz={};function rH(e){return Promise.resolve().then(()=>{let t=rz[rr(e)];if(!t)return e;if(e.status===nX)return rq(e,t),e;if(e.status===n9)return t.promise.then(()=>e);if(e.status!==n4&&e.status!==n8)return e;let n=e.status===n8?Promise.resolve():rk(e,"unload");return e.status=n9,n.then(()=>(rq(e,t),e)).catch(n=>(delete rz[rr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nG(n,e,re),t.reject(n),e))})}function rq(e,t){delete rz[rr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nX,t.resolve()}function rG(e,t,n,r){rz[rr(e)]={app:e,resolve:n,reject:r},Object.defineProperty(rz[rr(e)],"promise",{get:t})}let rZ=[];function rY(){return rZ.filter(rt).map(rr)}function rJ(){return rZ.map(rr)}function rQ(e){let t=rs(rZ,t=>rr(t)===e);return t?t.status:null}let rX=!1;function r0(e,t,n,r){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(nJ(39,!1));let t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(nJ(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(nJ(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(nJ(24,!1));if(!r6(e.customProps))throw Error(nJ(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(nJ(20,!1));if(!t)throw Error(nJ(23,!1));if("function"!=typeof n)throw Error(nJ(24,!1));if(!r6(r))throw Error(nJ(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:r5(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(or||rX||(rX=!0,setTimeout(()=>{or||console.warn(nJ(1,!1))},5e3)),-1!==rJ().indexOf(l.name))throw Error(nJ(21,!1,l.name));rZ.push(ra({loadErrorTime:null,status:nX,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),rT&&(rW(),ot())}function r1(e=window.location){return rZ.filter(t=>t.activeWhen(e)).map(rr)}function r2(e){if(0===rZ.filter(t=>rr(t)===e).length)throw Error(nJ(25,!1,e));return(rT?r4(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rZ.map(rr).indexOf(e);rZ.splice(t,1)})}function r4(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nJ(26,!1));let n=rs(rZ,t=>rr(t)===e);if(!n)throw Error(nJ(27,!1,e));let r=rz[rr(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rG(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,r3(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rG(n,()=>e,t,r),r3(n,t,r)}),e}}function r3(e,t,n){Promise.resolve().then(()=>{if(rs(r1(),t=>t===rr(e)))return oe()}).then(()=>rf(e).then(rH).then(()=>{t(),setTimeout(()=>{ot()})})).catch(n)}function r6(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function r5(e,t){let n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],o=r&&"/"===n;(!r&&":"===n||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let r7=!1,r9=[],r8=rT&&window.location.href;function oe(){return ot()}function ot(e=[],t,n=!1){let r,o,i,a,s;if(r7)return new Promise((e,n)=>{r9.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],o=[],i=[],a=[],s=(new Date).getTime(),rZ.forEach(e=>{let t=e.status!==re&&rn(e);switch(e.status){case n8:t&&s-e.loadErrorTime>=200&&i.push(e);break;case nX:case n0:t&&i.push(e);break;case n1:case n4:!t&&rz[rr(e)]?r.push(e):t&&a.push(e);break;case n6:t||o.push(e)}}),{appsToUnload:r,appsToUnmount:o,appsToLoad:i,appsToMount:a}),p,f=[],h=r8,m=r8=window.location.href;return or?(r7=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(f).then(n=>{if(n.some(e=>e))return rL.call(window.history,history.state,"",h.substring(location.origin.length)),r8=location.href,r7=!1,ot(e,t,!0);let r=l.map(rH),o=Promise.all(u.map(rf).map(e=>e.then(rH)).concat(r));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>rj(e).then(e=>on(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>on(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(rj)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(nJ(42,!1))),console.warn(e),!1)))}function g(){let t=rY();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(r7=!1,r9.length>0){let e=r9;r9=[],ot(e)}return t}function b(){n||(e.forEach(e=>{rA(e.eventArguments)}),rA(t))}function v(e=!1,n){let r={},o={[n6]:[],[n4]:[],[nX]:[],[re]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,n6)}),l.forEach(e=>{a(e,nX)}),u.forEach(e=>{a(e,n4)})):p.forEach(e=>{a(e)});let i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return n&&ra(i.detail,n),i;function a(e,t){let n=rr(e);t=t||rQ(n),r[n]=t,(o[t]=o[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nH(`single-spa:${e}`,t))}}function on(e,t){return rn(e)?rp(e).then(e=>t.then(()=>rn(e)?ry(e):e)):t.then(()=>e)}let or=!1;function oo(e){or=!0,rT&&(rB(e),ot())}rT&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rZ]},reroute:ot,NOT_LOADED:nX,toLoadPromise:rj,toBootstrapPromise:rp,unregisterApplication:r2,getProfilerData:function(){return rd}});let oi={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"},oa=e=>"string"==typeof e,os=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},ol=e=>null==e?"":""+e,ou=/###/g,oc=e=>e&&e.indexOf("###")>-1?e.replace(ou,"."):e,od=e=>!e||oa(e),op=(e,t,n)=>{let r=oa(t)?t.split("."):t,o=0;for(;o<r.length-1;){if(od(e))return{};let t=oc(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return od(e)?{}:{obj:e,k:oc(r[o])}},of=(e,t,n)=>{let{obj:r,k:o}=op(e,t,Object);if(void 0!==r||1===t.length){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=op(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=op(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},oh=(e,t)=>{let{obj:n,k:r}=op(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},om=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?oa(e[r])||e[r]instanceof String||oa(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):om(e[r],t[r],n):e[r]=t[r]);return e};var oy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let og=e=>oa(e)?e.replace(/[&<>"'\/]/g,e=>oy[e]):e,ob=[" ",",","?","!",";"],ov=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),ow=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),o=e;for(let e=0;e<r.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},o_=e=>e?.replace("_","-"),ox={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class oS{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ox,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(oa(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new oS(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new oS(this.logger,e)}}var oE=new oS;class oD{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}class oO extends oD{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let o,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):oa(n)&&i?o.push(...n.split(i)):o.push(n)));let s=oh(this.data,o);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&oa(n))?ow(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),of(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(oa(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=oh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?om(s,n,o):s={...s,...n},of(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var oP={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,o)??t}),t}};let ok=Symbol("i18next/PATH_KEY");function oC(e,t){let n,r,o,{[ok]:i}=e((r=[],(o=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===ok)?r:(r.push(t),(n=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let oj={},oT=e=>!oa(e)&&"boolean"!=typeof e&&"number"!=typeof e;class oR extends oD{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=oE.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let o=oT(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=ob.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let o=ov.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:oa(o)?[o]:o};let i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:oa(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=oC(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;let p=this.resolve(e,r),f=p?.res,h=p?.usedKey||a,m=p?.exactUsedKey||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!oa(r.count),v=oR.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",S=b&&!r.ordinal&&0===r.count,E=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue,D=f;g&&!f&&v&&(D=E);let O=oT(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(oa(y)&&Array.isArray(D))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){let e=Array.isArray(D),t=e?[]:{},n=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${n}${i}${e}`;v&&!f?t[e]=this.translate(o,{...r,defaultValue:oT(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}f=t}}else if(g&&oa(y)&&Array.isArray(f))(f=f.join(y))&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(f)&&v&&(t=!0,f=E),this.isValidLookup(f)||(o=!0,f=a);let s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=v&&E!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?E:f),i){let e=this.resolve(a,{...r,keySeparator:!1});e&&e.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.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let o=v&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||E)})}):n(e,a,E))}f=this.extendTranslation(f,e,r,p,n),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,r))}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let i;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let a=oa(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=n.replace&&!oa(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let i=n.postProcess||this.options.postProcess,a=oa(i)?[i]:i;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=oP.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return oa(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!oa(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(oa(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,!oj[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(oj[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${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!!!")),f.forEach(r=>{let a;if(this.isValidLookup(n))return;i=r;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),p){let r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(r+e.replace(o,this.options.pluralSeparator)),s.push(r+e),d&&s.push(r+n))}}for(;a=s.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!oa(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}class oM{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oE.create("languageUtils")}getScriptPartFromCode(e){if(!(e=o_(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=o_(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(oa(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&(e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),oa(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return oa(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):oa(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let oN={zero:0,one:1,two:2,few:3,many:4,other:5},oA={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class oI{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=oE.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=o_("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{n=new Intl.PluralRules(r,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),oA;if(!e.match(/-|_/))return oA;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[i]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>oN[e]-oN[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let o$=(e,t,n,r=".",o=!0)=>{let i,a=void 0!==(i=oh(e,n))?i:oh(t,n);return!a&&o&&oa(n)&&void 0===(a=ow(e,n,r))&&(a=ow(t,n,r)),a};class oL{constructor(e={}){this.logger=oE.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:og,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=o$(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(o$(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof u){let t=u(e,o,r);i=oa(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i="";else oa(i)||this.useRawValueToEscape||(i=ol(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i,a=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),o=`{${r[1]}`;e=r[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(i=(i={...n}).replace&&!oa(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),(o=t(a.call(this,r[1].trim(),i),i))&&r[0]===e&&!oa(o))return o;oa(o)||(o=ol(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}let oF=e=>{let t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=r+JSON.stringify(i),s=t[a];return s||(s=e(o_(r),o),t[a]=s),s(n)}},oB=e=>(t,n,r)=>e(o_(n),r)(t);class oV{constructor(e={}){this.logger=oE.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?oF:oB;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=oF(t)}format(e,t,n,r={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let o=r[1].substring(0,r[1].length-1);"currency"===t&&0>o.indexOf(":")?n.currency||(n.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{let a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class oU extends oD{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=oE.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let a={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:o,k:i}=op(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2===s.length){try{let n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();oa(e)&&(e=this.languageUtils.toResolveHierarchy(e)),oa(t)&&(t=[t]);let o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${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!!!");if(null!=n&&""!==n){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let oW=()=>({debug:!1,initAsync:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),oa(e[1])&&(t.defaultValue=e[1]),oa(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),oK=e=>(oa(e.ns)&&(e.ns=[e.ns]),oa(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oa(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),oz=()=>{};class oH extends oD{constructor(e={},t){if(super(),this.options=oK(e),this.services={},this.logger=oE,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(oa(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=oW();this.options={...n,...this.options,...oK(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?oE.init(r(this.modules.logger),this.options):oE.init(null,this.options),e=this.modules.formatter?this.modules.formatter:oV;let t=new oM(this.options);this.store=new oO(this.options.resources,this.options);let o=this.services;o.logger=oE,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new oI(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new oL(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new oU(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new oR(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=oz),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=os(),i=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=oz){let n=t,r=oa(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=os();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=oz),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(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&&oP.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=os();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let n=oa(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(oa(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){let r=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=oC(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=oC(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return oa(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let i=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!r||i(o,e)))}loadNamespaces(e,t){let n=os();return this.options.ns?(oa(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=os();oa(e)&&(e=[e]);let r=this.options.preload||[],o=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new oM(oW());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new oH(e,t)}cloneInstance(e={},t=oz){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},o=new oH(r);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new oO(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),o.services.resourceStore=o.store),o.translator=new oR(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let oq=oH.createInstance();oq.createInstance=oH.createInstance,oq.createInstance,oq.dir,oq.init,oq.loadResources,oq.reloadResources,oq.use,oq.changeLanguage,oq.getFixedT,oq.t,oq.exists,oq.setDefaultNamespace,oq.hasLoadedNamespace,oq.loadNamespaces,oq.loadLanguages;let oG=oq.default||oq;function oZ(e,t,n,r){return oG.t(t,{ns:e,defaultValue:n,...r})}function oY(e,t,n){return oi[e]?oZ("core",e,t??oi[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function oJ(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=oQ(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function oQ(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function oX({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=oJ(e,t).replace(window.location.origin,""),o=new URL(r,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(oY("navigateNonHttp"));r.startsWith(n)?rN(r):window.location.assign(r)}oG.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let o0="openmrs:history";function o1(e){let t=JSON.parse(sessionStorage.getItem(o0)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(o0,JSON.stringify(t))}function o2(){0===JSON.parse(sessionStorage.getItem(o0)??"[]").length&&document.referrer&&o1(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=o4();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(o0,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?o3({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&o1(window.location.href)})}function o4(){return JSON.parse(sessionStorage.getItem(o0)??"[]")}function o3({toUrl:e}){let t=o4(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);oX({to:t[n]}),sessionStorage.setItem(o0,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function o6(){sessionStorage.removeItem(o0)}let o5="${openmrsSpaBase}/login",o7={redirectAuthFailure:{enabled:{_type:tC.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:tC.String,_default:o5,_validators:[nA.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:tC.Array,_default:[401],_elements:{_type:tC.Number,_validators:[nA.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:tC.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:tC.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function o9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let o8="/ws/rest/v1",ie="/ws/fhir2/R4",it=`${o8}/session`;function ir(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function io(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 n=ir(e);if(t.headers||(t.headers={}),eD(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,e.startsWith(o8)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ie)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let r=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await nl("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===ir(it)||204===e.status)&&oX({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 n===ir(it)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(o6(),oX({to:t.url||e.headers.get("location")||o5}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new ia(n,e,o,r)},t=>{throw new ia(n,e,null,r)})})}function ii(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let n=new AbortController;return t.signal=n.signal,new eg.c(r=>{let o=!1;return io(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class ia extends Error{constructor(e,t,n,r){super(),o9(this,"response",void 0),o9(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`,r.message=this.message,this.responseBody=n,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 nf(e,t){return nh(t.map(({[e]:t})=>t).filter(e=>!!e))}function nh(e){return e.reduce((e,t)=>e1(e,t,t1),{})}function nm(e,t,n=""){for(let r of Object.keys(t)){let o=t[r],i=n+"."+r,a=e[r];if(!e.hasOwnProperty(r)){("extensionSlots"!==r||""===n)&&nS(i,`Unknown config key '${i}' provided. Ignoring.`);continue}(function e(t,n,r){ng(r,t._type,n),n_(n)?t._type===tO.Object?function(t,n,r){if(t._elements)for(let o of Object.keys(n)){let i=n[o];e(t._elements,i,`${r}.${o}`)}}(t,n,r):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||nm(t,n,r):t._type===tO.Array&&function(t,n,r){if(ng(r,tO.Array,n)){if(nw(t._elements))for(let o=0;o<n.length;o++)e(t._elements,n[o],`${r}[${o}]`);for(let e=0;e<n.length;e++)ng(`${r}[${e}]`,t._elements?._type,n[e])}}(t,n,r)})(a,o,i)}}function ny(e,t,n=""){if(e){if(t!==e._default&&nb(n,e._validators,t),n_(t))for(let r of Object.keys(t)){let o=t[r],i=n+"."+r,a=e[r];e._type===tO.Object&&e._elements?ny(e._elements,o,i):ny(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)ny(e._elements,t[r],`${n}[${r}]`)}}function ng(e,t,n){return!t||nb(e,[{Array:tk,Boolean:tC,ConceptUuid:tN,Number:tj,Object:tR,String:tT,UUID:tN,PersonAttributeTypeUuid:tN,PatientIdentifierTypeUuid:tN}[t]],n)}function nb(e,t,n){let r=!0;if(t)try{for(let o of t){let t=o(n);if("string"==typeof t){let o="object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`;nS(e,o),r=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
+ ${t}`)}return r}let nv=(e,t)=>{let n=structuredClone(t);if(!e)return n;for(let t of Object.keys(e)){let r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);let e=o._elements;if(r&&nw(e)){if(o._type===tO.Array&&Array.isArray(r)){let o=r.map(t=>nv(e,t));n[t]=o}else if(o._type===tO.Object)for(let t of Object.keys(r))r[t]=nv(e,r[t])}}else if(n_(o)){let e=r??{};n_(e)&&(n[t]=nv(o,e))}}return n};function nw(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function n_(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let nx=new Set;function nS(e,t){let n=`${e}:::${t}`;nx||(nx=new Set),nx.has(n)||(console.error(t),nx.add(n))}function nE(e){e?nx.forEach(t=>{t.startsWith(e)&&nx.delete(t)}):nx.clear()}function nD(){t4.forEach(e=>e()),t4.length=0,t7.clear(),nl.clear(),nc.clear(),nu.clear(),t6()}let nO={"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:tO.Object,_default:{},_validators:[tP(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(", ")}.`})]}},nP={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tO.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tO.String,_default:void 0}},...nO},nk=(e,t)=>tP(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nC=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tP(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},nj=nC([]),nT=e=>tP(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nR={inRange:nk,isUrl:nj,isUrlWithTemplateParameters:nC,oneOf:nT};var nN=n(82034);let nA=Z("breadcrumbs",[]);function nM(e){return nI([e])}function nI(e){let t=[...n$(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,nN.pathToRegexp)(e.matcher).regexp:(0,nN.pathToRegexp)(e.path).regexp,settings:e}))];nA.setState(t,!0)}function n$(){return nA.getState()}function nL(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=nL(e,n.join("/"));if(t)return t}}(e,t)}function nF(e,t){if(e.length>0){let n=nL(e,t);if(n){let t=[n],r=nL(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nL(e,r.settings.parent);return t.reverse()}}return[]}function nB(e){return nF(n$(),e)}var nV=Object.freeze({__proto__:null,get start(){return ot},get ensureJQuerySupport(){return rB},get setBootstrapMaxTime(){return r_},get setMountMaxTime(){return rx},get setUnmountMaxTime(){return rS},get setUnloadMaxTime(){return rE},get registerApplication(){return rJ},get unregisterApplication(){return rX},get getMountedApps(){return rG},get getAppStatus(){return rZ},get unloadApplication(){return r0},get checkActivityFunctions(){return rQ},get getAppNames(){return rq},get pathToActiveWhen(){return r4},get navigateToUrl(){return rT},get patchHistoryApi(){return r$},get triggerAppChange(){return r7},get addErrorHandler(){return nz},get removeErrorHandler(){return nG},get mountRootParcel(){return ry},get NOT_LOADED(){return nY},get LOADING_SOURCE_CODE(){return nJ},get NOT_BOOTSTRAPPED(){return nQ},get BOOTSTRAPPING(){return nX},get NOT_MOUNTED(){return n0},get MOUNTING(){return n1},get UPDATING(){return n4},get LOAD_ERROR(){return n5},get MOUNTED(){return n2},get UNLOADING(){return n6},get UNMOUNTING(){return n3},get SKIP_BECAUSE_BROKEN(){return n7}}),nU=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nW=!function(){try{var e=new nU("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 n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:nU;let nK=[];function nH(e,t,n){let r=nZ(e,t,n);nK.length?nK.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nz(e){if("function"!=typeof e)throw Error(nq(28,!1));nK.push(e)}function nG(e){if("function"!=typeof e)throw Error(nq(29,!1));let t=!1;return nK=nK.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nq(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function nZ(e,t,n){let r,o=`${rn(t)} '${re(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(nq(30,!1,t.status,re(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=re(t),t.status=n,r}let nY="NOT_LOADED",nJ="LOADING_SOURCE_CODE",nQ="NOT_BOOTSTRAPPED",nX="BOOTSTRAPPING",n0="NOT_MOUNTED",n1="MOUNTING",n2="MOUNTED",n4="UPDATING",n3="UNMOUNTING",n6="UNLOADING",n5="LOAD_ERROR",n7="SKIP_BECAUSE_BROKEN";function n9(e){return e.status===n2}function n8(e){try{return e.activeWhen(window.location)}catch(t){return nH(t,e,n7),!1}}function re(e){return e.name}function rt(e){return!!e.unmountThisParcel}function rn(e){return rt(e)?"parcel":"application"}function rr(){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 ro(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function ri(e){return e&&("function"==typeof e||Array.isArray(e)&&!ro(e,e=>"function"!=typeof e))}function ra(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=rn(e),o=re(e);return function(e){return n.reduce((n,i,a)=>n.then(()=>{let n=i(e);return rs(n)?n:Promise.reject(nq(15,!1,r,o,t,a))}),Promise.resolve())}}function rs(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let rl=[];function ru(e,t){return Promise.resolve().then(()=>e.status!==nQ?e:(e.status=nX,e.bootstrap?rD(e,"bootstrap").then(n).catch(n=>{if(t)throw nZ(n,e,n7);return nH(n,e,n7),e}):Promise.resolve().then(n)));function n(){return e.status=n0,e}}function rc(e,t){return Promise.resolve().then(()=>{if(e.status!==n2)return e;return e.status=n3,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,r=>n().then(()=>{let n=Error(r.message);if(t)throw nZ(n,e,n7);nH(n,e,n7)})).then(()=>e);function n(){return rD(e,"unmount").then(()=>{e.status=n0},n=>{if(t)throw nZ(n,e,n7);nH(n,e,n7)})}})}let rd=!1,rp=!1;function rf(e,t){return Promise.resolve().then(()=>e.status!==n0?e:(rd||(window.dispatchEvent(new nW("single-spa:before-first-mount")),rd=!0),e.status=n1,rD(e,"mount").then(()=>(e.status=n2,rp||(window.dispatchEvent(new nW("single-spa:first-mount")),rp=!0),e)).catch(n=>{return e.status=n2,rc(e,!0).then(r,r);function r(){if(t)throw nZ(n,e,n7);return nH(n,e,n7),e}})))}let rh=0,rm={parcels:{}};function ry(){return rg.apply(rm,arguments)}function rg(e,t){let n,r,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nq(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nq(3,!1,typeof e.name));let a=rh++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(nq(4,!1,s,typeof t));if(!t.domElement)throw Error(nq(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?nJ:nQ,customProps:t,parentName:re(i),unmountThisParcel:()=>f.then(()=>{if(c.status!==n2)throw Error(nq(6,!1,s,c.status));return rc(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=n7,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nq(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(nq(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!ri(e.bootstrap))throw Error(nq(9,!1,s));if(!ri(e.mount))throw Error(nq(10,!1,s));if(!ri(e.unmount))throw Error(nq(11,!1,s));if(e.update&&!ri(e.update))throw Error(nq(12,!1,s));let t=ra(e,"bootstrap"),r=ra(e,"mount"),o=ra(e,"unmount");c.status=nQ,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=o,c.timeouts=rO(e.timeouts),e.update&&(c.update=ra(e,"update"),n.update=function(e){return c.customProps=e,rb(Promise.resolve().then(()=>{if(c.status!==n2)throw Error(nq(32,!1,re(c)));return c.status=n4,rD(c,"update").then(()=>(c.status=n2,c)).catch(e=>{throw nZ(e,c,n7)})}))})})).then(()=>ru(c,!0)),f=p.then(()=>rf(c,!0)),h=new Promise((e,t)=>{r=e,o=t});return n={mount:()=>rb(Promise.resolve().then(()=>{if(c.status!==n0)throw Error(nq(13,!1,s,c.status));return i.parcels[a]=c,rf(c)})),unmount:()=>rb(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rb(d),bootstrapPromise:rb(p),mountPromise:rb(f),unmountPromise:rb(h)}}function rb(e){return e.then(()=>null)}function rv(e){let t=re(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nq(40,!1),t,n));let r=rr({},n,{name:t,mountParcel:rg.bind(e),singleSpa:nV});return rt(e)&&(r.unmountSelf=e.unmountThisParcel),r}let rw={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 r_(e,t,n){if("number"!=typeof e||e<=0)throw Error(nq(16,!1));rw.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rx(e,t,n){if("number"!=typeof e||e<=0)throw Error(nq(17,!1));rw.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rS(e,t,n){if("number"!=typeof e||e<=0)throw Error(nq(18,!1));rw.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rE(e,t,n){if("number"!=typeof e||e<=0)throw Error(nq(19,!1));rw.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rD(e,t){let n=e.timeouts[t],r=n.warningMillis,o=rn(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](rv(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nq(31,!1,t,o,re(e),n.millis);function c(e){s||(!0===e?(l=!0,n.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*r+r<n.millis&&setTimeout(()=>c(e+1),r)))}})}function rO(e){let t={};for(let n in rw)t[n]=rr({},rw[n],e&&e[n]||{});return t}function rP(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nY&&e.status!==n5?e:(e.status=nJ,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rv(e));if(!rs(r))throw n=!0,Error(nq(33,!1,re(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!ri(t.bootstrap)&&(r=35),ri(t.mount)||(r=36),ri(t.unmount)||(r=37);let o=rn(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nq(r,!1,o,re(e),n),t),nH(void 0,e,n7),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=rr({},e.devtools.overlays,t.devtools.overlays)),e.status=nQ,e.bootstrap=ra(t,"bootstrap"),e.mount=ra(t,"mount"),e.unmount=ra(t,"unmount"),e.unload=ra(t,"unload"),e.timeouts=rO(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=n7:(r=n5,e.loadErrorTime=(new Date).getTime()),nH(t,e,r),e}))})}let rk="u">typeof window,rC={hashchange:[],popstate:[]},rj=["hashchange","popstate"];function rT(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(nq(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rL(window.location.href),r=rL(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function rR(e){if(e){let t=e[0].type;rj.indexOf(t)>=0&&rC[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rN(){r9([],arguments)}function rA(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),i=window.location.href;return o&&n===i||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let rM=null,rI=!1;function r$(e){if(rI)throw Error(nq(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rI=!0,rM=window.history.replaceState,window.addEventListener("hashchange",rN),window.addEventListener("popstate",rN);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rj.indexOf(e)>=0)||ro(rC[e],e=>e===n))return t.apply(this,arguments);rC[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rj.indexOf(e)>=0&&(rC[e]=rC[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=rA(window.history.pushState,"pushState"),window.history.replaceState=rA(rM,"replaceState")}function rL(e){let t=document.createElement("a");return t.href=e,t}rk&&(window.singleSpaNavigate?console.warn(nq(41,!1)):window.singleSpaNavigate=rT);let rF=!1;function rB(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rF){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rV.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rV.call(this,n,window.removeEventListener,e,t,arguments)},rF=!0}}function rV(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach(e=>{rj.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,o))}let rU={};function rW(e){return Promise.resolve().then(()=>{let t=rU[re(e)];if(!t)return e;if(e.status===nY)return rK(e,t),e;if(e.status===n6)return t.promise.then(()=>e);if(e.status!==n0&&e.status!==n5)return e;let n=e.status===n5?Promise.resolve():rD(e,"unload");return e.status=n6,n.then(()=>(rK(e,t),e)).catch(n=>(delete rU[re(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nH(n,e,n7),t.reject(n),e))})}function rK(e,t){delete rU[re(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nY,t.resolve()}function rH(e,t,n,r){rU[re(e)]={app:e,resolve:n,reject:r},Object.defineProperty(rU[re(e)],"promise",{get:t})}let rz=[];function rG(){return rz.filter(n9).map(re)}function rq(){return rz.map(re)}function rZ(e){let t=ro(rz,t=>re(t)===e);return t?t.status:null}let rY=!1;function rJ(e,t,n,r){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(nq(39,!1));let t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(nq(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(nq(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(nq(24,!1));if(!r2(e.customProps))throw Error(nq(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(nq(20,!1));if(!t)throw Error(nq(23,!1));if("function"!=typeof n)throw Error(nq(24,!1));if(!r2(r))throw Error(nq(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:r4(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(oe||rY||(rY=!0,setTimeout(()=>{oe||console.warn(nq(1,!1))},5e3)),-1!==rq().indexOf(l.name))throw Error(nq(21,!1,l.name));rz.push(rr({loadErrorTime:null,status:nY,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),rk&&(rB(),r9())}function rQ(e=window.location){return rz.filter(t=>t.activeWhen(e)).map(re)}function rX(e){if(0===rz.filter(t=>re(t)===e).length)throw Error(nq(25,!1,e));return(rk?r0(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rz.map(re).indexOf(e);rz.splice(t,1)})}function r0(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nq(26,!1));let n=ro(rz,t=>re(t)===e);if(!n)throw Error(nq(27,!1,e));let r=rU[re(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rH(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,r1(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rH(n,()=>e,t,r),r1(n,t,r)}),e}}function r1(e,t,n){Promise.resolve().then(()=>{if(ro(rQ(),t=>t===re(e)))return r7()}).then(()=>rc(e).then(rW).then(()=>{t(),setTimeout(()=>{r9()})})).catch(n)}function r2(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function r4(e,t){let n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],o=r&&"/"===n;(!r&&":"===n||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let r3=!1,r6=[],r5=rk&&window.location.href;function r7(){return r9()}function r9(e=[],t,n=!1){let r,o,i,a,s;if(r3)return new Promise((e,n)=>{r6.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],o=[],i=[],a=[],s=(new Date).getTime(),rz.forEach(e=>{let t=e.status!==n7&&n8(e);switch(e.status){case n5:t&&s-e.loadErrorTime>=200&&i.push(e);break;case nY:case nJ:t&&i.push(e);break;case nQ:case n0:!t&&rU[re(e)]?r.push(e):t&&a.push(e);break;case n2:t||o.push(e)}}),{appsToUnload:r,appsToUnmount:o,appsToLoad:i,appsToMount:a}),p,f=[],h=r5,m=r5=window.location.href;return oe?(r3=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(f).then(n=>{if(n.some(e=>e))return rM.call(window.history,history.state,"",h.substring(location.origin.length)),r5=location.href,r3=!1,r9(e,t,!0);let r=l.map(rW),o=Promise.all(u.map(rc).map(e=>e.then(rW)).concat(r));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>rP(e).then(e=>r8(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>r8(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(rP)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(nq(42,!1))),console.warn(e),!1)))}function g(){let t=rG();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(r3=!1,r6.length>0){let e=r6;r6=[],r9(e)}return t}function b(){n||(e.forEach(e=>{rR(e.eventArguments)}),rR(t))}function v(e=!1,n){let r={},o={[n2]:[],[n0]:[],[nY]:[],[n7]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,n2)}),l.forEach(e=>{a(e,nY)}),u.forEach(e=>{a(e,n0)})):p.forEach(e=>{a(e)});let i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return n&&rr(i.detail,n),i;function a(e,t){let n=re(e);t=t||rZ(n),r[n]=t,(o[t]=o[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nW(`single-spa:${e}`,t))}}function r8(e,t){return n8(e)?ru(e).then(e=>t.then(()=>n8(e)?rf(e):e)):t.then(()=>e)}let oe=!1;function ot(e){oe=!0,rk&&(r$(e),r9())}rk&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rz]},reroute:r9,NOT_LOADED:nY,toLoadPromise:rP,toBootstrapPromise:ru,unregisterApplication:rX,getProfilerData:function(){return rl}});let on={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"},or=e=>"string"==typeof e,oo=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},oi=e=>null==e?"":""+e,oa=/###/g,os=e=>e&&e.indexOf("###")>-1?e.replace(oa,"."):e,ol=e=>!e||or(e),ou=(e,t,n)=>{let r=or(t)?t.split("."):t,o=0;for(;o<r.length-1;){if(ol(e))return{};let t=os(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ol(e)?{}:{obj:e,k:os(r[o])}},oc=(e,t,n)=>{let{obj:r,k:o}=ou(e,t,Object);if(void 0!==r||1===t.length){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=ou(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=ou(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},od=(e,t)=>{let{obj:n,k:r}=ou(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},op=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?or(e[r])||e[r]instanceof String||or(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):op(e[r],t[r],n):e[r]=t[r]);return e};var of={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let oh=e=>or(e)?e.replace(/[&<>"'\/]/g,e=>of[e]):e,om=[" ",",","?","!",";"],oy=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),og=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),o=e;for(let e=0;e<r.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},ob=e=>e?.replace("_","-"),ov={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ow{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ov,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(or(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ow(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ow(this.logger,e)}}var o_=new ow;class ox{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let o=0;o<r;o++)n.apply(n,[e,...t])})}}class oS extends ox{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let o,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):or(n)&&i?o.push(...n.split(i)):o.push(n)));let s=od(this.data,o);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&or(n))?og(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),oc(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(or(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=od(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?op(s,n,o):s={...s,...n},oc(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var oE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,o)??t}),t}};let oD=Symbol("i18next/PATH_KEY");function oO(e,t){let n,r,o,{[oD]:i}=e((r=[],(o=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===oD)?r:(r.push(t),(n=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let oP={},ok=e=>!or(e)&&"boolean"!=typeof e&&"number"!=typeof e;class oC extends ox{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=o_.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let o=ok(r.res);return!1!==n.returnObjects||!o}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=om.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let o=oy.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:or(o)?[o]:o};let i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:or(o)?[o]:o}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=oO(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;let p=this.resolve(e,r),f=p?.res,h=p?.usedKey||a,m=p?.exactUsedKey||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!or(r.count),v=oC.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",S=b&&!r.ordinal&&0===r.count,E=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue,D=f;g&&!f&&v&&(D=E);let O=ok(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(or(y)&&Array.isArray(D))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(i){let e=Array.isArray(D),t=e?[]:{},n=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${n}${i}${e}`;v&&!f?t[e]=this.translate(o,{...r,defaultValue:ok(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...r,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}f=t}}else if(g&&or(y)&&Array.isArray(f))(f=f.join(y))&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,o=!1;!this.isValidLookup(f)&&v&&(t=!0,f=E),this.isValidLookup(f)||(o=!0,f=a);let s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:f,d=v&&E!==f&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?E:f),i){let e=this.resolve(a,{...r,keySeparator:!1});e&&e.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.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let o=v&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||E)})}):n(e,a,E))}f=this.extendTranslation(f,e,r,p,n),o&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,r))}return o?(p.res=f,p.usedParams=this.getUsedParamsDetails(r),p):f}extendTranslation(e,t,n,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let i;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let a=or(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=n.replace&&!or(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let i=n.postProcess||this.options.postProcess,a=or(i)?[i]:i;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=oE.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,o,i,a;return or(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!or(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(or(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,!oP[`${f[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(oP[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${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!!!")),f.forEach(r=>{let a;if(this.isValidLookup(n))return;i=r;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),p){let r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(r+e.replace(o,this.options.pluralSeparator)),s.push(r+e),d&&s.push(r+n))}}for(;a=s.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!or(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}class oj{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=o_.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ob(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=ob(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(or(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&(e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),or(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return or(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):or(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let oT={zero:0,one:1,two:2,few:3,many:4,other:5},oR={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class oN{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=o_.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=ob("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{n=new Intl.PluralRules(r,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),oR;if(!e.match(/-|_/))return oR;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[i]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>oT[e]-oT[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let oA=(e,t,n,r=".",o=!0)=>{let i,a=void 0!==(i=od(e,n))?i:od(t,n);return!a&&o&&or(n)&&void 0===(a=og(e,n,r))&&(a=og(t,n,r)),a};class oM{constructor(e={}){this.logger=o_.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:oh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=f?f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=oA(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(oA(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof u){let t=u(e,o,r);i=or(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i="";else or(i)||this.useRawValueToEscape||(i=oi(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,o,i,a=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),o=`{${r[1]}`;e=r[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(i=(i={...n}).replace&&!or(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),(o=t(a.call(this,r[1].trim(),i),i))&&r[0]===e&&!or(o))return o;or(o)||(o=oi(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}let oI=e=>{let t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=r+JSON.stringify(i),s=t[a];return s||(s=e(ob(r),o),t[a]=s),s(n)}},o$=e=>(t,n,r)=>e(ob(n),r)(t);class oL{constructor(e={}){this.logger=o_.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?oI:o$;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=oI(t)}format(e,t,n,r={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let o=r[1].substring(0,r[1].length-1);"currency"===t&&0>o.indexOf(":")?n.currency||(n.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{let a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class oF extends ox{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=o_.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let a={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:o,k:i}=ou(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2===s.length){try{let n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();or(e)&&(e=this.languageUtils.toResolveHierarchy(e)),or(t)&&(t=[t]);let o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${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!!!");if(null!=n&&""!==n){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let oB=()=>({debug:!1,initAsync:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),or(e[1])&&(t.defaultValue=e[1]),or(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),oV=e=>(or(e.ns)&&(e.ns=[e.ns]),or(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),or(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),oU=()=>{};class oW extends ox{constructor(e={},t){if(super(),this.options=oV(e),this.services={},this.logger=o_,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(or(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=oB();this.options={...n,...this.options,...oV(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?o_.init(r(this.modules.logger),this.options):o_.init(null,this.options),e=this.modules.formatter?this.modules.formatter:oL;let t=new oj(this.options);this.store=new oS(this.options.resources,this.options);let o=this.services;o.logger=o_,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new oN(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(o.formatter=r(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new oM(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new oF(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new oC(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=oU),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=oo(),i=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=oU){let n=t,r=or(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=oo();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=oU),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(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&&oE.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=oo();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let n=or(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(or(t)?[t]:t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){let r=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=oO(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=oO(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return or(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let i=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!r||i(o,e)))}loadNamespaces(e,t){let n=oo();return this.options.ns?(or(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=oo();or(e)&&(e=[e]);let r=this.options.preload||[],o=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new oj(oB());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new oW(e,t)}cloneInstance(e={},t=oU){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},o=new oW(r);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new oS(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),o.services.resourceStore=o.store),o.translator=new oC(o.services,r),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let oK=oW.createInstance();oK.createInstance=oW.createInstance,oK.createInstance,oK.dir,oK.init,oK.loadResources,oK.reloadResources,oK.use,oK.changeLanguage,oK.getFixedT,oK.t,oK.exists,oK.setDefaultNamespace,oK.hasLoadedNamespace,oK.loadNamespaces,oK.loadLanguages;let oH=oK.default||oK;function oz(e,t,n,r){return oH.t(t,{ns:e,defaultValue:n,...r})}function oG(e,t,n){return on[e]?oz("core",e,t??on[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function oq(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=oZ(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function oZ(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function oY({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=oq(e,t).replace(window.location.origin,""),o=new URL(r,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(oG("navigateNonHttp"));r.startsWith(n)?rT(r):window.location.assign(r)}oH.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let oJ="openmrs:history";function oQ(e){let t=JSON.parse(sessionStorage.getItem(oJ)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(oJ,JSON.stringify(t))}function oX(){0===JSON.parse(sessionStorage.getItem(oJ)??"[]").length&&document.referrer&&oQ(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=o0();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(oJ,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?o1({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&oQ(window.location.href)})}function o0(){return JSON.parse(sessionStorage.getItem(oJ)??"[]")}function o1({toUrl:e}){let t=o0(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);oY({to:t[n]}),sessionStorage.setItem(oJ,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function o2(){sessionStorage.removeItem(oJ)}let o4="${openmrsSpaBase}/login",o3={redirectAuthFailure:{enabled:{_type:tO.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:tO.String,_default:o4,_validators:[nR.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:tO.Array,_default:[401],_elements:{_type:tO.Number,_validators:[nR.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:tO.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:tO.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function o6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let o5="/ws/rest/v1",o7="/ws/fhir2/R4",o9=`${o5}/session`;function o8(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function ie(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 n=o8(e);if(t.headers||(t.headers={}),ex(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,e.startsWith(o5)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(o7)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let r=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await ni("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===o8(o9)||204===e.status)&&oY({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 n===o8(o9)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(o2(),oY({to:t.url||e.headers.get("location")||o4}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new ir(n,e,o,r)},t=>{throw new ir(n,e,null,r)})})}function it(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let n=new AbortController;return t.signal=n.signal,new eh.c(r=>{let o=!1;return ie(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class ir extends Error{constructor(e,t,n,r){super(),o6(this,"response",void 0),o6(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`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
13
13
  ${r.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let is=Z("session",{loaded:!1,session:null}),il=0;function iu(e={includeAuthStatus:!0}){return(il<Date.now()-6e4||!is.getState().loaded)&&ip(),new eg.c(t=>{let n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(is.getState()),is.subscribe(n)})}function ic(){return(il<Date.now()-6e4||!is.getState().loaded)&&ip(),is}function id(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 ip(e,t){il=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),iw(io(it,{headers:n}))}function ih(){is.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function im(e,t){var n,r;if(void 0===t)return!e;if(!e)return!0;return n=e,r=t,("string"==typeof n?!ee(r.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!ee(r.privileges.find(t=>e===t.display))):(ee(n)||console.error(`Could not understand privileges "${n}"`),!0))||!ee(t.roles.find(e=>"System Developer"===e.display))}function iy(){let e,t;return new Promise(n=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(is.getState()),e||(t=is.subscribe(r))})}function ig(){return new Promise((e,t)=>{iu().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function ib(e,t){return iw(io(it,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function iv(e,t,n){return n||(n=new AbortController),await io(`${o8}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),ip()}function iw(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},is.setState(r),t(r)):(r={loaded:!1,session:null},is.setState(r),n(r))}).catch(e=>{I(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};is.setState(t),n(t)})})}function i_(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}is.subscribe(e=>{e.loaded&&e.session&&id(e.session)});let ix={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function iS(){nt("@openmrs/esm-api",o7),ip()}let iE="import-map-override:",iD="import-map-overrides-disabled",iO="import-map-overrides:change",iP=!1,ik=null,iC=null;async function ij(){return iC??(iC=iT().then(({map:e,complete:t})=>(t||(iC=null),e))),iC}async function iT(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],n=!0;for(let r=0;r<e.length;r++){let o=e[r];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){n=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${r}`,e)}}return{map:iR(t),complete:n}}function iR(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function iM(){let e={};try{let t=iL();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(iE)){let n=r.slice(iE.length);if(!t.includes(n)){let t=localStorage.getItem(r);t&&(e[n]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function iN(){let e=await ij();return iP?iR([e,ik??iM()]):e}async function iA(){return ij()}async function iI(){return iP?iR([await ij(),iM()]):ij()}function i$(e){if(!iP)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(iE)){let t=localStorage.getItem(n);t&&(e[n.slice(iE.length)]=t)}}return{imports:e}}return iM()}function iL(){if(!iP)return[];try{let e=localStorage.getItem(iD);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function iF(e){return!!iP&&iL().includes(e)}function iB(e,t){if(!iP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(iE+e,t),window.dispatchEvent(new CustomEvent(iO))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function iV(e){if(!iP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(iE+e);let t=iL().filter(t=>t!==e);t.length>0?localStorage.setItem(iD,JSON.stringify(t)):localStorage.removeItem(iD),window.dispatchEvent(new CustomEvent(iO))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function iU(){if(!iP)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 n=localStorage.key(t);n?.startsWith(iE)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(iD),window.dispatchEvent(new CustomEvent(iO))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function iW(e){if(!iP)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=iL().filter(t=>t!==e);t.length>0?localStorage.setItem(iD,JSON.stringify(t)):localStorage.removeItem(iD),window.dispatchEvent(new CustomEvent(iO))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let iK=!1;function iz(){!iK&&(iK=!0,(iP="development"===window.spaEnv)&&(ik=iM()))}function iH(e){return e.replace(/[\/\-@]/g,"_")}async function iq(e,t="./start",r){var o;let i,a=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([iG(e,r?.importMap),new Promise((t,n)=>{i=setTimeout(()=>{var t;n(Error(`Could not resolve requested script, ${e}, within ${(t=a)<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`}.`))},a)})]),i&&clearTimeout(i);let s=iH(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(n.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 iG(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 n=iH(e);if(!window[n]){let n=t??await iZ();if(!n.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let r=n.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let o=e in i$().imports;try{return await function(e){var t;let n=(t=window)[iY]??(t[iY]=new Map),r=n.get(e);if(r)return r;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 i=new Promise((t,r)=>{let i=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 a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),n.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),r(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return n.set(e,i),i}(r)}catch(e){return o&&T({kind:"error",title:oY("scriptLoadingFailed","Error: Script failed to load"),description:oY("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:r}),actionButtonLabel:oY("resetOverrides","Reset overrides"),onActionButtonClick(){iU(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function iZ(){return iN()}let iY=Symbol.for("__openmrs_script_loading");function iJ(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 iQ(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&&iJ(t))}let iX="openmrs-routes:",i0="openmrs-routes:change",i1=!1,i2=null,i4=null;async function i3(){return i4??(i4=i6().then(({map:e,complete:t})=>(t||(i4=null),e))),i4}async function i6(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],n=!0;for(let r=0;r<e.length;r++){let o=e[r];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&&iQ(e)&&t.push(e)}catch(e){n=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${r}`,e)}}return{map:i5(t),complete:n}}function i5(e){let t={routes:{}};for(let n of e)n&&"object"==typeof n&&!Array.isArray(n)&&(Object.assign(t.routes,n.routes),void 0===t.version&&void 0!==n.version&&(t.version=n.version));return t}async function i7(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n?.startsWith(iX)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(iX.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(iJ(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(iJ(r))return{moduleName:e,routes:r};throw Error(`${n} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===n.status?e.routes[n.value.moduleName]=n.value.routes:console.warn("[route-maps] Failed to load route override",n.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function i9(){let e=await i3();return i1?i5([e,i2??await i7()]):e}async function i8(){return i3()}async function ae(){return i1?i5([await i3(),await i7()]):i3()}function at(){if(!i1)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(iX)){let t=localStorage.getItem(n);t&&(e[n.slice(iX.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function an(e,t){if(!i1)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(iX+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!iJ(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(iX+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(iX+e,JSON.stringify(t.toString()));else{if(!iJ(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(iX+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(i0))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function ar(e){if(!i1)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(iX+e),window.dispatchEvent(new CustomEvent(i0))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ao(){if(!i1)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(iX)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(i0))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let ai=null;function aa(){return ai||(ai=(i1="development"===window.spaEnv)?i7().then(e=>{i2=e}):Promise.resolve())}let as=`${o8}/attachment`;function al(e,t){return io(`${as}/${e}`,{signal:t.signal})}function au(e,t,n,r){return io(ac(e,t,r),{signal:n.signal})}function ac(e,t,n){return n?`${as}?patient=${e}&encounter=${n}`:`${as}?patient=${e}&includeEncounterless=${t}`}async function ad(e,t,n){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),n&&r.append("encounter",n),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),io(`${as}`,{method:"POST",body:r})}function ap(e,t){return io(`${as}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function af(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])})}function ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var ay=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function ag(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var ab=function(e,t){this.type=e,Object.assign(this,t)};function av(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function aw(){}var a_={type:"SKIP_WAITING"};function ax(e,t){if(!t)return e&&e.then?e.then(aw):Promise.resolve()}var aS=function(e){function t(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new ay,r.en=new ay,r.on=new ay,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!ag(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new ab(o,a)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new ab("waiting",a))},200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new ab("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},o=function(e){var t=e.data,n=e.ports,o=e.source;return av(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new ab("message",{data:t,originalEvent:e,ports:n,sw:o}))})},r.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n,r,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r,o,i,a=this;return r=function(){if(!n&&"complete"!==document.readyState)return ax(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),av(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&ag(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new ab("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=r())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?ax(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return av(this.getSW(),function(t){return af(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&af(this.fn.waiting,a_)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&ag(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return av(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},n=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],ah(t.prototype,n),r&&ah(t,r),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return am(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?am(e,void 0):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function aE(e,t){if(void 0!==p)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),p;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let n=new aS(e,t);return p=n.register().then(()=>n.controlling.then(()=>n))}function aD(){return p??Promise.resolve(void 0)}let aO="x-omrs-offline-response-body",aP="x-omrs-offline-response-status",ak="x-omrs-offline-caching-strategy";async function aC(e){let t=await aD();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function aj(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function aT(){return!window.indexedDB}async function aR(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function aM(){return await aR()||await aT()||await aj()}let aN="openmrs3:offline-mode",aA="unavailable";function aI(){return{current:aA,notAvailable:"unavailable"===aA,active:"on"===aA}}function a$(e){"unavailable"!==aA&&"unavailable"!==e&&(localStorage.setItem(aN,"on"===e?"active":"disabled"),aA=e)}async function aL(){await aM()||(aA="active"===localStorage.getItem(aN)?"on":"off"),navigator.onLine}let aF="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,aB=Object.keys,aV=Array.isArray;function aU(e,t){return"object"!=typeof t||aB(t).forEach(function(n){e[n]=t[n]}),e}"u"<typeof Promise||aF.Promise||(aF.Promise=Promise);let aW=Object.getPrototypeOf,aK={}.hasOwnProperty;function az(e,t){return aK.call(e,t)}function aH(e,t){"function"==typeof t&&(t=t(aW(e))),("u"<typeof Reflect?aB:Reflect.ownKeys)(t).forEach(n=>{aG(e,n,t[n])})}let aq=Object.defineProperty;function aG(e,t,n,r){aq(e,t,aU(n&&az(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function aZ(e){return{from:function(t){return e.prototype=Object.create(t.prototype),aG(e.prototype,"constructor",e),{extend:aH.bind(null,e.prototype)}}}}let aY=Object.getOwnPropertyDescriptor;function aJ(e,t){let n;return aY(e,t)||(n=aW(e))&&aJ(n,t)}let aQ=[].slice;function aX(e,t,n){return aQ.call(e,t,n)}function a0(e,t){return t(e)}function a1(e){if(!e)throw Error("Assertion Failed")}function a2(e){aF.setImmediate?setImmediate(e):setTimeout(e,0)}function a4(e,t){return e.reduce((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e},{})}function a3(e,t){if(az(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=a3(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:a3(s,t.substr(a+1))}}function a6(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){a1("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)a6(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?aV(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var l=e[a];l&&az(e,a)||(l=e[a]={}),a6(l,s,n)}}else void 0===n?aV(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function a5(e){var t={};for(var n in e)az(e,n)&&(t[n]=e[n]);return t}let a7=[].concat;function a9(e){return a7.apply([],e)}let a8="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(a9([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>aF[e]),se=a8.map(e=>aF[e]);a4(a8,e=>[e,!0]);let st=null;function sn(e){st="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let n=st&&st.get(t);if(n)return n;if(aV(t)){n=[],st&&st.set(t,n);for(var r=0,o=t.length;r<o;++r)n.push(e(t[r]))}else if(se.indexOf(t.constructor)>=0)n=t;else{let r=aW(t);for(var i in n=r===Object.prototype?{}:Object.create(r),st&&st.set(t,n),t)az(t,i)&&(n[i]=e(t[i]))}return n}(e);return st=null,t}let{toString:sr}={};function so(e){return sr.call(e).slice(8,-1)}let si="u">typeof Symbol?Symbol.iterator:"@@iterator",sa="symbol"==typeof si?function(e){var t;return null!=e&&(t=e[si])&&t.apply(e)}:function(){return null},ss={};function sl(e){var t,n,r,o;if(1==arguments.length){if(aV(e))return e.slice();if(this===ss&&"string"==typeof e)return[e];if(o=sa(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}let su="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var sc="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),sd=()=>!0;let sp=!Error("").stack;function sf(){if(sp)try{throw sf.arguments,Error()}catch(e){return e}return Error()}function sh(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(sd).map(e=>"\n"+e).join("")):""}var sm=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sy=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(sm),sg={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function sb(e,t){this._e=sf(),this.name=e,this.message=t}function sv(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function sw(e,t,n,r){this._e=sf(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=sv(e,t)}function s_(e,t){this._e=sf(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=sv(e,t)}aZ(sb).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+sh(this._e,2))}},toString:function(){return this.name+": "+this.message}}),aZ(sw).from(sb),aZ(s_).from(sb);var sx=sy.reduce((e,t)=>(e[t]=t+"Error",e),{}),sS=sy.reduce((e,t)=>{var n=t+"Error";function r(e,r){this._e=sf(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=sg[t]||n,this.inner=null)}return aZ(r).from(sb),e[t]=r,e},{});sS.Syntax=SyntaxError,sS.Type=TypeError,sS.Range=RangeError;var sE=sm.reduce((e,t)=>(e[t+"Error"]=sS[t],e),{}),sD=sy.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=sS[t]),e),{});function sO(){}function sP(e){return e}function sk(e,t){return null==e||e===sP?t:function(n){return t(e(n))}}function sC(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function sj(e,t){return e===sO?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?sC(r,this.onsuccess):r),o&&(this.onerror=this.onerror?sC(o,this.onerror):o),void 0!==i?i:n}}function sT(e,t){return e===sO?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?sC(n,this.onsuccess):n),r&&(this.onerror=this.onerror?sC(r,this.onerror):r)}}function sR(e,t){return e===sO?t:function(n){var r=e.apply(this,arguments);aU(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?sC(o,this.onsuccess):o),i&&(this.onerror=this.onerror?sC(i,this.onerror):i),void 0===r?void 0===a?void 0:a:aU(r,a)}}function sM(e,t){return e===sO?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function sN(e,t){return e===sO?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}sD.ModifyError=sw,sD.DexieError=sb,sD.BulkError=s_;var sA={};let[sI,s$,sL]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,aW(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,aW(t),e]})(),sF=s$&&s$.then,sB=sI&&sI.constructor,sV=!!sL;var sU=!1,sW=sL?()=>{sL.then(le)}:aF.setImmediate?setImmediate.bind(null,le):aF.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{le(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(le,0)},sK=function(e,t){sX.push([e,t]),sH&&(sW(),sH=!1)},sz=!0,sH=!0,sq=[],sG=[],sZ=null,sY=sP,sJ={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:lS,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{lS(e[0],e[1])}catch(e){}})}},sQ=sJ,sX=[],s0=0,s1=[];function s2(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=sO,this._lib=!1;var t=this._PSD=sQ;if(sc&&(this._stackHolder=sf(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==sA)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&s6(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(n=>{if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var r=t._lib&&lt();n&&"function"==typeof n.then?e(t,(e,t)=>{n instanceof s2?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,s5(t)),r&&ln()}},s6.bind(null,t))}catch(e){s6(t,e)}}(this,e)}let s4={get:function(){var e=sQ,t=lc;function n(n,r){var o=!e.global&&(e!==sQ||t!==lc);let i=o&&!lh();var a=new s2((t,a)=>{s7(this,new s3(l_(n,e,o,i),l_(r,e,o,i),t,a,e))});return sc&&s8(a,this),a}return n.prototype=sA,n},set:function(e){aG(this,"then",e&&e.prototype===sA?s4:{get:function(){return e},set:s4.set})}};function s3(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function s6(e,t){if(sG.push(t),null===e._state){var n=e._lib&&lt();t=sY(t),e._state=!1,e._value=t,sc&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=aJ(t,"stack");t._promise=e,aG(t,"stack",{get:()=>sU?n&&(n.get?n.get.apply(t):n.value):e.stack})}),sq.some(t=>t._value===e._value)||sq.push(e),s5(e),n&&ln()}}function s5(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)s7(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===s0&&(++s0,sK(()=>{0==--s0&&lr()},[]))}function s7(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++s0,sK(s9,[n,e,t])}else e._listeners.push(t)}function s9(e,t,n){try{sZ=t;var r,o=t._value;t._state?r=e(o):(sG.length&&(sG=[]),r=e(o),-1===sG.indexOf(o)&&function(e){for(var t=sq.length;t;)if(sq[--t]._value===e._value)return void sq.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{sZ=null,0==--s0&&lr(),--n.psd.ref||n.psd.finalize()}}function s8(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function le(){lt()&&ln()}function lt(){var e=sz;return sz=!1,sH=!1,e}function ln(){var e,t,n;do for(;sX.length>0;)for(e=sX,sX=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(sX.length>0);sz=!0,sH=!0}function lr(){var e=sq;sq=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=s1.slice(0),n=t.length;n;)t[--n]()}function lo(e){return new s2(sA,!1,e)}function li(e,t){var n=sQ;return function(){var r=lt(),o=sQ;try{return lb(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{lb(o,!1),r&&ln()}}}aH(s2.prototype,{then:s4,_then:function(e,t){s7(this,new s3(null,null,e,t,sQ))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):lo(e)):this.then(null,e=>e&&e.name===t?n(e):lo(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),lo(t)))},stack:{get:function(){if(this._stack)return this._stack;try{sU=!0;var e=(function e(t,n,r){if(n.length===r)return n;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=sh(s,0)):(i=s,a=""),n.push(i+(a?": "+a:"")+o)}return sc&&((o=sh(t._stackHolder,2))&&-1===n.indexOf(o)&&n.push(o),t._prev&&e(t._prev,n,r)),n})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{sU=!1}}},timeout:function(e,t){return e<1/0?new s2((n,r)=>{var o=setTimeout(()=>r(new sS.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&aG(s2.prototype,Symbol.toStringTag,"Dexie.Promise"),sJ.env=lv(),aH(s2,{all:function(){var e=sl.apply(null,arguments).map(lm);return new s2(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((o,i)=>s2.resolve(o).then(n=>{e[i]=n,--r||t(e)},n))})},resolve:e=>{if(e instanceof s2)return e;if(e&&"function"==typeof e.then)return new s2((t,n)=>{e.then(t,n)});var t=new s2(sA,!0,e);return s8(t,sZ),t},reject:lo,race:function(){var e=sl.apply(null,arguments).map(lm);return new s2((t,n)=>{e.map(e=>s2.resolve(e).then(t,n))})},PSD:{get:()=>sQ,set:e=>sQ=e},totalEchoes:{get:()=>lc},newPSD:lp,usePSD:lw,scheduler:{get:()=>sK,set:e=>{sK=e}},rejectionMapper:{get:()=>sY,set:e=>{sY=e}},follow:(e,t)=>new s2((n,r)=>lp((t,n)=>{var r=sQ;r.unhandleds=[],r.onunhandled=n,r.finalize=sC(function(){var e;e=()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])},s1.push(function t(){e(),s1.splice(s1.indexOf(t),1)}),++s0,sK(()=>{0==--s0&&lr()},[])},r.finalize),e()},t,n,r))}),sB&&(sB.allSettled&&aG(s2,"allSettled",function(){let e=sl.apply(null,arguments).map(lm);return new s2(t=>{0===e.length&&t([]);let n=e.length,r=Array(n);e.forEach((e,o)=>s2.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--n||t(r)))})}),sB.any&&"u">typeof AggregateError&&aG(s2,"any",function(){let e=sl.apply(null,arguments).map(lm);return new s2((t,n)=>{0===e.length&&n(AggregateError([]));let r=e.length,o=Array(r);e.forEach((e,i)=>s2.resolve(e).then(e=>t(e),e=>{o[i]=e,--r||n(AggregateError(o))}))})}));let la={awaits:0,echoes:0,id:0};var ls=0,ll=[],lu=0,lc=0,ld=0;function lp(e,t,n,r){var o=sQ,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ld;var a=sJ.env;i.env=sV?{Promise:s2,PromiseProp:{value:s2,configurable:!0,writable:!0},all:s2.all,race:s2.race,allSettled:s2.allSettled,any:s2.any,resolve:s2.resolve,reject:s2.reject,nthen:lx(a.nthen,i),gthen:lx(a.gthen,i)}:{},t&&aU(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=lw(i,e,n,r);return 0===i.ref&&i.finalize(),s}function lf(){return la.id||(la.id=++ls),++la.awaits,la.echoes+=100,la.id}function lh(){return!!la.awaits&&(0==--la.awaits&&(la.id=0),la.echoes=100*la.awaits,!0)}function lm(e){return la.echoes&&e&&e.constructor===sB?(lf(),e.then(e=>(lh(),e),e=>(lh(),lE(e)))):e}function ly(e){++lc,la.echoes&&0!=--la.echoes||(la.echoes=la.id=0),ll.push(sQ),lb(e,!0)}function lg(){var e=ll[ll.length-1];ll.pop(),lb(e,!1)}function lb(e,t){var n,r=sQ;if((t?!la.echoes||lu++&&e===sQ:!lu||--lu&&e===sQ)||(n=t?ly.bind(null,e):lg,sF.call(sI,n)),e!==sQ&&(sQ=e,r===sJ&&(sJ.env=lv()),sV)){var o=sJ.env.Promise,i=e.env;s$.then=i.nthen,o.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(aF,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function lv(){var e=aF.Promise;return sV?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(aF,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:s$.then,gthen:e.prototype.then}:{}}function lw(e,t,n,r,o){var i=sQ;try{return lb(e,!0),t(n,r,o)}finally{lb(i,!1)}}function l_(e,t,n,r){return"function"!=typeof e?e:function(){var o,i=sQ;n&&lf(),lb(t,!0);try{return e.apply(this,arguments)}finally{lb(i,!1),r&&(o=lh,sF.call(sI,o))}}}function lx(e,t){return function(n,r){return e.call(this,l_(n,t),l_(r,t))}}function lS(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(aF.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),aU(r,o)):aF.CustomEvent&&aU(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&aF.dispatchEvent&&(dispatchEvent(r),!aF.PromiseRejectionEvent&&aF.onunhandledrejection))try{aF.onunhandledrejection(r)}catch(e){}sc&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+sF).indexOf("[native code]")&&(lf=lh=sO);var lE=s2.reject;let lD=String.fromCharCode(65535),lO="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",lP=[],lk="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lC=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function lj(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let lT={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function lR(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=sn(t))[e],t)}class lM{_trans(e,t,n){let r=this._tx||sQ.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new sS.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}let a=lt();try{return r&&r.db===this.db?r===sQ.trans?r._promise(e,i,n):lp(()=>r._promise(e,i,n),{trans:r,transless:sQ.transless||sQ}):function e(t,n,r,o){if(t.idbdb&&(t._state.openComplete||sQ.letThrough||t._vip)){var i=t._createTransaction(n,r,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===sx.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,o))):lE(i)}return i._promise(n,(e,t)=>lp(()=>(sQ.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return lE(new sS.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return lE(new sS.DatabaseClosed);t.open().catch(sO)}return t._state.dbReadyPromise.then(()=>e(t,n,r,o))}(this.db,e,[this.name],i)}finally{a&&ln()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(aV(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=aB(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let n=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(n&&this.db._maxKey!==lD)return this.where(n.name).equals(n.keyPath.map(t=>e[t]));!n&&sc&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,n],o)=>{let a=r[o],s=e[o];return[t||a,t||!a?lj(n,a&&a.multi?e=>{let t=a3(e,o);return aV(t)&&t.some(e=>i(s,e))}:e=>i(s,a3(e,o))):n]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,aV(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let n=Object.create(e.prototype);for(var r in t)if(az(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){aU(this,e)})}add(e,t){let{auto:n,keyPath:r}=this.schema.primKey,o=e;return r&&n&&(o=lR(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?s2.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{a6(e,r,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||aV(e))return this.where(":id").equals(e).modify(t);{let n=a3(e,this.schema.primKey.keyPath);if(void 0===n)return lE(new sS.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?aB(t).forEach(n=>{a6(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){let{auto:n,keyPath:r}=this.schema.primKey,o=e;return r&&n&&(o=lR(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?s2.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{a6(e,r,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?s2.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:lT})).then(e=>e.numFailures?s2.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){let r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new sS.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new sS.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&n?e.map(lR(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new s_(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)})})}bulkPut(e,t,n){let r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new sS.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new sS.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&n?e.map(lR(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new s_(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new s_(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)})}}function lN(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e){var a;return void aB(a=e).forEach(function(e){var t=a[e];if(aV(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new sS.InvalidArgument("Invalid event config");var n=i(e,sP,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){a2(function(){e.apply(null,t)})})})}})}r||(r=sM),o||(o=sO);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=r(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(r,o)}};return t[e]=n[e]=s,s}}function lA(e,t){return aZ(t).from({prototype:e}),t}function lI(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function l$(e,t){e.filter=lj(e.filter,t)}function lL(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>lj(r(),t()):t,e.justLimit=n&&!r}function lF(e,t){if(e.isPrimKey)return t.primaryKey;let n=t.getIndexByKeyPath(e.index);if(!n)throw new sS.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function lB(e,t,n){let r=lF(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function lV(e,t,n,r){let o=e.replayFilter?lj(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,n,r)=>{if(!o||o(n,r,e=>n.stop(e),e=>n.fail(e))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),az(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),lU(lB(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return lU(lB(e,r,n),lj(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function lU(e,t,n,r){var o=li(r?(e,t,o)=>n(r(e),t,o):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=sO},t=>{e.fail(t),n=sO})||o(e.value,e,e=>n=e),n()})})}function lW(e,t){try{let n=lK(e),r=lK(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(lz(e),lz(t));case"Array":return function(e,t){let n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){let r=lW(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function lK(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let n=so(e);return"ArrayBuffer"===n?"binary":n}function lz(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lH{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,lE.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,lE.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=lj(t.algorithm,e)}_iterate(e,t){return lV(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&aU(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>lV(t,e,n,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,n=t.table.core;if(lI(t,!0))return n.count({trans:e,query:{index:lF(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var r=0;return lV(t,()=>(++r,!1),e,n).then(()=>r)}).then(e)}sortBy(e,t){let n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&lI(t,!0)&&t.limit>0){let{valueMapper:n}=t,r=lF(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{let n=[];return lV(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,lI(t)?lL(t,()=>{var t=e;return(e,n)=>0===t||(1===t?--t:n(()=>{e.advance(t),t=0}),!1)}):lL(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lL(this._ctx,()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this}until(e,t){return l$(this._ctx,function(n,r,o){return!e(n.value)||(r(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return l$(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=lj(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&lI(t,!0)&&t.limit>0)return this._read(e=>{var n=lF(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return l$(this._ctx,function(e){var t=e.primaryKey.toString(),r=az(n,t);return n[t]=!0,!r}),this}modify(e){var t=this._ctx;return this._write(n=>{var r;if("function"==typeof e)r=e;else{var o=aB(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];a3(t,a)!==s&&(a6(t,a,s),n=!0)}return n}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,p=[],f=(e,t)=>{let{failures:n,numFailures:r}=t;for(let t of(d+=e-r,aB(n)))c.push(n[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:n,keys:o.slice(c,c+d),cache:"immutable"}).then(p=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=p[e],n={value:sn(t),primKey:o[c+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[c+e]):s||0===lW(l(t),l(n.value))?(m.push(n.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(n.value)))}let b=lI(t)&&t.limit===1/0&&("function"!=typeof e||e===lq)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:n,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(g.length>0||b&&e===lq)&&a.mutate({trans:n,type:"delete",keys:g,criteria:b}).then(e=>f(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new sw("Error modifying one or more objects",c,d,p);return o.length})})})}delete(){var e=this._ctx,t=e.range;return lI(e)&&(e.isPrimKey&&!lk||3===t.type)?this._write(n=>{let{primaryKey:r}=e.table.core.schema;return e.table.core.count({trans:n,query:{index:r,range:t}}).then(r=>e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:n,numFailures:o})=>{if(o)throw new sw("Could not delete some values",Object.keys(e).map(t=>e[t]),r-o);return r-o}))}):this.modify(lq)}}let lq=(e,t)=>t.value=null;function lG(e,t){return e<t?-1:+(e!==t)}function lZ(e,t){return e>t?-1:+(e!==t)}function lY(e,t,n){var r=e instanceof l1?new e.Collection(e):e;return r._ctx.error=n?new n(t):TypeError(t),r}function lJ(e){return new e.Collection(e,()=>l0("")).limit(0)}function lQ(e,t,n,r){var o,i,a,s,l,u,c,d=n.length;if(!n.every(e=>"string"==typeof e))return lY(e,"String expected.");function p(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?lG:lZ;var t=n.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":r}p("next");var f=new e.Collection(e,()=>lX(s[0],l[d-1]+r));f._ondirectionchange=function(e){p(e)};var h=0;return f._addAlgorithm(function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,l,h))return!0;for(var f=null,m=h;m<d;++m){var y=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==r[l])return 0>o(e[l],n[l])?e.substr(0,l)+n[l]+n.substr(l+1):0>o(e[l],r[l])?e.substr(0,l)+r[l]+n.substr(l+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}(o,p,s[m],l[m],a,u);null===y&&null===f?h=m+1:(null===f||a(f,y)>0)&&(f=y)}return n(null!==f?function(){e.continue(f+c)}:r),!1}),f}function lX(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function l0(e){return{type:1,lower:e,upper:e}}class l1{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?lJ(this):new this.Collection(this,()=>lX(e,t,!n,!r))}catch(e){return lY(this,lO)}}equals(e){return null==e?lY(this,lO):new this.Collection(this,()=>l0(e))}above(e){return null==e?lY(this,lO):new this.Collection(this,()=>lX(e,void 0,!0))}aboveOrEqual(e){return null==e?lY(this,lO):new this.Collection(this,()=>lX(e,void 0,!1))}below(e){return null==e?lY(this,lO):new this.Collection(this,()=>lX(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lY(this,lO):new this.Collection(this,()=>lX(void 0,e))}startsWith(e){return"string"!=typeof e?lY(this,"String expected."):this.between(e,e+lD,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lQ(this,(e,t)=>0===e.indexOf(t[0]),[e],lD)}equalsIgnoreCase(e){return lQ(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=sl.apply(ss,arguments);return 0===e.length?lJ(this):lQ(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=sl.apply(ss,arguments);return 0===e.length?lJ(this):lQ(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,lD)}anyOf(){let e=sl.apply(ss,arguments),t=this._cmp;try{e.sort(t)}catch(e){return lY(this,lO)}if(0===e.length)return lJ(this);let n=new this.Collection(this,()=>lX(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm((n,o,i)=>{let a=n.key;for(;t(a,e[r])>0;)if(++r===e.length)return o(i),!1;return 0===t(a,e[r])||(o(()=>{n.continue(e[r])}),!1)}),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=sl.apply(ss,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lY(this,lO)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return lJ(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=r(e[0],e[1])))return lY(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",sS.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=r;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let r=0,o=e.length;for(;r<o;++r){let o=e[r];if(0>n(t[0],o[1])&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e},[])).sort(d)}catch(e){return lY(this,lO)}let p=0,f=l?e=>r(e,u[p][1])>0:e=>r(e,u[p][1])>=0,h=s?e=>o(e,u[p][0])>0:e=>o(e,u[p][0])>=0,m=f,y=new this.Collection(this,()=>lX(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=f,c=r):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,n)=>{for(var o=e.key;m(o);)if(++p===u.length)return t(n),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,u[p][1])||0===this._cmp(o,u[p][0])||t(()=>{c===r?e.continue(u[p][0]):e.continue(u[p][1])}),!1)}),y}startsWithAnyOf(){let e=sl.apply(ss,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lJ(this):this.inAnyRange(e.map(e=>[e,e+lD])):lY(this,"startsWithAnyOf() only works with strings")}}function l2(e){return li(function(t){return l4(t),e(t.target.error),!1})}function l4(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let l3=lN(null,"storagemutated");class l6{_lock(){return a1(!sQ.global),++this._reculock,1!==this._reculock||sQ.global||(sQ.lockOwnerFor=this),this}_unlock(){if(a1(!sQ.global),0==--this._reculock)for(sQ.global||(sQ.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{lw(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&sQ.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,n=this.db._state.dbOpenError;if(a1(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new sS.DatabaseClosed(n);case"MissingAPIError":throw new sS.MissingAPI(n.message,n);default:throw new sS.OpenFailed(n)}if(!this.active)throw new sS.TransactionInactive;return a1(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=li(t=>{l4(t),this._reject(e.error)}),e.onabort=li(t=>{l4(t),this.active&&this._reject(new sS.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=li(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&l3.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return lE(new sS.ReadOnly("Transaction is readonly"));if(!this.active)return lE(new sS.TransactionInactive);if(this._locked())return new s2((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},sQ])});if(n)return lp(()=>{var e=new s2((e,n)=>{this._lock();let r=t(e,n,this);r&&r.then&&r.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new s2((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let n=s2.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new s2((e,r)=>{n.then(n=>t._waitingQueue.push(li(e.bind(null,n))),e=>t._waitingQueue.push(li(r.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new sS.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(az(t,e))return t[e];let n=this.schema[e];if(!n)throw new sS.NotFound("Table "+e+" not part of transaction");let r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function l5(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+l7(t)}}function l7(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function l9(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:a4(n,e=>[e.name,e])}}let l8=e=>{try{return e.only([[]]),l8=()=>[[]],[[]]}catch(e){return l8=()=>lD,lD}};function ue(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>a3(t,e):t=>a3(t,e)}function ut(e){return[].slice.call(e)}let un=0;function ur(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function uo({_novip:e},t){let n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){var i;return{dbcore:(i=function(e,t,n){let r;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}let{schema:i,hasGetAll:a}=(r=ut(e.objectStoreNames),{schema:{name:e.name,tables:r.map(e=>n.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:n}=e,r=aV(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:ue(t)},indexes:ut(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:aV(o),keyPath:o,unique:n,multiEntry:r,extractKey:ue(o)};return i[ur(o)]=a,a}),getIndexByKeyPath:e=>i[ur(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[ur(t)]=a.primaryKey),a})},hasGetAll:r.length>0&&"getAll"in n.objectStore(r[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:n,keys:r,values:i,range:a}){return new Promise((s,l)=>{let u;s=li(s);let c=e.objectStore(t),d=null==c.keyPath,p="put"===n||"add"===n;if(!p&&"delete"!==n&&"deleteRange"!==n)throw Error("Invalid operation type: "+n);let{length:f}=r||i||{length:1};if(r&&i&&r.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,l4(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=p?d?[i,r]:[i,null]:[r,null];if(p)for(let r=0;r<f;++r)h.push(u=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),u.onerror=g;else for(let t=0;t<f;++t)h.push(u=c[n](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===n?r:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:n})=>new Promise((r,o)=>{r=li(r);let i=e.objectStore(t),a=n.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&r(s)},p=l2(o);for(let e=0;e<a;++e)null!=n[e]&&((l=i.get(n[e]))._pos=e,l.onsuccess=d,l.onerror=p,++u);0===u&&r(s)}),get:({trans:e,key:n})=>new Promise((r,o)=>{r=li(r);let i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=l2(o)}),query:e=>new Promise((n,r)=>{n=li(n);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:p}=u,f=i.objectStore(t),h=d.isPrimaryKey?f:f.index(d.name),m=o(p);if(0===l)return n({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>n({result:e.target.result}),e.onerror=l2(r)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=r=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?n({result:o}):void i.continue()):n({result:o})},t.onerror=l2(r)}}),openCursor:function({trans:e,values:n,query:r,reverse:i,unique:a}){return new Promise((s,l)=>{s=li(s);let{index:u,range:c}=r,d=e.objectStore(t),p=u.isPrimaryKey?d:d.index(u.name),f=i?a?"prevunique":"prev":a?"nextunique":"next",h=!n&&"openKeyCursor"in p?p.openKeyCursor(o(c),f):p.openCursor(o(c),f);h.onerror=l2(l),h.onsuccess=li(t=>{let n=h.result;if(!n)return void s(null);n.___id=++un,n.done=!1;let r=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));let i=n.advance.bind(n),a=()=>{throw Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw Error("Cursor not started")},n.fail=li(l),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{let t=new Promise((e,t)=>{e=li(e),h.onerror=l2(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw Error("Cursor behind last entry")},n.stop()};return h.onsuccess=li(e=>{h.onsuccess=s,s()}),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)},l)})},count({query:e,trans:n}){let{index:r,range:i}=e;return new Promise((e,a)=>{let s=n.objectStore(t),l=r.isPrimaryKey?s:s.index(r.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=li(t=>e(t.target.result)),c.onerror=l2(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:l8(t),schema:i}}(t,n,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(t=>{let n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function ui({_novip:e},t,n,r){n.forEach(n=>{let o=r[n];t.forEach(t=>{let r=aJ(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?aG(t,n,{get(){return this.table(n)},set(e){aq(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))})})}function ua({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function us(e,t){return e._cfg.version-t._cfg.version}function ul(e,t){let n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){let o=e[n],i=t[n];if(o){let e={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||lk)){let t,n=o.idxByName,a=i.idxByName;for(t in n)a[t]||e.del.push(t);for(t in a){let r=n[t],o=a[t];r?r.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}else e.recreate=!0,r.change.push(e)}else r.add.push([n,i])}return r}function uu(e,t,n,r){let o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(e=>uc(o,e)),o}function uc(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function ud(e,t,n){let r={};return aX(t.objectStoreNames,0).forEach(e=>{let t=n.objectStore(e),o=t.keyPath,i=l5(l7(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let n=t.index(t.indexNames[e]);o=n.keyPath;var s=l5(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=l9(e,i,a)}),r}function up({_novip:e},t,n){let r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){let i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+aX(r).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&aF.WorkerGlobalScope&&aF instanceof aF.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class uf{_parseStoresSpec(e,t){aB(e).forEach(n=>{if(null!==e[n]){var r=e[n].split(",").map((e,t)=>{let n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return l5(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),aV(r),0===t)}),o=r.shift();if(o.multi)throw new sS.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new sS.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new sS.Schema("Index must have a name and cannot be an empty string")}),t[n]=l9(n,o,r)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?aU(this._cfg.storesSource,e):e;let n=t._versions,r={},o={};return n.forEach(e=>{aU(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)}),t._dbSchema=o,ua(t,[t._allTables,t,t.Transaction.prototype]),ui(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],aB(o),o),t._storeNames=aB(o),this}upgrade(e){return this._cfg.contentUpgrade=sN(this._cfg.contentUpgrade||sO,e),this}}function uh(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new uM("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function um(e){return e&&"function"==typeof e.databases}function uy(e){return lp(function(){return sQ.letThrough=!0,e()})}function ug(e){var t=t=>e.next(t),n=o(t),r=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):aV(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function ub(e,t,n){var r=arguments.length;if(r<2)throw new sS.InvalidArgument("Too few arguments");for(var o=Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,a9(o),n]}function uv(e,t,n){let r=aV(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}let uw={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){let r=ur(e),s=o[r]=o[r]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...n,isVirtual:u,keyTail:t,keyLength:l,extractKey:ue(e),unique:!u&&n.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,n),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(r.primaryKey.keyPath,0,r.primaryKey);for(let e of(o[":id"]=[s],r.indexes))a(e.keyPath,0,e);function l(t){var n,r;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:uv(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:uv(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}:t}return{...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[ur(e)];return t&&t[0]}},count:e=>n.count(l(e)),query:e=>n.query(l(e)),openCursor(t){let{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(l(t)).then(n=>n&&Object.create(n,{continue:{value:function(o){null!=o?n.continue(uv(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(uv(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){let e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}})):n.openCursor(t)}}}}}};function u_(e,t,n,r){return n=n||{},r=r||"",aB(e).forEach(o=>{if(az(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=so(i);e!==so(a)?n[r+o]=t[o]:"Object"===e?u_(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0}),aB(t).forEach(o=>{az(e,o)||(n[r+o]=t[o])}),n}let ux={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(e){let o=sQ.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===sO)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===sO&&s.fire===sO)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===sO)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===sO)break;return o._promise("readwrite",()=>(function e(t,o,i){return n.query({trans:t,values:!1,query:{index:r,range:o},limit:i}).then(({result:n})=>l({type:"delete",keys:n,trans:t}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:n[n.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return n.mutate(e);function l(e){var t,o;let l=sQ.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(r.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):n.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((n,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,n,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,n,e.values[o],l);null==n&&null!=t&&(n=t,e.keys[o]=n,r.outbound||a6(e.values[o],r.keyPath,n))}else{let t=u_(u,e.values[o]),r=s.fire.call(c,t,n,u,l);if(r){let t=e.values[o];Object.keys(r).forEach(e=>{az(t,e)?t[e]=r[e]:a6(t,e,r[e])})}}return c});return n.mutate(e).then(({failures:n,results:r,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=r?r[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(n[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:n,results:r,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function uS(e,t,n){try{if(!t||t.keys.length<e.length)return null;let r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===lW(t.keys[o],e[i])&&(r.push(n?sn(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}let uE={stack:"dbcore",level:-1,create:e=>({table:t=>{let n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);let t=uS(e.keys,e.trans._cache,"clone"===e.cache);return t?s2.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?sn(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function uD(e){return!("from"in e)}let uO=function(e,t){if(!this){let t=new uO;return e&&"d"in e&&aU(t,e),t}aU(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function uP(e,t,n){let r=lW(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(uD(e))return aU(e,{from:t,to:n,d:1});let o=e.l,i=e.r;if(0>lW(n,e.from))return o?uP(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},uj(e);if(lW(t,e.to)>0)return i?uP(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},uj(e);0>lW(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),lW(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&uk(e,o),i&&a&&uk(e,i)}function uk(e,t){uD(t)||function e(t,{from:n,to:r,l:o,r:i}){uP(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function uC(e){let t=uD(e)?null:{s:0,n:e};return{next(e){let n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>lW(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=lW(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function uj(e){var t,n;let r=((null==(t=e.r)?void 0:t.d)||0)-((null==(n=e.l)?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){let t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=uT(n)}e.d=uT(e)}function uT({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}aH(uO.prototype,{add(e){return uk(this,e),this},addKey(e){return uP(this,e,e),this},addKeys(e){return e.forEach(e=>uP(this,e,e)),this},[si](){return uC(this)}});let uR={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,n=new uO(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{let o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new uO)},u=l(""),c=l(":dels"),{type:d}=e,[p,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(aV(p)){"delete"!==d&&(p=e.results),u.addKeys(p);let t=uS(p,h);t||"add"===d||c.addKeys(p),(t||f)&&i.indexes.forEach(function(e){let n=l(e.name||"");function r(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&aV(t)?t.forEach(e=>n.addKey(e)):n.addKey(t);(t||f).forEach((e,n)=>{let i=t&&r(t[n]),a=f&&r(f[n]);0!==lW(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(p){let e={from:p.lower,to:p.upper};c.add(e),u.add(e)}else u.add(n),c.add(n),i.indexes.forEach(e=>l(e.name).add(n));return e})}},c=({query:{index:t,range:n}})=>{var r,o;return[t,new uO(null!=(r=n.lower)?r:e.MIN_KEY,null!=(o=n.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new uO(e.key)],getMany:e=>[a,(new uO).addKeys(e.keys)],count:c,query:c,openCursor:c};return aB(d).forEach(e=>{u[e]=function(i){let{subscr:a}=sQ;if(a){let u=e=>{let n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new uO)},c=u(""),p=u(":dels"),[f,h]=d[e](i);if(u(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(n=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),n));let e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):p.addKeys(e)}else if("openCursor"===e){let e=i.values;return n&&Object.create(n,{key:{get:()=>(p.addKey(n.primaryKey),n.key)},primaryKey:{get(){let e=n.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&c.addKey(n.primaryKey),n.value)}})}return n})}p.add(n)}}return o[e].apply(this,arguments)}}),u}}}};class uM{constructor(e,t){var n;this._middlewares={},this.verno=0;const r=uM.dependencies;this._options=t={addons:uM.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:sO,dbReadyPromise:null,cancelOpen:sO,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new s2(e=>{i.dbReadyResolve=e}),i.openCanceller=new s2((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=lN(this,"populate","blocked","versionchange","close",{ready:[sN,sO]}),this.on.ready.subscribe=a0(this.on.ready.subscribe,e=>(t,n)=>{uM.vip(()=>{let r=this._state;if(r.openComplete)r.dbOpenError||s2.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);let r=this;n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)})}})}),this.Collection=(n=this,lA(lH.prototype,function(e,t){this.db=n;let r=lT,o=null;if(t)try{r=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==sP?s:null}})),this.Table=function(e){return lA(lM.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:lN(null,{creating:[sj,sO],reading:[sk,sP],updating:[sR,sO],deleting:[sT,sO]})})}(this),this.Transaction=function(e){return lA(l6.prototype,function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lN(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new s2((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),lE(e)})})}(this),this.Version=function(e){return lA(uf.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lA(l1.prototype,function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};let o=e._deps.indexedDB;if(!o)throw new sS.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=l8(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),lP.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(uw),this.use(ux),this.use(uR),this.use(uE),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new sS.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new sS.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(us),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||sQ.letThrough||this._vip)?e():new s2((e,t)=>{if(this._state.openComplete)return t(new sS.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new sS.DatabaseClosed);this.open().catch(sO)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){var t;let n=e._state,{indexedDB:r}=e._deps;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(()=>n.dbOpenError?lE(n.dbOpenError):e);sc&&(n.openCanceller._stackHolder=sf()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;let o=n.openCanceller;function i(){if(n.openCanceller!==o)throw new sS.DatabaseClosed("db.open() was cancelled")}let a=n.dbReadyResolve,s=null,l=!1;return s2.race([o,("u"<typeof navigator?s2.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new s2((t,o)=>{if(i(),!r)throw new sS.MissingAPI;let a=e.name,u=n.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!u)throw new sS.MissingAPI;u.onerror=l2(o),u.onblocked=li(e._fireOnBlocked),u.onupgradeneeded=li(t=>{if(s=u.transaction,n.autoSchema&&!e._options.allowEmptyDB){u.onerror=l4,s.abort(),u.result.close();let e=r.deleteDatabase(a);e.onsuccess=e.onerror=li(()=>{o(new sS.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let n,r,a,p;s.onerror=l2(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,n=e._dbSchema,(r=e._createTransaction("readwrite",e._storeNames,n)).create(c),r._completion.catch(o),a=r._reject.bind(r),p=sQ.transless||sQ,lp(()=>{sQ.trans=r,sQ.transless=p,0===i?(aB(n).forEach(e=>{uu(c,e,n[e].primKey,n[e].indexes)}),uo(e,c),s2.follow(()=>e.on.populate.fire(r)).catch(a)):(function({_novip:e},t,n,r){let o=[],i=e._versions,a=e._dbSchema=ud(e,e.idbdb,r),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;up(e,o,r),up(e,l,r),a=e._dbSchema=l;let u=ul(o,l);u.add.forEach(e=>{uu(r,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new sS.Upgrade("Not yet support for changing primary key");{let t=r.objectStore(e.name);e.add.forEach(e=>uc(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),uc(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;uo(e,r),n._memoizedTables={},s=!0;let i=a5(l);u.del.forEach(e=>{i[e]=o[e]}),ua(e,[e.Transaction.prototype]),ui(e,[e.Transaction.prototype],aB(i),i),n.schema=i;let a=su(c);a&&lf();let d=s2.follow(()=>{if((t=c(n))&&a){var e=lh.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?s2.resolve(t):d.then(()=>t)}}),o.push(t=>{var r;s&&lk||(r=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==r[e]&&t.db.deleteObjectStore(e))),ua(e,[e.Transaction.prototype]),ui(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),(function e(){return o.length?s2.resolve(o.shift()(n.idbtrans)).then(e):s2.resolve()})().then(()=>{var e;aB(e=a).forEach(t=>{r.db.objectStoreNames.contains(t)||uu(r,t,e[t].primKey,e[t].indexes)})})})(e,i,r,c).catch(a)})}},o),u.onsuccess=li(()=>{s=null;let r=e._novip.idbdb=u.result,o=aX(r.objectStoreNames);if(o.length>0)try{let t,i=r.transaction(1===o.length?o[0]:o,"readonly");n.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;let r=e._dbSchema=ud(0,t,n);e._storeNames=aX(t.objectStoreNames,0),ui(e,[e._allTables],aB(r),r)}(e,r,i):(up(e,e._dbSchema,i),((t=ul(ud(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),uo(e,i)}catch(e){}lP.push(e),r.onversionchange=li(t=>{n.vcFired=!0,e.on("versionchange").fire(t)}),r.onclose=li(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},n){um(e)||"__dbnames"===n||uh(e,t).put({name:n}).catch(sO)}(e._deps,a),t()},o)}))]).then(()=>(i(),n.onReadyBeingFired=[],s2.resolve(uy(()=>e.on.ready.fire(e.vip))).then(function t(){if(n.onReadyBeingFired.length>0){let r=n.onReadyBeingFired.reduce(sN,sO);return n.onReadyBeingFired=[],s2.resolve(uy(()=>r(e.vip))).then(t)}}))).finally(()=>{n.onReadyBeingFired=null,n.isBeingOpened=!1}).then(()=>e).catch(t=>{n.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===n.openCanceller&&e._close(),lE(t)}).finally(()=>{n.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=lP.indexOf(this);if(t>=0&&lP.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new s2(t=>{e.dbReadyResolve=t}),e.openCanceller=new s2((t,n)=>{e.cancelOpen=n})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new sS.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new s2((n,r)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=li(()=>{!function({indexedDB:e,IDBKeyRange:t},n){um(e)||"__dbnames"===n||uh(e,t).delete(n).catch(sO)}(this._deps,this.name),n()}),e.onerror=l2(r),e.onblocked=this._fireOnBlocked};if(e)throw new sS.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return aB(this._allTables).map(e=>this._allTables[e])}transaction(){let e=ub.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r,o,i=sQ.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)r="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new sS.InvalidArgument("Invalid transaction mode: "+e);r="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===r){if(!a)throw new sS.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new sS.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,n)=>{n(e)}):lE(e)}let s=(function e(t,n,r,o,i){return s2.resolve().then(()=>{let a,s=sQ.transless||sQ,l=t._createTransaction(n,r,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===sx.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,null,i))):lE(o)}let u=su(i);u&&lf();let c=s2.follow(()=>{if(a=i.call(l,l))if(u){var e=lh.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=ug(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?s2.resolve(a).then(e=>l.active?e:lE(new sS.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),lE(e)))})}).bind(null,this,r,o,i,n);return i?i._promise(r,s,"lock"):sQ.trans?lw(sQ.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!az(this._allTables,e))throw new sS.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let uN="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class uA{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[uN](){return this}}function uI(e,t){return aB(t).forEach(n=>{uk(e[n]||(e[n]=new uO),t[n])}),e}try{i={indexedDB:aF.indexedDB||aF.mozIndexedDB||aF.webkitIndexedDB||aF.msIndexedDB,IDBKeyRange:aF.IDBKeyRange||aF.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function u$(e){let t=uL;try{uL=!0,l3.storagemutated.fire(e)}finally{uL=t}}aH(uM,{...sD,delete:e=>new uM(e,{addons:[]}).delete(),exists:e=>new uM(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return um(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):uh(e,t).toCollection().primaryKeys()})(uM.dependencies).then(e)}catch(e){return lE(new sS.MissingAPI)}},defineClass:()=>function(e){aU(this,e)},ignoreTransaction:e=>sQ.trans?lw(sQ.transless,e):e(),vip:uy,async:function(e){return function(){try{var t=ug(e.apply(this,arguments));return t&&"function"==typeof t.then?t:s2.resolve(t)}catch(e){return lE(e)}}},spawn:function(e,t,n){try{var r=ug(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:s2.resolve(r)}catch(e){return lE(e)}},currentTransaction:{get:()=>sQ.trans||null},waitFor:function(e,t){let n=s2.resolve("function"==typeof e?uM.ignoreTransaction(e):e).timeout(t||6e4);return sQ.trans?sQ.trans.waitFor(n):n},Promise:s2,debug:{get:()=>sc,set:e=>{sc=e,sd="dexie"===e?()=>!0:lC}},derive:aZ,extend:aU,props:aH,override:a0,Events:lN,on:l3,liveQuery:function(e){return new uA(t=>{let n=su(e),r=!1,o={},i={},a={get closed(){return r},unsubscribe:()=>{r=!0,l3.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,l=!1;function u(){return aB(i).some(e=>o[e]&&function(e,t){let n=uC(t),r=n.next();if(r.done)return!1;let o=r.value,i=uC(e),a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(0>=lW(s.from,o.to)&&lW(s.to,o.from)>=0)return!0;0>lW(o.from,s.from)?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{uI(o,e),u()&&d()},d=()=>{let p,f;if(s||r)return;o={};let h={},m=(n&&lf(),p=()=>lp(e,{subscr:h,trans:null}),f=sQ.trans?lw(sQ.transless,p):p(),n&&f.then(lh,lh),f);l||(l3("storagemutated",c),l=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,r||(u()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:uI,getByKeyPath:a3,setByKeyPath:a6,delByKeyPath:function(e,t){"string"==typeof t?a6(e,t,void 0):"length"in t&&[].map.call(t,function(t){a6(e,t,void 0)})},shallowClone:a5,deepClone:sn,getObjectDiff:u_,cmp:lW,asap:a2,minKey:-1/0,addons:[],connections:lP,errnames:sx,dependencies:i,semVer:"3.2.2",version:"3.2.2".split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),uM.maxKey=l8(uM.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(l3("storagemutated",e=>{if(!uL){let t;lk?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uL=!0,dispatchEvent(t),uL=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{uL||u$(e)}));let uL=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");l3("storagemutated",t=>{uL||e.postMessage(t)}),e.onmessage=e=>{e.data&&u$(e.data)}}else if("u">typeof self&&"u">typeof navigator){l3("storagemutated",e=>{try{uL||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&u$(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&u$(e.changedParts)})}function uF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s2.rejectionMapper=function(e,t){if(!e||e instanceof sb||e instanceof TypeError||e instanceof SyntaxError||!e.name||!sE[e.name])return e;var n=new sE[e.name](t||e.message,e);return"stack"in e&&aG(n,"stack",{get:function(){return this.inner.stack}}),n},sd=lC;class uB extends uM{constructor(){super("EsmOffline"),uF(this,"syncQueue",void 0),uF(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function uV(){return new uB}let uU=new uB,uW={},uK=Z("offline-synchronization",{});function uz(){return uK}async function uH(){if(uK.getState().synchronization)return;let e=await uU.syncQueue.count(),t={},n=Object.entries(uW),r=n.length,o={},i=new AbortController,a=()=>{let e=uK.getState().synchronization;uK.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{uK.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<r&&n.length>0;e++)for(let e=n.length;e--;){let[r,s]=n[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[r]={},await Promise.all(l),t[r]=uq(s,o,i,a),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{uK.setState({synchronization:void 0})}}async function uq({type:e,dependsOn:t,process:n},r,o,i){let a=[],s=[],l=await uG();await uU.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:p,dependencies:f=[]}]=a[u];try{let i=await n(d,{abort:o,index:u,items:s,userId:l,dependencies:f.map(({id:e,type:n})=>t.includes(n)?r[n][e]:void 0)});void 0!==p&&(r[e][p]=i),await uU.syncQueue.delete(c)}catch(e){await uU.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function uG(){let e=await iy();return e?.uuid||"*"}async function uZ(e,t,n,r){let o=r&&r.id;return void 0!==o&&await uU.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(uM.errnames.DatabaseClosed),await uU.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(uM.errnames.DatabaseClosed,()=>-1)}async function uY(e,t,n){let r=await uG();return await uZ(r,e,t,n)}async function uJ(e,t){return(await uQ(e,t)).map(e=>e.content)}async function uQ(e,t){return await uU.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(uM.errnames.DatabaseClosed,()=>[])}async function uX(e){let t=await uG();return await uJ(t,e)}async function u0(e){let t=await uG();return await uQ(t,e)}async function u1(e){return await uU.syncQueue.get(e).catch(uM.errnames.DatabaseClosed,()=>void 0)}function u2(e){return!!uW[e]?.options.onBeginEditSyncItem}async function u4(e){let t=await u1(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let n=uW[t.type]?.options.onBeginEditSyncItem;if(!n)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function u3(e){await uU.syncQueue.delete(e).catch(uM.errnames.DatabaseClosed)}function u6(e,t,n,r={}){uW[e]={type:e,dependsOn:t,process:n,options:r}}let u5="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),u7=new Uint8Array(16),u9=[];for(let e=0;e<256;++e)u9.push((e+256).toString(16).slice(1));let u8=function(e,t,n){if(u5&&!t&&!e)return u5();let r=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(u7)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return u9[e[t+0]]+u9[e[t+1]]+u9[e[t+2]]+u9[e[t+3]]+"-"+u9[e[t+4]]+u9[e[t+5]]+"-"+u9[e[t+6]]+u9[e[t+7]]+"-"+u9[e[t+8]]+u9[e[t+9]]+"-"+u9[e[t+10]]+u9[e[t+11]]+u9[e[t+12]]+u9[e[t+13]]+u9[e[t+14]]+u9[e[t+15]]}(r)},ce="OFFLINE+";function ct(){return ce+u8()}function cn(e){return e.startsWith(ce)}let cr={};function co(){return Object.values(cr)}function ci(e){cr[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),cr[e.id]=e}async function ca(e){let t=await ch();return await cs(t,e)}async function cs(e,t){let n=new uB;return await n.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(uM.errnames.DatabaseClosed,()=>[])}async function cl(e,t){let n=await ch();return await cu(n,e,t)}async function cu(e,t,n){let r=new uB,o=await r.dynamicOfflineData.get({type:t,identifier:n}).catch(uM.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(uM.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(uM.errnames.DatabaseClosed)}async function cc(e,t){let n=await ch();return await cd(n,e,t)}async function cd(e,t,n){let r=new uB,o=await r.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(uM.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(uM.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(uM.errnames.DatabaseClosed))}async function cp(e,t){let n=await ca(e);await Promise.all(n.map(async e=>cf(e.type,e.identifier,t)))}async function cf(e,t,n){await cl(e,t);let r=new uB,o=await ch(),i=await r.dynamicOfflineData.get({type:e,identifier:t}).catch(uM.errnames.DatabaseClosed,()=>void 0),a=co().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(n){let t=n.message?.toString()??n.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await r.dynamicOfflineData.update(i.id,{syncState:d}).catch(uM.errnames.DatabaseClosed)}async function ch(){let e=(await iy()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let cm=Z("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function cy(){return cv(),cm}function cg(e,t){cv(),ci({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??new AbortController().signal})})}async function cb(e){cv(),await cf("patient",e)}function cv(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function cw(e,t,n=!0){if(e){let r=null,[o,i]=await Promise.all([io(`${ie}/Patient/${e}`,t).catch(e=>r=e),n?c_(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(r)throw r}return null}async function c_(e){let t=(await uX("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function cx(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function cS(e,t){let n=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}var cE=n(99549);function cD(e){return{uuid:e.uuid,display:e.display}}function cO(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return ii(`${o8}/location${r?"?"+r:""}`).pipe((0,cE.map)(e=>e.data.results.map(cD))).pipe((0,cE.take)(1))}function cP(e){return{uuid:e.uuid,display:e.display,name:e.name}}function ck(){return ii(`${o8}/visittype`).pipe((0,cE.map)(e=>e.data.results.map(cP))).pipe((0,cE.take)(1))}var cC=n(29827),cj=((es={}).NEWVISIT="startVisit",es.EDITVISIT="editVisit",es.LOADING="loadingVisit",es),cT=((el={}).NOTSTARTED="notStarted",el.ONGOING="ongoing",el);let cR="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))",cM=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function cN(){return J("visit",cM)}function cA(e,t){cN().setState({patientUuid:e,manuallySetVisitUuid:t})}function cI(e,t){return io(`${o8}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function c$(e,t,n){return io(`${o8}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function cL(e,t,n){return io(`${o8}/visit?patient=${e}&v=${n??cR}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}cN().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let cF=new cC.t(null);class cB{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+cB.version}static addUnaryOp(e){return cB.max_unop_len=Math.max(e.length,cB.max_unop_len),cB.unary_ops[e]=1,cB}static addBinaryOp(e,t,n){return cB.max_binop_len=Math.max(e.length,cB.max_binop_len),cB.binary_ops[e]=t,n?cB.right_associative.add(e):cB.right_associative.delete(e),cB}static addIdentifierChar(e){return cB.additional_identifier_chars.add(e),cB}static addLiteral(e,t){return cB.literals[e]=t,cB}static removeUnaryOp(e){return delete cB.unary_ops[e],e.length===cB.max_unop_len&&(cB.max_unop_len=cB.getMaxKeyLen(cB.unary_ops)),cB}static removeAllUnaryOps(){return cB.unary_ops={},cB.max_unop_len=0,cB}static removeIdentifierChar(e){return cB.additional_identifier_chars.delete(e),cB}static removeBinaryOp(e){return delete cB.binary_ops[e],e.length===cB.max_binop_len&&(cB.max_binop_len=cB.getMaxKeyLen(cB.binary_ops)),cB.right_associative.delete(e),cB}static removeAllBinaryOps(){return cB.binary_ops={},cB.max_binop_len=0,cB}static removeLiteral(e){return delete cB.literals[e],cB}static removeAllLiterals(){return cB.literals={},cB}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 cB(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 cB.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!cB.binary_ops[String.fromCharCode(e)]||cB.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return cB.isIdentifierStart(e)||cB.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(cB.hooks[e]){let n={context:this,node:t};return cB.hooks.run(e,n),n.node}return t}searchHook(e){if(cB.hooks[e]){let t={context:this};return cB.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===cB.SPACE_CODE||e===cB.TAB_CODE||e===cB.LF_CODE||e===cB.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:cB.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===cB.SEMCOL_CODE||n===cB.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===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,cB.max_binop_len),t=e.length;for(;t>0;){if(cB.binary_ops.hasOwnProperty(e)&&(!cB.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!cB.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,o,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:cB.binaryPrecedence(t),right_a:cB.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[i,o,a];t=this.gobbleBinaryOp();){if(0===(n=cB.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:n,right_a:cB.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&s(r[r.length-2]);)a=r.pop(),t=r.pop().value,i=r.pop(),e={type:cB.BINARY_EXP,operator:t,left:i,right:a},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(o,e)}for(s=r.length-1,e=r[s];s>1;)e={type:cB.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,cB.isDecimalDigit(e)||e===cB.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===cB.SQUOTE_CODE||e===cB.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===cB.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,cB.max_unop_len)).length;n>0;){if(cB.unary_ops.hasOwnProperty(t)&&(!cB.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!cB.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:cB.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}cB.isIdentifierStart(e)?(r=this.gobbleIdentifier(),cB.literals.hasOwnProperty(r.name)?r={type:cB.LITERAL,value:cB.literals[r.name],raw:r.name}:r.name===cB.this_str&&(r={type:cB.THIS_EXP})):e===cB.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===cB.PERIOD_CODE||t===cB.OBRACK_CODE||t===cB.OPAREN_CODE||t===cB.QUMARK_CODE;){let n;if(t===cB.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==cB.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===cB.OBRACK_CODE?((e={type:cB.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==cB.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===cB.OPAREN_CODE?e={type:cB.CALL_EXP,arguments:this.gobbleArguments(cB.CPAREN_CODE),callee:e}:(t===cB.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:cB.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;cB.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===cB.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);cB.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++));cB.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);cB.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,cB.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===cB.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===cB.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:cB.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!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 r||this.throwError('Unclosed quote after "'+e+'"'),{type:cB.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(cB.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,cB.isIdentifierPart(e))this.index++;else break;return{type:cB.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){n=!0,this.index++,e===cB.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===cB.COMMA_CODE){if(this.index++,++r!==t.length){if(e===cB.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===cB.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==cB.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(cB.CPAREN_CODE);if(this.code===cB.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:cB.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:cB.ARRAY_EXP,elements:this.gobbleArguments(cB.CBRACK_CODE)}}}Object.assign(cB,{hooks:new class{add(e,t,n){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][n?"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)})}}(cB),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"}),cB.max_unop_len=cB.getMaxKeyLen(cB.unary_ops),cB.max_binop_len=cB.getMaxKeyLen(cB.binary_ops);let cV=e=>new cB(e).parse(),cU=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(cB).filter(e=>!cU.includes(e)&&void 0===cV[e]).forEach(e=>{cV[e]=cB[e]}),cV.Jsep=cB,cV.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||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:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}});let cW="ArrowFunctionExpression",cK={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)}},cz={...cK,Promise};function cH(e,t={}){return cQ(e,t,c1)}async function cq(e,t={}){return cX(e,t,c1)}function cG(e,t={}){return cQ(e,t,c2)}function cZ(e,t={}){return cX(e,t,c2)}function cY(e,t={}){return cQ(e,t,c4)}function cJ(e,t={}){return cX(e,t,c4)}function cQ(e,t={},n){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 r=c9(t,cK),o=c3("string"==typeof e?cV(e):e,r);if(n(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 cX(e,t={},n){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 r=c9(t,cz);return Promise.resolve(c3("string"==typeof e?cV(e):e,r)).then(t=>{if(n(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 c0(e){return cV(e)}function c1(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function c2(e){return"boolean"==typeof e}function c4(e){return"number"==typeof e}function c3(e,t){switch(e.type){case"UnaryExpression":var n,r,o,i,a,s,l,u,c,d,p,f,h,m=e,y=t;let g=c3(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return c3(b.left,v)&&c3(b.right,v);case"||":return c3(b.left,v)||c3(b.right,v);case"??":return c3(b.left,v)??c3(b.right,v)}let w=c3(b.left,v),x=c3(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return n=e,r=t,c3(n.test,r)?c3(n.consequent,r):c3(n.alternate,r);case"CallExpression":return dt(c5(e,t));case"ArrowFunctionExpression":let S;return o=e,i=t,S=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<S.length)throw`Required argument(s) ${S.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(S.reduce((t,n,r)=>{let o=e[r];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 n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(o)&&t.push([n,o]),t},[]));return c3(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return dt(c7(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(dn(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(dn(u)))[E.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(dn(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.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,(dr(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 P,k;return p=e,f=t,P=p.expressions?.map(dn(f))??[],(k=p.quasis?.map(dn(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function c6(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return c6(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function c5(e,t){let n=de(e.callee,t);if(n===c8||e.optional&&null==n)return c8;let r=e.arguments?.map(dn(t));if(n){if("function"!=typeof n)throw`${ds(e.callee)} is not a function`}else throw`No function named ${ds(e.callee)} is defined in this context`;return n(...r)}function c7(e,t){let n=de(e.object,t);if(n===c8||e.optional&&null==n)return c8;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${da(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=c6(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${da(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof n&&"function"!=typeof n&&"string"!=typeof n&&"number"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;let r=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}(c3(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);dr(r),function(e,t){if(di.has(String(t)))return;let n=Object(e);for(;null!==n;){if(Object.hasOwn(n,t)){if(n===Object.prototype||n===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}n=Object.getPrototypeOf(n)}}(n,r);let o=n[r];return"function"==typeof o?o.bind(n):o}function c9(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}cV.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 n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:cW,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=cW,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),cV.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),cV.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 n(t){let n=this.index,r="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(r+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(r+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(a===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:r},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var o,i,a;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,i=u,95===o||i.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,n.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,r)})}}),cV.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,o=this.expr.slice(n,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{r=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),cV.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||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:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),cV.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},r="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",r="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=a}else r+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),cV.addBinaryOp("in",7),cV.addBinaryOp("??",1);let c8=Symbol("optional chain short-circuited");function de(e,t){switch(e.type){case"MemberExpression":return c7(e,t);case"CallExpression":return c5(e,t);default:return c3(e,t)}}function dt(e){return e===c8?void 0:e}function dn(e){return function(t){return null===t?null:c3(t,e)}}function dr(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let di=new Set(["toString","valueOf","hasOwnProperty"]);function da(e,t){try{return c6(e,t)}catch{return"<computed>"}}function ds(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function dl(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:{...cz},isLocalExpression:!1,variables:new Set};return du("string"==typeof e?cV(e):e,t),[...t.variables]}function du(e,t){switch(e.type){case"UnaryExpression":return r=e,o=t,du(r.argument,o);case"BinaryExpression":return i=e,a=t,[du(i.left,a),du(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[du(s.consequent,l),du(s.test,l),du(s.alternate,l)].filter(Boolean);case"CallExpression":let n;return u=e,c=t,n=du(u.callee,c),u.arguments?.map(dc(c)),n;case"ArrowFunctionExpression":var r,o,i,a,s,l,u,c,d,p,f,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let S=v.params?.map(dc(x))??[],E=du(v.body,x)??[];if(E&&Array.isArray(E))for(let e of E)S.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(du(D.object,O),D.computed)return void du(D.property,O);let P={...O};P.isLocalExpression=!0,du(D.property,P);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(dc(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(dc(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(dc(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(dc(b)),g.quasis?.map(dc(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function dc(e){return function(t){return null===t?null:du(t,e)}}let dd=J("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()});function dp(e,t,n){dd.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function df(){let e=dd.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function dh(e){return dd.getState().flags[e].enabled}function dm(e,t){dd.subscribe(n=>{t(n.flags[e].enabled)})}function dy(e,t){dd.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}function dg(e){return!window.offlineEnabled||(e??navigator.onLine)}dd.subscribe(e=>{for(let[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))});var db=e4(function(e,t,n){eH(e,t,n)});function dv(e=!0,t=!1){return dw(dg(),e,t)}function dw(e,t=!0,n=!1){return!!(e?t:n)}let d_=Z("extensionsInternal",{slots:{},extensions:{}}),dx=Z("extensionRenderings",{renderings:new Map}),dS=()=>J("extensionsInternal",{slots:{},extensions:{}}),dE=()=>J("extensionRenderings",{renderings:new Map});function dD(e){let t=d_.getState(),n=e(t);n!==t&&d_.setState(n)}let dO=null,dP=null;function dk(){let e=dx.getState();return dO&&e===dP||(dO=new Map(e.renderings),dP=e,function(e){for(let t of(dL.clear(),e.values()))dB(t,1);dF=!0}(dO)),dO}function dC(e){dP={renderings:e},dx.setState(dP,!0)}function dj(e){let t=dk();t.has(e.renderingId)||(t.set(e.renderingId,e),dB(e,1),dC(t))}function dT(e){let t=dk(),n=t.get(e);n&&(t.delete(e),dB(n,-1),dC(t))}let dR=()=>J("extensions",{slots:{}}),dM=0,dN=new Set;function dA(e){dM++;try{return e()}finally{if(0==--dM&&dN.size>0){let e=Array.from(dN);for(let t of(dN.clear(),e))dI(t)}}}function dI(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function d$(e){dM>0?dN.add(e):dI(e)}let dL=new Map,dF=!1;function dB(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=dL.get(n);if(!r){if(t<0)return;dL.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),dF=!0;return}r.count+=t,r.count<1&&(dL.delete(n),dF=!0)}function dV(){var e,t;if(dk(),!dF)return;dF=!1;let n=Array.from(dL.values(),({record:e})=>e);n.sort(dU),e=tF.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===dU(e,t[n]))||tF.setState({mountedExtensions:n})}function dU(e,t){return dW(e.slotName,t.slotName)||dW(e.extensionId,t.extensionId)||dW(e.slotModuleName,t.slotModuleName)||dW(e.extensionModuleName,t.extensionModuleName)}function dW(e,t){return e===t?0:e<t?-1:1}dV(),dx.subscribe(()=>d$(dV));let dK=dS(),dz=dR(),dH=tV(),dq=tK(),dG=new Set,dZ=!1;function dY(e){if(null===e)dG=null;else if(null!==dG)for(let t of e)dG.add(t);d$(dJ)}function dJ(){if(!dZ){dZ=!0;try{for(let e=1;;e++){let t=dG;if(null!==t&&0===t.size)return;dG=new Set;try{!function(e,t,n,r,o,i=null){let a=dz.getState().slots,s={},l=!1,u=dg(),c=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,d]of Object.entries(e.slots)){let p=a[r];if(p&&i&&!i.has(r)){s[r]=p;continue}let{config:f}=tW(t,d.name),h=function(e,t,n,r,o,i,a){let s=function(e,t){let n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=dK.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>d9(e,o,i[d1(e)]?.order,t)-d9(n,o,i[d1(n)]?.order,t))}(n,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=tH(r,e,u),c=tq(n,e,u),d=c?db({},s,c):s,p=d1(u),f=t.extensions[p];if(f){let e=d?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!im(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!dw(i,f.online,f.offline))continue;l.push({id:u,name:p,moduleName:f.moduleName,config:d,featureFlag:f.featureFlag,meta:f.meta,online:d?.["Display conditions"]?.online??f.online??!0,offline:d?.["Display conditions"]?.offline??f.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||f.displayExpression})}}return l}(r,e,f,n,c,u,o.session);p&&p.moduleName===d.moduleName&&(0,e6.A)(p.candidateExtensions,h)?s[r]=p:(s[r]={moduleName:d.moduleName,candidateExtensions:h},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&dz.setState({slots:s})}(dK.getState(),dH.getState(),dq.getState(),dd.getState(),is.getState(),t)}catch(e){throw dG=null===t||null===dG?null:new Set([...t,...dG]),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{dZ=!1}}}function dQ(e,t){let n=new Set;for(let r of Object.keys(e))e[r]!==t[r]&&n.add(r);for(let r of Object.keys(t))r in e||n.add(r);return n}function dX(){dY(null)}function d0(e,t){return{moduleName:t,name:e,attachedIds:[]}}function d1(e){let[t]=e.split("#");return t}function d2(e,t){let n=d1(t);return e.extensions[n]}function d4(e){return d2(dK.getState(),e)}dK.subscribe((e,t)=>{dY(e.extensions!==t.extensions?null:dQ(e.slots,t.slots))}),dH.subscribe((e,t)=>{dY(dQ(e.slots,t.slots))}),dq.subscribe((e,t)=>{dY(dQ(e.configs,t.configs))}),dd.subscribe(()=>dY(null)),is.subscribe(()=>dY(null)),dX(),b(dX);let d3=e=>dD(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function d6(e,t){dD(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...d0(e),attachedIds:[t]}}}})}function d5(e,t){dD(n=>{let r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function d7(e){dD(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function d9(e,t,n,r){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==n)return 1e3+n;let t=r.indexOf(e);return -1!==t?2e3+t:3e3}}function d8(e,t){return function(e,t,n=null,r){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:n,...t}:{session:n});try{return!!cG(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(pe(e),t,is.getState().session,e)}function pe(e){return dz.getState().slots[e]?.candidateExtensions??[]}let pt=(e,t)=>dK.setState(n=>{let r=n.slots[t]?.moduleName;if(r&&r!=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 ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let o=d0(t,e);return{...n,slots:{...n.slots,[t]:{...o}}}}),pn=()=>{dG=null,dD(()=>({slots:{},extensions:{}})),dE().setState({renderings:new Map}),dz.setState({slots:{}})},pr=Z("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function po({name:e,basePath:t,mode:n,componentContext:r,state:o}){pr.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:o})}function pi(e){pr.getState().slotName===e&&pr.setState(pr.getInitialState(),!0)}let pa=Z("modalRegistry",{modals:{}});function ps(e){pa.setState(t=>(t.modals[e.name]=e,t))}function pl(e){let t=pa.getState().modals[e];if(!t){let n=d4(e);n&&(t={name:e,load:n.load,moduleName:n.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.`),ps(t))}return t}let pu=Z("workspaceRegistrations",{workspaces:{}}),pc=Z("workspaceGroups",{workspaceGroups:{}});function pd(e){pu.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 pp(e){pc.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let pf=new Set;function ph(e){let t=pu.getState().workspaces;if(t[e])return t[e];{let t=d4(e);if(t){var n;let r;return pf.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.`),pf.add(e)),{name:t.name,title:(n=t,"string"==typeof(r=n?.meta?.title)?r:r&&"object"==typeof r?oZ(n.moduleName,r.key,r.default):n.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 pm(e){let t=pc.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let py=Z("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function pg(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=py.getState(),r=t[e];if(r){let t=n[r.window];if(t)return t;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function pb(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=py.getState(),r=n[e];if(r){let n=t[r.group];if(n)return n;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function pv(e){let{openedWindows:t}=py.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function pw(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=py.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}py.setState({registeredGroupsByName:r})}function p_(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=py.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace window ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}py.setState({registeredWindowsByName:r})}function px(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=py.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}py.setState({registeredWorkspacesByName:r})}let pS=0,pE=null,pD={bootstrap:15e3,mount:15e3,unmount:15e3};function pO(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(pD).filter(t=>e[t]).map(r=>{var o,i;let a,s;return[r,(o=e[r],i=pD[r],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${r} at array index ${i} for parcel ${n} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${r} for parcel ${n} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(r,!1),e),e=>{throw t(r,!0),e})})]}));return{...e,...r}}async function pP(e,t){var n,r;let o,i,a,s,l,u=await (pE??(pE=new Promise((e,t)=>{rv({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),rv))),pE),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return r=u((n=d.onSettled,"function"==typeof e?()=>e().then(e=>pO(e,n)):pO(e,n)),c),s=e=>t=>e.call(r,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===r.getStatus()&&d.release(),e}),l=r.update&&s(r.update),Object.defineProperty(r,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function pk(){return pC}function pC(e,t){let n,r=pP(e,t).then(e=>n=e);return{mount:()=>r.then(e=>e.mount()),unmount:()=>r.then(e=>e.unmount()),update:e=>r.then(t=>t.update?.(e)),getStatus:()=>n?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return r.then(e=>e.loadPromise)},get bootstrapPromise(){return r.then(e=>e.bootstrapPromise)},get mountPromise(){return r.then(e=>e.mountPromise)},get unmountPromise(){return r.then(e=>e.unmountPromise)}}}async function pj(e,t,n,r,o=e=>e,i={}){let a=d1(r),s=d4(r),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:d,offline:p,load:f}=s;if(dv(d,p)){let s,d=pS++,p=`${t}/${r}-${d}`;e.dataset.extensionRenderingId=p;let h=e=>{try{dT(p)}catch(t){console.error(e,t)}};try{dj({renderingId:p,extensionName:a,extensionModuleName:c,extensionId:r,slotName:t,slotModuleName:n})}catch(e){throw h(`Recomputing configuration after registering '${r}' failed also failed`),e}try{s=await f()}catch(e){throw h(`Recomputing configuration after '${r}' failed to load also failed`),e}try{l=await pP(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:u,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:c,extensionMeta:u},domElement:e})}catch(e){throw h(`Recomputing configuration after '${r}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${r}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${r}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${r}' failed`),e=>{console.error(`Extension '${r}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${r}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return l}var pT=n(35399),pR=n.n(pT);let pM=(0,pT.createContext)({moduleName:"",featureName:""});function pN({to:e,templateParams:t,onBeforeNavigate:n,children:r,...o}){return(0,pT.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}`)},[]),pR().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),oX({to:e,templateParams:t})),0===r.button&&(r.ctrlKey||r.metaKey)&&n?.(r),0===r.button&&r.shiftKey&&n?.(r),1===r.button&&n?.(r)},href:oJ(e,t),...o},r)}let pA=({state:e,children:t,...n})=>{let{extension:r}=(0,pT.useContext)(pM),o=(0,pT.useRef)(null),i=(0,pT.useRef)(Promise.resolve()),a=(0,pT.useRef)(!1),s=(0,pT.useRef)(!1),l=(0,pT.useRef)(e),u=(0,pT.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,pT.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.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 '${r?.extensionId}' failed to update`,e)}))},[]),d=(0,pT.useCallback)(t=>{t&&!o.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,pj(t,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,pT.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,pT.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),r?pR().createElement("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function pI(e){let t=(0,pT.useRef)(e);return F(t.current,e)||(t.current=e),t.current}function p$(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[r,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};n[r]=t}return n}let pL=e=>e;function pF(e,t=pL,n){let r=(0,pT.useCallback)(t=>e.subscribe(t),[e]),o=(0,pT.useCallback)(()=>t(e.getState()),[e,t]),i=(0,pT.useSyncExternalStore)(r,o,o),a=(0,pT.useMemo)(()=>n?p$(e,n):null,[e,n]);return(0,pT.useMemo)(()=>a?{...i,...a}:i,[i,a])}function pB(e,t){return pF(e,pL,t)}function pV(e){return function(t){let n=(0,pT.useCallback)(t=>e.subscribe(t),[]),r=(0,pT.useCallback)(()=>e.getState(),[]),o=(0,pT.useSyncExternalStore)(n,r,r),i=(0,pT.useMemo)(()=>t?p$(e,t):null,[t]);return(0,pT.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let pU=[];Object.freeze(pU);let pW={candidateExtensions:pU};Object.freeze(pW);let pK=e=>{let t=(0,pT.useCallback)(t=>t.slots?.[e]??pW,[e]);return pF(dR(),t)},pz=e=>e.session;function pH(e,t){let{candidateExtensions:n}=pK(e),r=pF(is,pz),o=pI(t);return(0,pT.useMemo)(()=>d8(e,o),[e,o,r,n])}function pq(e,t){let{moduleName:n}=(0,pT.useContext)(pM);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,pT.useEffect)(()=>{pt(n,e)},[n,e]),{extensions:pH(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function pG(e){return e}function pZ({name:e,extensionSlotName:t,select:n=pG,children:r,state:o,style:i,...a}){if(r&&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,pT.useRef)(null),{extensions:u,extensionSlotModuleName:c}=pq(s,o),d=(0,pT.useMemo)(()=>n(u),[n,u]),p=(0,pT.useMemo)(()=>{if("function"==typeof r&&!pR().isValidElement(r))return d.map(e=>r(e,o))},[r,d]);return pR().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>pR().createElement(pM.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},p?.[t]??("function"!=typeof r?r:null)??pR().createElement(pA,{state:o}))))}var pY=n(25873);function pJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pJ(Object(n),!0).forEach(function(t){var r,o,i;r=e,o=t,i=n[t],o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pX(e){return(pX="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 p0(e){return(p0="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 p1(e,t){var n;if("function"!=typeof(n=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 n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,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(p0(n)));return function(){var e=n(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(p0(e)));return e}}var p2=null;try{p2=require("react").createContext()}catch(e){}var p4={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 p3(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function p6(e,t){return new Promise(function(n,r){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,i=p8(e,t,function(){n(this)}),a=p1(e,t)(),s=function(e){var t=e.reactDom,n=e.renderType,r=e.elementToRender,o=e.domElement,i=t[n];if("function"!=typeof i)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(r),a;case"hydrateRoot":return i(o,r);default:return i(r,o),null}}({elementToRender:i,domElement:a,reactDom:p9(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function p5(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():p9(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function p7(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=p8(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=p1(e,t)();p9(e).render(r,i)}})}function p9(e){return e.ReactDOMClient||e.ReactDOM}function p8(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=p2?e.React.createElement(p2.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,pQ(pQ({},t),{},{mountFinished:n,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 fe=n(27807),ft=n(1619),fn=n.n(ft),fr=n(43432);let fo={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},fi=new Map;(0,fr.initCache)(fi);let fa={errorRetryCount:3,fetcher:io,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof ia){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>fi};function fs(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},fo,e),n={...fa,...t.swrConfig};return function(e){var r,o,i,a,s;return i=o=class extends(r=pR().Component){componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return pR().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=pR().createElement(pT.Suspense,{fallback:null},pR().createElement(ft.SWRConfig,{value:n},pR().createElement(pM.Provider,{value:this.state.config},t.disableTranslations?pR().createElement(e,this.props):pR().createElement(fe.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},pR().createElement(e,this.props)))));return t.strictMode&&pR().StrictMode?pR().createElement(pR().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function fl(e,t){return function(e){if("object"!==pX(e))throw Error("single-spa-react requires a configuration object");var t,n=pQ(pQ({},p4),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!p2&&n.React.createContext&&(p2=n.React.createContext()),n.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}(n);var r={bootstrap:p3.bind(null,n),mount:p6.bind(null,n),unmount:p5.bind(null,n)};return n.parcelCanUpdate&&(r.update=p7.bind(null,n)),r}({React:pR(),ReactDOMClient:pY,rootComponent:fs(t)(e)})}function fu(e,t){return()=>e().then(({default:e})=>fl(e,t))}function fc(e,t){return()=>Promise.resolve(fl(e,t))}let fd=fu,fp=W()(()=>({}));Y("openmrs-app-context",fp);let ff={};function fh(e,t=e=>e){let n=fp.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function fm(e,t){fp.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function fy(e){return null===e?null:Object.freeze(Object.assign({},e))}let fg=new Map;function fb(e,t){let n=(0,pT.useRef)(t??{}),r=(0,pT.useRef)(t=>fm(e,t)),o=(0,pT.useRef)(Symbol());return(0,pT.useEffect)(()=>{let n=t??{},r=o.current;return null===fh(e)?!function(e,t=ff){fp.setState(n=>{if(e in n)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({},n,{[e]:t===ff?{}:t})})}(e,n):(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.`),fm(e,()=>n)),fg.set(e,r),()=>{fg.get(e)===r&&(fp.setState(t=>(e in t&&delete t[e],t)),fg.delete(e))}},[e]),(0,pT.useEffect)(()=>{let r=t??{};F(n.current,r)||(fm(e,()=>r),n.current=r)},[t]),r.current}function fv({namespace:e,value:t}){return fb(e,t),null}let fw=({children:e,value:t,fallback:n})=>t?pR().createElement(pR().Fragment,null,e):n?pR().createElement(pR().Fragment,null,n):null;function f_(){let e=(0,pT.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,pT.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function fx(e,t=e=>e??{}){let[n,r]=(0,pT.useState)(()=>{if(fS(e))return;let n=fh(e);if(null!==n)return t?t(n):n});return(0,pT.useEffect)(()=>{if(fS(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,pT.useEffect)(()=>{var n;let o;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>F(e,n)?e:n)})(fy(o=fh(e))),fp.subscribe(t=>{let r=e in t?t[e]:null;r!==o&&(o=r,n(fy(r)))})},[e,t]),n}function fS(e){return"string"!=typeof e||0===e.trim().length}function fE(e){let t=pH(e);return(0,pT.useMemo)(()=>t.map(e=>e.id),[t])}function fD(e){return pK(e).candidateExtensions}function fO(e,t,n){let{data:r,error:o,mutate:i,isLoading:a,isValidating:s}=fn()(e?ac(e,t,n):null,io);return(0,pT.useMemo)(()=>({isLoading:a,data:r?.data.results??[],error:o,mutate:i,isValidating:s}),[r,o,a,s,i])}function fP(e){(0,pT.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let fk={},fC=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
- Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function fj(e){let{moduleName:t,extension:n}=(0,pT.useContext)(pM),r=e?.externalModuleName??t;if(!r&&!n)throw Error(fC);let o=function(e){let t=(0,pT.useMemo)(()=>tB(e),[e]),n=function(e){let[t,n]=(0,pT.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,pT.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw fk[e]||(fk[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),fk[e];return n}(r),i=function(e){let t=(0,pT.useMemo)(tK,[]),n=function(e,t){let[n,r]=(0,pT.useState)(t?()=>{let n=tH(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,pT.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=tH(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,e6.A)(o.config,n)&&r(o.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!fk[n]&&t&&(fk[n]=new Promise(n=>{let r=t.subscribe(t=>{let o=tH(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())})})),fk[n]}return n||{}}(n);return(0,pT.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...o}:{...o,...i},[r,e?.externalModuleName,o,i])}let fT=pH;function fR(){let[e,t]=(0,pT.useState)(dg());return(0,pT.useEffect)(()=>b(({online:e})=>t(e)),[]),e}function fM(e,t=300){let[n,r]=(0,pT.useState)(e);return(0,pT.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var fN=n(13660),fA=n.n(fN);let fI=`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 f$(){let e=`${o8}/emrapi/configuration?v=${fI}`,t=fA()(e,io);return(0,pT.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function fL(){return(0,pT.useContext)(pM).extension}let fF=pV(dS());function fB(e){let t=pH(e);return(0,pT.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let fV=pV(dR());function fU(e){let{flags:t}=pF(dd);return t[e]?.enabled??!1}function fW(){let[,e]=(0,pT.useState)(0);return(0,pT.useCallback)(()=>{e(e=>e+1)},[])}function fK(e,t,n={}){return fH(e,t,fz,n)}let fz={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(ir(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.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 fH(e,t,n,r={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??io,[d,p]=(0,pT.useState)(1),f=(0,pT.useRef)(NaN),h=(0,pT.useRef)(NaN),m=(0,pT.useRef)(d),y=(0,pT.useRef)(!1),g=(0,pT.useRef)(!1),b=e?.toString()??"",[v,w]=(0,pT.useState)(b);b!==v&&(w(b),p(1),m.current=1,f.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,S=(0,pT.useMemo)(()=>o(e,t,x),[e,t,x]),{data:E,...D}=(l?fA():fn())(S,c,u);E?.data&&(f.current=i(E?.data),h.current=a(E?.data),y.current=!0);let O=Math.ceil(f.current/t),P=(0,pT.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let n=Math.ceil(f.current/t);!y.current||Number.isNaN(n)||e<=n?(m.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,pT.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(f.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} 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}.`),m.current=e,p(e))},[d,t,b,E]);let k=(0,pT.useCallback)(()=>{P(m.current+1)},[P]),C=(0,pT.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(E?.data),totalPages:O,totalCount:f.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...D}}function fq(e,t,n={}){return fH(e,t,fG(),n)}function fG(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(ir(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.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 fZ=n(30682),fY=n.n(fZ);function fJ(e,t={}){return fQ(e,fz,t)}function fQ(e,t,n={}){let{swrInfiniteConfig:r,immutable:o}=n,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=n.fetcher??io,u=(0,pT.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:p,...f}=fY()(u,l,{...r,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{p((c?.length??0)+1)},nextUri:h,...f}}function fX(e,t={}){return f0(e,fz,t)}function f0(e,t,n={}){let r=fQ(e,t,n),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=r;return((0,pT.useEffect)(()=>{o&&!i&&s()},[o,u]),n.partialData)?r:{...r,data:o||i?void 0:a,isLoading:l||o}}function f1(e,t={}){return f0(e,fG(),t)}function f2(e,t={}){return fQ(e,fG(),t)}function f4(){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 f3(){let[e,t]=(0,pT.useState)(f4);return(0,pT.useEffect)(()=>{let e=()=>{t(f4())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let f6=e=>"small-desktop"===e||"large-desktop"===e;function f5(e){let t=(0,pT.useContext)(pM);(0,pT.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),po(e),()=>{pi(e.name)}),[t,e])}function f7(){return pF(pr)}function f9(e=null,t=null){let[n,r]=(0,pT.useState)([]);return(0,pT.useEffect)(()=>{let n=cO(e,t).subscribe(e=>{r(e)},e=>{console.error(e)});return()=>n.unsubscribe()},[e,t]),n}function f8(e,t=!0){let n=(0,pT.useRef)(null);return(0,pT.useEffect)(()=>{let r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}function he(e){let t=(0,pT.useRef)();return(0,pT.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function ht(e,t={}){let{abortController:n,fetchInit:r,url:o,swrConfig:i}=t,a=f_(),s=(0,pT.useMemo)(()=>r?.signal??n?.signal??a.signal,[n?.signal,r?.signal,a.signal]),l=(0,pT.useCallback)(e=>io(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),{...r,signal:s}),[s,r,o]);return fn()(e,l,i)}function hn(e=[],t=10){let[n,r]=(0,pT.useState)(1),o=(0,pT.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);n>o&&r(o);let i=Math.min(Math.max(1,n),o),a=(0,pT.useMemo)(()=>{let n=(i-1)*t,r=(i+0)*t;return e.slice(n,r)},[e,i,t]),s=(0,pT.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,pT.useCallback)(()=>{r(e=>e+1)},[]),u=(0,pT.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,pT.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function hr(e,t,n,r){return{pageSizes:(0,pT.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,pT.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function ho(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function hi(e){let[t,n]=(0,pT.useState)(e??ho()),{data:r,error:o,isValidating:i}=fn()(t?["patient",t]:null,()=>cw(t,{}));return(0,pT.useEffect)(()=>{let e=()=>{let e=ho();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,pT.useMemo)(()=>({isLoading:i&&!o&&!r,patient:r,patientUuid:t,error:o}),[i,o,r,t])}function ha(){let e=`${o8}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=fn()(e,io);return(0,pT.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function hs(e){let{extensions:t,extensionSlotModuleName:n}=pq(e);return e?t.map(t=>({state:r})=>pR().createElement(pM.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n,extensionMeta:t.meta}}},pR().createElement(pA,{state:r}))):[]}function hl(){let e=(0,pT.useRef)(),[t,n]=(0,pT.useState)(null),r=null;if(!t){if(s){let e=ic().getState();e.loaded&&(r=e.session)}else s=new Promise(t=>{let n=({loaded:n,session:o})=>{n&&(t(o),r=o,e.current&&(e.current(),e.current=void 0))};n(ic().getState()),r||(e.current=ic().subscribe(n))});if(r)n(r);else throw s}(0,pT.useEffect)(()=>(e.current||(e.current=ic().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||r;if(!o)if(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let hu=({privilege:e,fallback:t,children:n})=>{let[r,o]=(0,pT.useState)(null);return((0,pT.useEffect)(()=>{let e=iu({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),r&&im(e,r))?pR().createElement(pR().Fragment,null,n):t?pR().createElement(pR().Fragment,null,t):null};var hc=n(80222),hd=n.n(hc),hp=n(85602);let hf=new Map;function hh(){for(let e of Array.from(hf.values()))e()}let hm={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function hy(e){let t=(0,pT.useId)();return(0,pT.useEffect)(()=>{if(e)return hf.set(t,e),()=>{hf.delete(t)}},[t,e]),{...pB(cN(),hm),mutateVisit:hh}}function hg(e,t=cR){let n=(0,pT.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:o,setVisitContext:i}=hy((0,pT.useCallback)(()=>n.current?.(),[])),a=e&&r==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=fn()(e?`${o8}/visit${s}`:null,io),{data:f,error:h,mutate:m,isValidating:y}=fn()(e&&a?`${o8}/visit${l}`:null,io),g=(0,pT.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,pT.useMemo)(()=>a&&f?f.data:null,[f,a]),v=(0,pT.useRef)(null);(0,pT.useEffect)(()=>{!p&&g&&r===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,p,y,r]);let w=(0,pT.useCallback)(()=>{d(),m()},[d,m]);(0,pT.useEffect)(()=>{n.current=w},[w]);let x=!!(!u||a&&!f),S=!!(a?h:c);return{error:c||h,mutate:w,isValidating:p||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!S}}function hb(){let[e,t]=(0,pT.useState)([]);return(0,pT.useEffect)(()=>{let e=ck().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}hd().extend(hp);let hv=new Map;async function hw(e,t){let n=t.indexOf("#"),r=n>=0,o=r?t.substring(0,n):e,i=r?t.substring(n+1):t,a=await iq(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?hx(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),h_)}let h_={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function hx(e,t){if(e in hv)await hv[e];else{let n=t??await iq(e);await (hv[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let o=n.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{nr(e),t(null)}).catch(r)}nr(e),t(null)}))}}function hS(e,t){let n=t.name;if(!n)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
15
+ ${this.stack}`}}let io=Z("session",{loaded:!1,session:null}),ii=0;function ia(e={includeAuthStatus:!0}){return(ii<Date.now()-6e4||!io.getState().loaded)&&iu(),new eh.c(t=>{let n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(io.getState()),io.subscribe(n)})}function is(){return(ii<Date.now()-6e4||!io.getState().loaded)&&iu(),io}function il(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 iu(e,t){ii=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),ig(ie(o9,{headers:n}))}function ic(){io.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function id(e,t){var n,r;if(void 0===t)return!e;if(!e)return!0;return n=e,r=t,("string"==typeof n?!ee(r.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!ee(r.privileges.find(t=>e===t.display))):(ee(n)||console.error(`Could not understand privileges "${n}"`),!0))||!ee(t.roles.find(e=>"System Developer"===e.display))}function ip(){let e,t;return new Promise(n=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(io.getState()),e||(t=io.subscribe(r))})}function ih(){return new Promise((e,t)=>{ia().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function im(e,t){return ig(ie(o9,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function iy(e,t,n){return n||(n=new AbortController),await ie(`${o5}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),iu()}function ig(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},io.setState(r),t(r)):(r={loaded:!1,session:null},io.setState(r),n(r))}).catch(e=>{I(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};io.setState(t),n(t)})})}function ib(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}io.subscribe(e=>{e.loaded&&e.session&&il(e.session)});let iv={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function iw(){t9("@openmrs/esm-api",o3),iu()}let i_="import-map-override:",ix="import-map-overrides-disabled",iS="import-map-overrides:change",iE=!1,iD=null,iO=null;async function iP(){return iO??(iO=ik().then(({map:e,complete:t})=>(t||(iO=null),e))),iO}async function ik(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],n=!0;for(let r=0;r<e.length;r++){let o=e[r];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){n=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${r}`,e)}}return{map:iC(t),complete:n}}function iC(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function ij(){let e={};try{let t=iM();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(i_)){let n=r.slice(i_.length);if(!t.includes(n)){let t=localStorage.getItem(r);t&&(e[n]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function iT(){let e=await iP();return iE?iC([e,iD??ij()]):e}async function iR(){return iP()}async function iN(){return iE?iC([await iP(),ij()]):iP()}function iA(e){if(!iE)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(i_)){let t=localStorage.getItem(n);t&&(e[n.slice(i_.length)]=t)}}return{imports:e}}return ij()}function iM(){if(!iE)return[];try{let e=localStorage.getItem(ix);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function iI(e){return!!iE&&iM().includes(e)}function i$(e,t){if(!iE)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(i_+e,t),window.dispatchEvent(new CustomEvent(iS))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function iL(e){if(!iE)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(i_+e);let t=iM().filter(t=>t!==e);t.length>0?localStorage.setItem(ix,JSON.stringify(t)):localStorage.removeItem(ix),window.dispatchEvent(new CustomEvent(iS))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function iF(){if(!iE)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 n=localStorage.key(t);n?.startsWith(i_)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(ix),window.dispatchEvent(new CustomEvent(iS))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function iB(e){if(!iE)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=iM().filter(t=>t!==e);t.length>0?localStorage.setItem(ix,JSON.stringify(t)):localStorage.removeItem(ix),window.dispatchEvent(new CustomEvent(iS))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let iV=!1;function iU(){!iV&&(iV=!0,(iE="development"===window.spaEnv)&&(iD=ij()))}function iW(e){return e.replace(/[\/\-@]/g,"_")}async function iK(e,t="./start",r){var o;let i,a=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([iH(e,r?.importMap),new Promise((t,n)=>{i=setTimeout(()=>{var t;n(Error(`Could not resolve requested script, ${e}, within ${(t=a)<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`}.`))},a)})]),i&&clearTimeout(i);let s=iW(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(n.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 iH(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 n=iW(e);if(!window[n]){let n=t??await iz();if(!n.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let r=n.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let o=e in iA().imports;try{return await function(e){var t;let n=(t=window)[iG]??(t[iG]=new Map),r=n.get(e);if(r)return r;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 i=new Promise((t,r)=>{let i=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 a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),n.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),r(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return n.set(e,i),i}(r)}catch(e){return o&&T({kind:"error",title:oG("scriptLoadingFailed","Error: Script failed to load"),description:oG("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:r}),actionButtonLabel:oG("resetOverrides","Reset overrides"),onActionButtonClick(){iF(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function iz(){return iT()}let iG=Symbol.for("__openmrs_script_loading");function iq(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 iZ(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&&iq(t))}let iY="openmrs-routes:",iJ="openmrs-routes:change",iQ=!1,iX=null,i0=null;async function i1(){return i0??(i0=i2().then(({map:e,complete:t})=>(t||(i0=null),e))),i0}async function i2(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],n=!0;for(let r=0;r<e.length;r++){let o=e[r];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&&iZ(e)&&t.push(e)}catch(e){n=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${r}`,e)}}return{map:i4(t),complete:n}}function i4(e){let t={routes:{}};for(let n of e)n&&"object"==typeof n&&!Array.isArray(n)&&(Object.assign(t.routes,n.routes),void 0===t.version&&void 0!==n.version&&(t.version=n.version));return t}async function i3(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n?.startsWith(iY)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(iY.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(iq(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(iq(r))return{moduleName:e,routes:r};throw Error(`${n} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===n.status?e.routes[n.value.moduleName]=n.value.routes:console.warn("[route-maps] Failed to load route override",n.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function i6(){let e=await i1();return iQ?i4([e,iX??await i3()]):e}async function i5(){return i1()}async function i7(){return iQ?i4([await i1(),await i3()]):i1()}function i9(){if(!iQ)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(iY)){let t=localStorage.getItem(n);t&&(e[n.slice(iY.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function i8(e,t){if(!iQ)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(iY+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!iq(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(iY+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(iY+e,JSON.stringify(t.toString()));else{if(!iq(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(iY+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(iJ))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function ae(e){if(!iQ)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(iY+e),window.dispatchEvent(new CustomEvent(iJ))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function at(){if(!iQ)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(iY)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(iJ))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let an=null;function ar(){return an||(an=(iQ="development"===window.spaEnv)?i3().then(e=>{iX=e}):Promise.resolve())}let ao=`${o5}/attachment`;function ai(e,t){return ie(`${ao}/${e}`,{signal:t.signal})}function aa(e,t,n,r){return ie(as(e,t,r),{signal:n.signal})}function as(e,t,n){return n?`${ao}?patient=${e}&encounter=${n}`:`${ao}?patient=${e}&includeEncounterless=${t}`}async function al(e,t,n){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),n&&r.append("encounter",n),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),ie(`${ao}`,{method:"POST",body:r})}function au(e,t){return ie(`${ao}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ac(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])})}function ad(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ap(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var af=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function ah(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var am=function(e,t){this.type=e,Object.assign(this,t)};function ay(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ag(){}var ab={type:"SKIP_WAITING"};function av(e,t){if(!t)return e&&e.then?e.then(ag):Promise.resolve()}var aw=function(e){function t(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new af,r.en=new af,r.on=new af,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!ah(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new am(o,a)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new am("waiting",a))},200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new am("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},o=function(e){var t=e.data,n=e.ports,o=e.source;return ay(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new am("message",{data:t,originalEvent:e,ports:n,sw:o}))})},r.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n,r,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r,o,i,a=this;return r=function(){if(!n&&"complete"!==document.readyState)return av(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),ay(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&ah(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new am("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=r())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?av(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return ay(this.getSW(),function(t){return ac(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ac(this.fn.waiting,ab)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&ah(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return ay(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},n=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],ad(t.prototype,n),r&&ad(t,r),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return ap(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ap(e,void 0):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function a_(e,t){if(void 0!==p)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),p;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let n=new aw(e,t);return p=n.register().then(()=>n.controlling.then(()=>n))}function ax(){return p??Promise.resolve(void 0)}let aS="x-omrs-offline-response-body",aE="x-omrs-offline-response-status",aD="x-omrs-offline-caching-strategy";async function aO(e){let t=await ax();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function aP(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function ak(){return!window.indexedDB}async function aC(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function aj(){return await aC()||await ak()||await aP()}let aT="openmrs3:offline-mode",aR="unavailable";function aN(){return{current:aR,notAvailable:"unavailable"===aR,active:"on"===aR}}function aA(e){"unavailable"!==aR&&"unavailable"!==e&&(localStorage.setItem(aT,"on"===e?"active":"disabled"),aR=e)}async function aM(){await aj()||(aR="active"===localStorage.getItem(aT)?"on":"off"),navigator.onLine}let aI="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,a$=Object.keys,aL=Array.isArray;function aF(e,t){return"object"!=typeof t||a$(t).forEach(function(n){e[n]=t[n]}),e}"u"<typeof Promise||aI.Promise||(aI.Promise=Promise);let aB=Object.getPrototypeOf,aV={}.hasOwnProperty;function aU(e,t){return aV.call(e,t)}function aW(e,t){"function"==typeof t&&(t=t(aB(e))),("u"<typeof Reflect?a$:Reflect.ownKeys)(t).forEach(n=>{aH(e,n,t[n])})}let aK=Object.defineProperty;function aH(e,t,n,r){aK(e,t,aF(n&&aU(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function az(e){return{from:function(t){return e.prototype=Object.create(t.prototype),aH(e.prototype,"constructor",e),{extend:aW.bind(null,e.prototype)}}}}let aG=Object.getOwnPropertyDescriptor;function aq(e,t){let n;return aG(e,t)||(n=aB(e))&&aq(n,t)}let aZ=[].slice;function aY(e,t,n){return aZ.call(e,t,n)}function aJ(e,t){return t(e)}function aQ(e){if(!e)throw Error("Assertion Failed")}function aX(e){aI.setImmediate?setImmediate(e):setTimeout(e,0)}function a0(e,t){return e.reduce((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e},{})}function a1(e,t){if(aU(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=a1(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:a1(s,t.substr(a+1))}}function a2(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){aQ("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)a2(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?aL(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var l=e[a];l&&aU(e,a)||(l=e[a]={}),a2(l,s,n)}}else void 0===n?aL(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function a4(e){var t={};for(var n in e)aU(e,n)&&(t[n]=e[n]);return t}let a3=[].concat;function a6(e){return a3.apply([],e)}let a5="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(a6([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>aI[e]),a7=a5.map(e=>aI[e]);a0(a5,e=>[e,!0]);let a9=null;function a8(e){a9="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let n=a9&&a9.get(t);if(n)return n;if(aL(t)){n=[],a9&&a9.set(t,n);for(var r=0,o=t.length;r<o;++r)n.push(e(t[r]))}else if(a7.indexOf(t.constructor)>=0)n=t;else{let r=aB(t);for(var i in n=r===Object.prototype?{}:Object.create(r),a9&&a9.set(t,n),t)aU(t,i)&&(n[i]=e(t[i]))}return n}(e);return a9=null,t}let{toString:se}={};function st(e){return se.call(e).slice(8,-1)}let sn="u">typeof Symbol?Symbol.iterator:"@@iterator",sr="symbol"==typeof sn?function(e){var t;return null!=e&&(t=e[sn])&&t.apply(e)}:function(){return null},so={};function si(e){var t,n,r,o;if(1==arguments.length){if(aL(e))return e.slice();if(this===so&&"string"==typeof e)return[e];if(o=sr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}let sa="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var ss="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),sl=()=>!0;let su=!Error("").stack;function sc(){if(su)try{throw sc.arguments,Error()}catch(e){return e}return Error()}function sd(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(sl).map(e=>"\n"+e).join("")):""}var sp=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],sf=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(sp),sh={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function sm(e,t){this._e=sc(),this.name=e,this.message=t}function sy(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function sg(e,t,n,r){this._e=sc(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=sy(e,t)}function sb(e,t){this._e=sc(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=sy(e,t)}az(sm).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+sd(this._e,2))}},toString:function(){return this.name+": "+this.message}}),az(sg).from(sm),az(sb).from(sm);var sv=sf.reduce((e,t)=>(e[t]=t+"Error",e),{}),sw=sf.reduce((e,t)=>{var n=t+"Error";function r(e,r){this._e=sc(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=sh[t]||n,this.inner=null)}return az(r).from(sm),e[t]=r,e},{});sw.Syntax=SyntaxError,sw.Type=TypeError,sw.Range=RangeError;var s_=sp.reduce((e,t)=>(e[t+"Error"]=sw[t],e),{}),sx=sf.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=sw[t]),e),{});function sS(){}function sE(e){return e}function sD(e,t){return null==e||e===sE?t:function(n){return t(e(n))}}function sO(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function sP(e,t){return e===sS?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?sO(r,this.onsuccess):r),o&&(this.onerror=this.onerror?sO(o,this.onerror):o),void 0!==i?i:n}}function sk(e,t){return e===sS?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?sO(n,this.onsuccess):n),r&&(this.onerror=this.onerror?sO(r,this.onerror):r)}}function sC(e,t){return e===sS?t:function(n){var r=e.apply(this,arguments);aF(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?sO(o,this.onsuccess):o),i&&(this.onerror=this.onerror?sO(i,this.onerror):i),void 0===r?void 0===a?void 0:a:aF(r,a)}}function sj(e,t){return e===sS?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function sT(e,t){return e===sS?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}sx.ModifyError=sg,sx.DexieError=sm,sx.BulkError=sb;var sR={};let[sN,sA,sM]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,aB(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,aB(t),e]})(),sI=sA&&sA.then,s$=sN&&sN.constructor,sL=!!sM;var sF=!1,sB=sM?()=>{sM.then(s7)}:aI.setImmediate?setImmediate.bind(null,s7):aI.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{s7(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(s7,0)},sV=function(e,t){sY.push([e,t]),sW&&(sB(),sW=!1)},sU=!0,sW=!0,sK=[],sH=[],sz=null,sG=sE,sq={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:lw,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{lw(e[0],e[1])}catch(e){}})}},sZ=sq,sY=[],sJ=0,sQ=[];function sX(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=sS,this._lib=!1;var t=this._PSD=sZ;if(ss&&(this._stackHolder=sc(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==sR)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&s2(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(n=>{if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var r=t._lib&&s9();n&&"function"==typeof n.then?e(t,(e,t)=>{n instanceof sX?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,s4(t)),r&&s8()}},s2.bind(null,t))}catch(e){s2(t,e)}}(this,e)}let s0={get:function(){var e=sZ,t=ls;function n(n,r){var o=!e.global&&(e!==sZ||t!==ls);let i=o&&!ld();var a=new sX((t,a)=>{s3(this,new s1(lb(n,e,o,i),lb(r,e,o,i),t,a,e))});return ss&&s5(a,this),a}return n.prototype=sR,n},set:function(e){aH(this,"then",e&&e.prototype===sR?s0:{get:function(){return e},set:s0.set})}};function s1(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function s2(e,t){if(sH.push(t),null===e._state){var n=e._lib&&s9();t=sG(t),e._state=!1,e._value=t,ss&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=aq(t,"stack");t._promise=e,aH(t,"stack",{get:()=>sF?n&&(n.get?n.get.apply(t):n.value):e.stack})}),sK.some(t=>t._value===e._value)||sK.push(e),s4(e),n&&s8()}}function s4(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)s3(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===sJ&&(++sJ,sV(()=>{0==--sJ&&le()},[]))}function s3(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++sJ,sV(s6,[n,e,t])}else e._listeners.push(t)}function s6(e,t,n){try{sz=t;var r,o=t._value;t._state?r=e(o):(sH.length&&(sH=[]),r=e(o),-1===sH.indexOf(o)&&function(e){for(var t=sK.length;t;)if(sK[--t]._value===e._value)return void sK.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{sz=null,0==--sJ&&le(),--n.psd.ref||n.psd.finalize()}}function s5(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function s7(){s9()&&s8()}function s9(){var e=sU;return sU=!1,sW=!1,e}function s8(){var e,t,n;do for(;sY.length>0;)for(e=sY,sY=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(sY.length>0);sU=!0,sW=!0}function le(){var e=sK;sK=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=sQ.slice(0),n=t.length;n;)t[--n]()}function lt(e){return new sX(sR,!1,e)}function ln(e,t){var n=sZ;return function(){var r=s9(),o=sZ;try{return lm(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{lm(o,!1),r&&s8()}}}aW(sX.prototype,{then:s0,_then:function(e,t){s3(this,new s1(null,null,e,t,sZ))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):lt(e)):this.then(null,e=>e&&e.name===t?n(e):lt(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),lt(t)))},stack:{get:function(){if(this._stack)return this._stack;try{sF=!0;var e=(function e(t,n,r){if(n.length===r)return n;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=sd(s,0)):(i=s,a=""),n.push(i+(a?": "+a:"")+o)}return ss&&((o=sd(t._stackHolder,2))&&-1===n.indexOf(o)&&n.push(o),t._prev&&e(t._prev,n,r)),n})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{sF=!1}}},timeout:function(e,t){return e<1/0?new sX((n,r)=>{var o=setTimeout(()=>r(new sw.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&aH(sX.prototype,Symbol.toStringTag,"Dexie.Promise"),sq.env=ly(),aW(sX,{all:function(){var e=si.apply(null,arguments).map(lp);return new sX(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((o,i)=>sX.resolve(o).then(n=>{e[i]=n,--r||t(e)},n))})},resolve:e=>{if(e instanceof sX)return e;if(e&&"function"==typeof e.then)return new sX((t,n)=>{e.then(t,n)});var t=new sX(sR,!0,e);return s5(t,sz),t},reject:lt,race:function(){var e=si.apply(null,arguments).map(lp);return new sX((t,n)=>{e.map(e=>sX.resolve(e).then(t,n))})},PSD:{get:()=>sZ,set:e=>sZ=e},totalEchoes:{get:()=>ls},newPSD:lu,usePSD:lg,scheduler:{get:()=>sV,set:e=>{sV=e}},rejectionMapper:{get:()=>sG,set:e=>{sG=e}},follow:(e,t)=>new sX((n,r)=>lu((t,n)=>{var r=sZ;r.unhandleds=[],r.onunhandled=n,r.finalize=sO(function(){var e;e=()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])},sQ.push(function t(){e(),sQ.splice(sQ.indexOf(t),1)}),++sJ,sV(()=>{0==--sJ&&le()},[])},r.finalize),e()},t,n,r))}),s$&&(s$.allSettled&&aH(sX,"allSettled",function(){let e=si.apply(null,arguments).map(lp);return new sX(t=>{0===e.length&&t([]);let n=e.length,r=Array(n);e.forEach((e,o)=>sX.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--n||t(r)))})}),s$.any&&"u">typeof AggregateError&&aH(sX,"any",function(){let e=si.apply(null,arguments).map(lp);return new sX((t,n)=>{0===e.length&&n(AggregateError([]));let r=e.length,o=Array(r);e.forEach((e,i)=>sX.resolve(e).then(e=>t(e),e=>{o[i]=e,--r||n(AggregateError(o))}))})}));let lr={awaits:0,echoes:0,id:0};var lo=0,li=[],la=0,ls=0,ll=0;function lu(e,t,n,r){var o=sZ,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ll;var a=sq.env;i.env=sL?{Promise:sX,PromiseProp:{value:sX,configurable:!0,writable:!0},all:sX.all,race:sX.race,allSettled:sX.allSettled,any:sX.any,resolve:sX.resolve,reject:sX.reject,nthen:lv(a.nthen,i),gthen:lv(a.gthen,i)}:{},t&&aF(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=lg(i,e,n,r);return 0===i.ref&&i.finalize(),s}function lc(){return lr.id||(lr.id=++lo),++lr.awaits,lr.echoes+=100,lr.id}function ld(){return!!lr.awaits&&(0==--lr.awaits&&(lr.id=0),lr.echoes=100*lr.awaits,!0)}function lp(e){return lr.echoes&&e&&e.constructor===s$?(lc(),e.then(e=>(ld(),e),e=>(ld(),l_(e)))):e}function lf(e){++ls,lr.echoes&&0!=--lr.echoes||(lr.echoes=lr.id=0),li.push(sZ),lm(e,!0)}function lh(){var e=li[li.length-1];li.pop(),lm(e,!1)}function lm(e,t){var n,r=sZ;if((t?!lr.echoes||la++&&e===sZ:!la||--la&&e===sZ)||(n=t?lf.bind(null,e):lh,sI.call(sN,n)),e!==sZ&&(sZ=e,r===sq&&(sq.env=ly()),sL)){var o=sq.env.Promise,i=e.env;sA.then=i.nthen,o.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(aI,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function ly(){var e=aI.Promise;return sL?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(aI,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:sA.then,gthen:e.prototype.then}:{}}function lg(e,t,n,r,o){var i=sZ;try{return lm(e,!0),t(n,r,o)}finally{lm(i,!1)}}function lb(e,t,n,r){return"function"!=typeof e?e:function(){var o,i=sZ;n&&lc(),lm(t,!0);try{return e.apply(this,arguments)}finally{lm(i,!1),r&&(o=ld,sI.call(sN,o))}}}function lv(e,t){return function(n,r){return e.call(this,lb(n,t),lb(r,t))}}function lw(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(aI.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),aF(r,o)):aI.CustomEvent&&aF(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&aI.dispatchEvent&&(dispatchEvent(r),!aI.PromiseRejectionEvent&&aI.onunhandledrejection))try{aI.onunhandledrejection(r)}catch(e){}ss&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+sI).indexOf("[native code]")&&(lc=ld=sS);var l_=sX.reject;let lx=String.fromCharCode(65535),lS="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",lE=[],lD="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lO=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function lP(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let lk={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function lC(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=a8(t))[e],t)}class lj{_trans(e,t,n){let r=this._tx||sZ.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new sw.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}let a=s9();try{return r&&r.db===this.db?r===sZ.trans?r._promise(e,i,n):lu(()=>r._promise(e,i,n),{trans:r,transless:sZ.transless||sZ}):function e(t,n,r,o){if(t.idbdb&&(t._state.openComplete||sZ.letThrough||t._vip)){var i=t._createTransaction(n,r,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===sv.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,o))):l_(i)}return i._promise(n,(e,t)=>lu(()=>(sZ.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return l_(new sw.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return l_(new sw.DatabaseClosed);t.open().catch(sS)}return t._state.dbReadyPromise.then(()=>e(t,n,r,o))}(this.db,e,[this.name],i)}finally{a&&s8()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(aL(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=a$(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let n=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(n&&this.db._maxKey!==lx)return this.where(n.name).equals(n.keyPath.map(t=>e[t]));!n&&ss&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,n],o)=>{let a=r[o],s=e[o];return[t||a,t||!a?lP(n,a&&a.multi?e=>{let t=a1(e,o);return aL(t)&&t.some(e=>i(s,e))}:e=>i(s,a1(e,o))):n]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,aL(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let n=Object.create(e.prototype);for(var r in t)if(aU(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){aF(this,e)})}add(e,t){let{auto:n,keyPath:r}=this.schema.primKey,o=e;return r&&n&&(o=lC(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?sX.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{a2(e,r,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||aL(e))return this.where(":id").equals(e).modify(t);{let n=a1(e,this.schema.primKey.keyPath);if(void 0===n)return l_(new sw.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?a$(t).forEach(n=>{a2(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){let{auto:n,keyPath:r}=this.schema.primKey,o=e;return r&&n&&(o=lC(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?sX.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{a2(e,r,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?sX.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:lk})).then(e=>e.numFailures?sX.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){let r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new sw.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new sw.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&n?e.map(lC(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new sb(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)})})}bulkPut(e,t,n){let r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new sw.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new sw.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&n?e.map(lC(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new sb(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new sb(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)})}}function lT(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e){var a;return void a$(a=e).forEach(function(e){var t=a[e];if(aL(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new sw.InvalidArgument("Invalid event config");var n=i(e,sE,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){aX(function(){e.apply(null,t)})})})}})}r||(r=sj),o||(o=sS);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=r(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(r,o)}};return t[e]=n[e]=s,s}}function lR(e,t){return az(t).from({prototype:e}),t}function lN(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function lA(e,t){e.filter=lP(e.filter,t)}function lM(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>lP(r(),t()):t,e.justLimit=n&&!r}function lI(e,t){if(e.isPrimKey)return t.primaryKey;let n=t.getIndexByKeyPath(e.index);if(!n)throw new sw.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function l$(e,t,n){let r=lI(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function lL(e,t,n,r){let o=e.replayFilter?lP(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,n,r)=>{if(!o||o(n,r,e=>n.stop(e),e=>n.fail(e))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),aU(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),lF(l$(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return lF(l$(e,r,n),lP(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function lF(e,t,n,r){var o=ln(r?(e,t,o)=>n(r(e),t,o):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=sS},t=>{e.fail(t),n=sS})||o(e.value,e,e=>n=e),n()})})}function lB(e,t){try{let n=lV(e),r=lV(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(lU(e),lU(t));case"Array":return function(e,t){let n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){let r=lB(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function lV(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let n=st(e);return"ArrayBuffer"===n?"binary":n}function lU(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lW{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,l_.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,l_.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=lP(t.algorithm,e)}_iterate(e,t){return lL(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&aF(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>lL(t,e,n,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,n=t.table.core;if(lN(t,!0))return n.count({trans:e,query:{index:lI(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var r=0;return lL(t,()=>(++r,!1),e,n).then(()=>r)}).then(e)}sortBy(e,t){let n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&lN(t,!0)&&t.limit>0){let{valueMapper:n}=t,r=lI(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{let n=[];return lL(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,lN(t)?lM(t,()=>{var t=e;return(e,n)=>0===t||(1===t?--t:n(()=>{e.advance(t),t=0}),!1)}):lM(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lM(this._ctx,()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this}until(e,t){return lA(this._ctx,function(n,r,o){return!e(n.value)||(r(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return lA(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=lP(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&lN(t,!0)&&t.limit>0)return this._read(e=>{var n=lI(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return lA(this._ctx,function(e){var t=e.primaryKey.toString(),r=aU(n,t);return n[t]=!0,!r}),this}modify(e){var t=this._ctx;return this._write(n=>{var r;if("function"==typeof e)r=e;else{var o=a$(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];a1(t,a)!==s&&(a2(t,a,s),n=!0)}return n}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,p=[],f=(e,t)=>{let{failures:n,numFailures:r}=t;for(let t of(d+=e-r,a$(n)))c.push(n[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:n,keys:o.slice(c,c+d),cache:"immutable"}).then(p=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=p[e],n={value:a8(t),primKey:o[c+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[c+e]):s||0===lB(l(t),l(n.value))?(m.push(n.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(n.value)))}let b=lN(t)&&t.limit===1/0&&("function"!=typeof e||e===lK)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:n,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(g.length>0||b&&e===lK)&&a.mutate({trans:n,type:"delete",keys:g,criteria:b}).then(e=>f(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new sg("Error modifying one or more objects",c,d,p);return o.length})})})}delete(){var e=this._ctx,t=e.range;return lN(e)&&(e.isPrimKey&&!lD||3===t.type)?this._write(n=>{let{primaryKey:r}=e.table.core.schema;return e.table.core.count({trans:n,query:{index:r,range:t}}).then(r=>e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:n,numFailures:o})=>{if(o)throw new sg("Could not delete some values",Object.keys(e).map(t=>e[t]),r-o);return r-o}))}):this.modify(lK)}}let lK=(e,t)=>t.value=null;function lH(e,t){return e<t?-1:+(e!==t)}function lz(e,t){return e>t?-1:+(e!==t)}function lG(e,t,n){var r=e instanceof lQ?new e.Collection(e):e;return r._ctx.error=n?new n(t):TypeError(t),r}function lq(e){return new e.Collection(e,()=>lJ("")).limit(0)}function lZ(e,t,n,r){var o,i,a,s,l,u,c,d=n.length;if(!n.every(e=>"string"==typeof e))return lG(e,"String expected.");function p(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?lH:lz;var t=n.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":r}p("next");var f=new e.Collection(e,()=>lY(s[0],l[d-1]+r));f._ondirectionchange=function(e){p(e)};var h=0;return f._addAlgorithm(function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,l,h))return!0;for(var f=null,m=h;m<d;++m){var y=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==r[l])return 0>o(e[l],n[l])?e.substr(0,l)+n[l]+n.substr(l+1):0>o(e[l],r[l])?e.substr(0,l)+r[l]+n.substr(l+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}(o,p,s[m],l[m],a,u);null===y&&null===f?h=m+1:(null===f||a(f,y)>0)&&(f=y)}return n(null!==f?function(){e.continue(f+c)}:r),!1}),f}function lY(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function lJ(e){return{type:1,lower:e,upper:e}}class lQ{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?lq(this):new this.Collection(this,()=>lY(e,t,!n,!r))}catch(e){return lG(this,lS)}}equals(e){return null==e?lG(this,lS):new this.Collection(this,()=>lJ(e))}above(e){return null==e?lG(this,lS):new this.Collection(this,()=>lY(e,void 0,!0))}aboveOrEqual(e){return null==e?lG(this,lS):new this.Collection(this,()=>lY(e,void 0,!1))}below(e){return null==e?lG(this,lS):new this.Collection(this,()=>lY(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lG(this,lS):new this.Collection(this,()=>lY(void 0,e))}startsWith(e){return"string"!=typeof e?lG(this,"String expected."):this.between(e,e+lx,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lZ(this,(e,t)=>0===e.indexOf(t[0]),[e],lx)}equalsIgnoreCase(e){return lZ(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=si.apply(so,arguments);return 0===e.length?lq(this):lZ(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=si.apply(so,arguments);return 0===e.length?lq(this):lZ(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,lx)}anyOf(){let e=si.apply(so,arguments),t=this._cmp;try{e.sort(t)}catch(e){return lG(this,lS)}if(0===e.length)return lq(this);let n=new this.Collection(this,()=>lY(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm((n,o,i)=>{let a=n.key;for(;t(a,e[r])>0;)if(++r===e.length)return o(i),!1;return 0===t(a,e[r])||(o(()=>{n.continue(e[r])}),!1)}),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=si.apply(so,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lG(this,lS)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return lq(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=r(e[0],e[1])))return lG(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",sw.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=r;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let r=0,o=e.length;for(;r<o;++r){let o=e[r];if(0>n(t[0],o[1])&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e},[])).sort(d)}catch(e){return lG(this,lS)}let p=0,f=l?e=>r(e,u[p][1])>0:e=>r(e,u[p][1])>=0,h=s?e=>o(e,u[p][0])>0:e=>o(e,u[p][0])>=0,m=f,y=new this.Collection(this,()=>lY(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=f,c=r):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,n)=>{for(var o=e.key;m(o);)if(++p===u.length)return t(n),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,u[p][1])||0===this._cmp(o,u[p][0])||t(()=>{c===r?e.continue(u[p][0]):e.continue(u[p][1])}),!1)}),y}startsWithAnyOf(){let e=si.apply(so,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lq(this):this.inAnyRange(e.map(e=>[e,e+lx])):lG(this,"startsWithAnyOf() only works with strings")}}function lX(e){return ln(function(t){return l0(t),e(t.target.error),!1})}function l0(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let l1=lT(null,"storagemutated");class l2{_lock(){return aQ(!sZ.global),++this._reculock,1!==this._reculock||sZ.global||(sZ.lockOwnerFor=this),this}_unlock(){if(aQ(!sZ.global),0==--this._reculock)for(sZ.global||(sZ.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{lg(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&sZ.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,n=this.db._state.dbOpenError;if(aQ(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new sw.DatabaseClosed(n);case"MissingAPIError":throw new sw.MissingAPI(n.message,n);default:throw new sw.OpenFailed(n)}if(!this.active)throw new sw.TransactionInactive;return aQ(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ln(t=>{l0(t),this._reject(e.error)}),e.onabort=ln(t=>{l0(t),this.active&&this._reject(new sw.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=ln(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&l1.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return l_(new sw.ReadOnly("Transaction is readonly"));if(!this.active)return l_(new sw.TransactionInactive);if(this._locked())return new sX((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},sZ])});if(n)return lu(()=>{var e=new sX((e,n)=>{this._lock();let r=t(e,n,this);r&&r.then&&r.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new sX((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let n=sX.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new sX((e,r)=>{n.then(n=>t._waitingQueue.push(ln(e.bind(null,n))),e=>t._waitingQueue.push(ln(r.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new sw.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(aU(t,e))return t[e];let n=this.schema[e];if(!n)throw new sw.NotFound("Table "+e+" not part of transaction");let r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function l4(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+l3(t)}}function l3(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function l6(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:a0(n,e=>[e.name,e])}}let l5=e=>{try{return e.only([[]]),l5=()=>[[]],[[]]}catch(e){return l5=()=>lx,lx}};function l7(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>a1(t,e):t=>a1(t,e)}function l9(e){return[].slice.call(e)}let l8=0;function ue(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ut({_novip:e},t){let n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){var i;return{dbcore:(i=function(e,t,n){let r;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}let{schema:i,hasGetAll:a}=(r=l9(e.objectStoreNames),{schema:{name:e.name,tables:r.map(e=>n.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:n}=e,r=aL(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:l7(t)},indexes:l9(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:aL(o),keyPath:o,unique:n,multiEntry:r,extractKey:l7(o)};return i[ue(o)]=a,a}),getIndexByKeyPath:e=>i[ue(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[ue(t)]=a.primaryKey),a})},hasGetAll:r.length>0&&"getAll"in n.objectStore(r[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:n,keys:r,values:i,range:a}){return new Promise((s,l)=>{let u;s=ln(s);let c=e.objectStore(t),d=null==c.keyPath,p="put"===n||"add"===n;if(!p&&"delete"!==n&&"deleteRange"!==n)throw Error("Invalid operation type: "+n);let{length:f}=r||i||{length:1};if(r&&i&&r.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,l0(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=p?d?[i,r]:[i,null]:[r,null];if(p)for(let r=0;r<f;++r)h.push(u=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),u.onerror=g;else for(let t=0;t<f;++t)h.push(u=c[n](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===n?r:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:n})=>new Promise((r,o)=>{r=ln(r);let i=e.objectStore(t),a=n.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&r(s)},p=lX(o);for(let e=0;e<a;++e)null!=n[e]&&((l=i.get(n[e]))._pos=e,l.onsuccess=d,l.onerror=p,++u);0===u&&r(s)}),get:({trans:e,key:n})=>new Promise((r,o)=>{r=ln(r);let i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=lX(o)}),query:e=>new Promise((n,r)=>{n=ln(n);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:p}=u,f=i.objectStore(t),h=d.isPrimaryKey?f:f.index(d.name),m=o(p);if(0===l)return n({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>n({result:e.target.result}),e.onerror=lX(r)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=r=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?n({result:o}):void i.continue()):n({result:o})},t.onerror=lX(r)}}),openCursor:function({trans:e,values:n,query:r,reverse:i,unique:a}){return new Promise((s,l)=>{s=ln(s);let{index:u,range:c}=r,d=e.objectStore(t),p=u.isPrimaryKey?d:d.index(u.name),f=i?a?"prevunique":"prev":a?"nextunique":"next",h=!n&&"openKeyCursor"in p?p.openKeyCursor(o(c),f):p.openCursor(o(c),f);h.onerror=lX(l),h.onsuccess=ln(t=>{let n=h.result;if(!n)return void s(null);n.___id=++l8,n.done=!1;let r=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));let i=n.advance.bind(n),a=()=>{throw Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw Error("Cursor not started")},n.fail=ln(l),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{let t=new Promise((e,t)=>{e=ln(e),h.onerror=lX(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw Error("Cursor behind last entry")},n.stop()};return h.onsuccess=ln(e=>{h.onsuccess=s,s()}),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)},l)})},count({query:e,trans:n}){let{index:r,range:i}=e;return new Promise((e,a)=>{let s=n.objectStore(t),l=r.isPrimaryKey?s:s.index(r.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=ln(t=>e(t.target.result)),c.onerror=lX(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:l5(t),schema:i}}(t,n,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(t=>{let n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function un({_novip:e},t,n,r){n.forEach(n=>{let o=r[n];t.forEach(t=>{let r=aq(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?aH(t,n,{get(){return this.table(n)},set(e){aK(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))})})}function ur({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function uo(e,t){return e._cfg.version-t._cfg.version}function ui(e,t){let n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){let o=e[n],i=t[n];if(o){let e={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||lD)){let t,n=o.idxByName,a=i.idxByName;for(t in n)a[t]||e.del.push(t);for(t in a){let r=n[t],o=a[t];r?r.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}else e.recreate=!0,r.change.push(e)}else r.add.push([n,i])}return r}function ua(e,t,n,r){let o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(e=>us(o,e)),o}function us(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function ul(e,t,n){let r={};return aY(t.objectStoreNames,0).forEach(e=>{let t=n.objectStore(e),o=t.keyPath,i=l4(l3(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let n=t.index(t.indexNames[e]);o=n.keyPath;var s=l4(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=l6(e,i,a)}),r}function uu({_novip:e},t,n){let r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){let i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+aY(r).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&aI.WorkerGlobalScope&&aI instanceof aI.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class uc{_parseStoresSpec(e,t){a$(e).forEach(n=>{if(null!==e[n]){var r=e[n].split(",").map((e,t)=>{let n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return l4(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),aL(r),0===t)}),o=r.shift();if(o.multi)throw new sw.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new sw.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new sw.Schema("Index must have a name and cannot be an empty string")}),t[n]=l6(n,o,r)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?aF(this._cfg.storesSource,e):e;let n=t._versions,r={},o={};return n.forEach(e=>{aF(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)}),t._dbSchema=o,ur(t,[t._allTables,t,t.Transaction.prototype]),un(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],a$(o),o),t._storeNames=a$(o),this}upgrade(e){return this._cfg.contentUpgrade=sT(this._cfg.contentUpgrade||sS,e),this}}function ud(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new uj("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function up(e){return e&&"function"==typeof e.databases}function uf(e){return lu(function(){return sZ.letThrough=!0,e()})}function uh(e){var t=t=>e.next(t),n=o(t),r=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):aL(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function um(e,t,n){var r=arguments.length;if(r<2)throw new sw.InvalidArgument("Too few arguments");for(var o=Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,a6(o),n]}function uy(e,t,n){let r=aL(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}let ug={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){let r=ue(e),s=o[r]=o[r]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...n,isVirtual:u,keyTail:t,keyLength:l,extractKey:l7(e),unique:!u&&n.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,n),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(r.primaryKey.keyPath,0,r.primaryKey);for(let e of(o[":id"]=[s],r.indexes))a(e.keyPath,0,e);function l(t){var n,r;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:uy(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:uy(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}:t}return{...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[ue(e)];return t&&t[0]}},count:e=>n.count(l(e)),query:e=>n.query(l(e)),openCursor(t){let{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(l(t)).then(n=>n&&Object.create(n,{continue:{value:function(o){null!=o?n.continue(uy(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(uy(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){let e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}})):n.openCursor(t)}}}}}};function ub(e,t,n,r){return n=n||{},r=r||"",a$(e).forEach(o=>{if(aU(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=st(i);e!==st(a)?n[r+o]=t[o]:"Object"===e?ub(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0}),a$(t).forEach(o=>{aU(e,o)||(n[r+o]=t[o])}),n}let uv={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(e){let o=sZ.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===sS)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===sS&&s.fire===sS)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===sS)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===sS)break;return o._promise("readwrite",()=>(function e(t,o,i){return n.query({trans:t,values:!1,query:{index:r,range:o},limit:i}).then(({result:n})=>l({type:"delete",keys:n,trans:t}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:n[n.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return n.mutate(e);function l(e){var t,o;let l=sZ.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(r.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):n.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((n,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,n,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,n,e.values[o],l);null==n&&null!=t&&(n=t,e.keys[o]=n,r.outbound||a2(e.values[o],r.keyPath,n))}else{let t=ub(u,e.values[o]),r=s.fire.call(c,t,n,u,l);if(r){let t=e.values[o];Object.keys(r).forEach(e=>{aU(t,e)?t[e]=r[e]:a2(t,e,r[e])})}}return c});return n.mutate(e).then(({failures:n,results:r,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=r?r[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(n[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:n,results:r,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function uw(e,t,n){try{if(!t||t.keys.length<e.length)return null;let r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===lB(t.keys[o],e[i])&&(r.push(n?a8(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}let u_={stack:"dbcore",level:-1,create:e=>({table:t=>{let n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);let t=uw(e.keys,e.trans._cache,"clone"===e.cache);return t?sX.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?a8(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function ux(e){return!("from"in e)}let uS=function(e,t){if(!this){let t=new uS;return e&&"d"in e&&aF(t,e),t}aF(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function uE(e,t,n){let r=lB(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(ux(e))return aF(e,{from:t,to:n,d:1});let o=e.l,i=e.r;if(0>lB(n,e.from))return o?uE(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},uP(e);if(lB(t,e.to)>0)return i?uE(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},uP(e);0>lB(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),lB(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&uD(e,o),i&&a&&uD(e,i)}function uD(e,t){ux(t)||function e(t,{from:n,to:r,l:o,r:i}){uE(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function uO(e){let t=ux(e)?null:{s:0,n:e};return{next(e){let n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>lB(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=lB(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function uP(e){var t,n;let r=((null==(t=e.r)?void 0:t.d)||0)-((null==(n=e.l)?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){let t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=uk(n)}e.d=uk(e)}function uk({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}aW(uS.prototype,{add(e){return uD(this,e),this},addKey(e){return uE(this,e,e),this},addKeys(e){return e.forEach(e=>uE(this,e,e)),this},[sn](){return uO(this)}});let uC={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,n=new uS(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{let o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new uS)},u=l(""),c=l(":dels"),{type:d}=e,[p,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(aL(p)){"delete"!==d&&(p=e.results),u.addKeys(p);let t=uw(p,h);t||"add"===d||c.addKeys(p),(t||f)&&i.indexes.forEach(function(e){let n=l(e.name||"");function r(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&aL(t)?t.forEach(e=>n.addKey(e)):n.addKey(t);(t||f).forEach((e,n)=>{let i=t&&r(t[n]),a=f&&r(f[n]);0!==lB(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(p){let e={from:p.lower,to:p.upper};c.add(e),u.add(e)}else u.add(n),c.add(n),i.indexes.forEach(e=>l(e.name).add(n));return e})}},c=({query:{index:t,range:n}})=>{var r,o;return[t,new uS(null!=(r=n.lower)?r:e.MIN_KEY,null!=(o=n.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new uS(e.key)],getMany:e=>[a,(new uS).addKeys(e.keys)],count:c,query:c,openCursor:c};return a$(d).forEach(e=>{u[e]=function(i){let{subscr:a}=sZ;if(a){let u=e=>{let n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new uS)},c=u(""),p=u(":dels"),[f,h]=d[e](i);if(u(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(n=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),n));let e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):p.addKeys(e)}else if("openCursor"===e){let e=i.values;return n&&Object.create(n,{key:{get:()=>(p.addKey(n.primaryKey),n.key)},primaryKey:{get(){let e=n.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&c.addKey(n.primaryKey),n.value)}})}return n})}p.add(n)}}return o[e].apply(this,arguments)}}),u}}}};class uj{constructor(e,t){var n;this._middlewares={},this.verno=0;const r=uj.dependencies;this._options=t={addons:uj.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:sS,dbReadyPromise:null,cancelOpen:sS,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new sX(e=>{i.dbReadyResolve=e}),i.openCanceller=new sX((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=lT(this,"populate","blocked","versionchange","close",{ready:[sT,sS]}),this.on.ready.subscribe=aJ(this.on.ready.subscribe,e=>(t,n)=>{uj.vip(()=>{let r=this._state;if(r.openComplete)r.dbOpenError||sX.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);let r=this;n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)})}})}),this.Collection=(n=this,lR(lW.prototype,function(e,t){this.db=n;let r=lk,o=null;if(t)try{r=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==sE?s:null}})),this.Table=function(e){return lR(lj.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:lT(null,{creating:[sP,sS],reading:[sD,sE],updating:[sC,sS],deleting:[sk,sS]})})}(this),this.Transaction=function(e){return lR(l2.prototype,function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lT(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new sX((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),l_(e)})})}(this),this.Version=function(e){return lR(uc.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lR(lQ.prototype,function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};let o=e._deps.indexedDB;if(!o)throw new sw.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=l5(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),lE.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(ug),this.use(uv),this.use(uC),this.use(u_),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new sw.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new sw.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(uo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||sZ.letThrough||this._vip)?e():new sX((e,t)=>{if(this._state.openComplete)return t(new sw.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new sw.DatabaseClosed);this.open().catch(sS)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){var t;let n=e._state,{indexedDB:r}=e._deps;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(()=>n.dbOpenError?l_(n.dbOpenError):e);ss&&(n.openCanceller._stackHolder=sc()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;let o=n.openCanceller;function i(){if(n.openCanceller!==o)throw new sw.DatabaseClosed("db.open() was cancelled")}let a=n.dbReadyResolve,s=null,l=!1;return sX.race([o,("u"<typeof navigator?sX.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new sX((t,o)=>{if(i(),!r)throw new sw.MissingAPI;let a=e.name,u=n.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!u)throw new sw.MissingAPI;u.onerror=lX(o),u.onblocked=ln(e._fireOnBlocked),u.onupgradeneeded=ln(t=>{if(s=u.transaction,n.autoSchema&&!e._options.allowEmptyDB){u.onerror=l0,s.abort(),u.result.close();let e=r.deleteDatabase(a);e.onsuccess=e.onerror=ln(()=>{o(new sw.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let n,r,a,p;s.onerror=lX(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,n=e._dbSchema,(r=e._createTransaction("readwrite",e._storeNames,n)).create(c),r._completion.catch(o),a=r._reject.bind(r),p=sZ.transless||sZ,lu(()=>{sZ.trans=r,sZ.transless=p,0===i?(a$(n).forEach(e=>{ua(c,e,n[e].primKey,n[e].indexes)}),ut(e,c),sX.follow(()=>e.on.populate.fire(r)).catch(a)):(function({_novip:e},t,n,r){let o=[],i=e._versions,a=e._dbSchema=ul(e,e.idbdb,r),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;uu(e,o,r),uu(e,l,r),a=e._dbSchema=l;let u=ui(o,l);u.add.forEach(e=>{ua(r,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new sw.Upgrade("Not yet support for changing primary key");{let t=r.objectStore(e.name);e.add.forEach(e=>us(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),us(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;ut(e,r),n._memoizedTables={},s=!0;let i=a4(l);u.del.forEach(e=>{i[e]=o[e]}),ur(e,[e.Transaction.prototype]),un(e,[e.Transaction.prototype],a$(i),i),n.schema=i;let a=sa(c);a&&lc();let d=sX.follow(()=>{if((t=c(n))&&a){var e=ld.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?sX.resolve(t):d.then(()=>t)}}),o.push(t=>{var r;s&&lD||(r=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==r[e]&&t.db.deleteObjectStore(e))),ur(e,[e.Transaction.prototype]),un(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),(function e(){return o.length?sX.resolve(o.shift()(n.idbtrans)).then(e):sX.resolve()})().then(()=>{var e;a$(e=a).forEach(t=>{r.db.objectStoreNames.contains(t)||ua(r,t,e[t].primKey,e[t].indexes)})})})(e,i,r,c).catch(a)})}},o),u.onsuccess=ln(()=>{s=null;let r=e._novip.idbdb=u.result,o=aY(r.objectStoreNames);if(o.length>0)try{let t,i=r.transaction(1===o.length?o[0]:o,"readonly");n.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;let r=e._dbSchema=ul(0,t,n);e._storeNames=aY(t.objectStoreNames,0),un(e,[e._allTables],a$(r),r)}(e,r,i):(uu(e,e._dbSchema,i),((t=ui(ul(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ut(e,i)}catch(e){}lE.push(e),r.onversionchange=ln(t=>{n.vcFired=!0,e.on("versionchange").fire(t)}),r.onclose=ln(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},n){up(e)||"__dbnames"===n||ud(e,t).put({name:n}).catch(sS)}(e._deps,a),t()},o)}))]).then(()=>(i(),n.onReadyBeingFired=[],sX.resolve(uf(()=>e.on.ready.fire(e.vip))).then(function t(){if(n.onReadyBeingFired.length>0){let r=n.onReadyBeingFired.reduce(sT,sS);return n.onReadyBeingFired=[],sX.resolve(uf(()=>r(e.vip))).then(t)}}))).finally(()=>{n.onReadyBeingFired=null,n.isBeingOpened=!1}).then(()=>e).catch(t=>{n.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===n.openCanceller&&e._close(),l_(t)}).finally(()=>{n.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=lE.indexOf(this);if(t>=0&&lE.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sX(t=>{e.dbReadyResolve=t}),e.openCanceller=new sX((t,n)=>{e.cancelOpen=n})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new sw.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new sX((n,r)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=ln(()=>{!function({indexedDB:e,IDBKeyRange:t},n){up(e)||"__dbnames"===n||ud(e,t).delete(n).catch(sS)}(this._deps,this.name),n()}),e.onerror=lX(r),e.onblocked=this._fireOnBlocked};if(e)throw new sw.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return a$(this._allTables).map(e=>this._allTables[e])}transaction(){let e=um.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r,o,i=sZ.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)r="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new sw.InvalidArgument("Invalid transaction mode: "+e);r="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===r){if(!a)throw new sw.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new sw.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,n)=>{n(e)}):l_(e)}let s=(function e(t,n,r,o,i){return sX.resolve().then(()=>{let a,s=sZ.transless||sZ,l=t._createTransaction(n,r,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===sv.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,n,r,null,i))):l_(o)}let u=sa(i);u&&lc();let c=sX.follow(()=>{if(a=i.call(l,l))if(u){var e=ld.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=uh(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?sX.resolve(a).then(e=>l.active?e:l_(new sw.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),l_(e)))})}).bind(null,this,r,o,i,n);return i?i._promise(r,s,"lock"):sZ.trans?lg(sZ.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!aU(this._allTables,e))throw new sw.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let uT="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class uR{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[uT](){return this}}function uN(e,t){return a$(t).forEach(n=>{uD(e[n]||(e[n]=new uS),t[n])}),e}try{i={indexedDB:aI.indexedDB||aI.mozIndexedDB||aI.webkitIndexedDB||aI.msIndexedDB,IDBKeyRange:aI.IDBKeyRange||aI.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function uA(e){let t=uM;try{uM=!0,l1.storagemutated.fire(e)}finally{uM=t}}aW(uj,{...sx,delete:e=>new uj(e,{addons:[]}).delete(),exists:e=>new uj(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return up(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):ud(e,t).toCollection().primaryKeys()})(uj.dependencies).then(e)}catch(e){return l_(new sw.MissingAPI)}},defineClass:()=>function(e){aF(this,e)},ignoreTransaction:e=>sZ.trans?lg(sZ.transless,e):e(),vip:uf,async:function(e){return function(){try{var t=uh(e.apply(this,arguments));return t&&"function"==typeof t.then?t:sX.resolve(t)}catch(e){return l_(e)}}},spawn:function(e,t,n){try{var r=uh(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:sX.resolve(r)}catch(e){return l_(e)}},currentTransaction:{get:()=>sZ.trans||null},waitFor:function(e,t){let n=sX.resolve("function"==typeof e?uj.ignoreTransaction(e):e).timeout(t||6e4);return sZ.trans?sZ.trans.waitFor(n):n},Promise:sX,debug:{get:()=>ss,set:e=>{ss=e,sl="dexie"===e?()=>!0:lO}},derive:az,extend:aF,props:aW,override:aJ,Events:lT,on:l1,liveQuery:function(e){return new uR(t=>{let n=sa(e),r=!1,o={},i={},a={get closed(){return r},unsubscribe:()=>{r=!0,l1.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,l=!1;function u(){return a$(i).some(e=>o[e]&&function(e,t){let n=uO(t),r=n.next();if(r.done)return!1;let o=r.value,i=uO(e),a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(0>=lB(s.from,o.to)&&lB(s.to,o.from)>=0)return!0;0>lB(o.from,s.from)?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{uN(o,e),u()&&d()},d=()=>{let p,f;if(s||r)return;o={};let h={},m=(n&&lc(),p=()=>lu(e,{subscr:h,trans:null}),f=sZ.trans?lg(sZ.transless,p):p(),n&&f.then(ld,ld),f);l||(l1("storagemutated",c),l=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,r||(u()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:uN,getByKeyPath:a1,setByKeyPath:a2,delByKeyPath:function(e,t){"string"==typeof t?a2(e,t,void 0):"length"in t&&[].map.call(t,function(t){a2(e,t,void 0)})},shallowClone:a4,deepClone:a8,getObjectDiff:ub,cmp:lB,asap:aX,minKey:-1/0,addons:[],connections:lE,errnames:sv,dependencies:i,semVer:"3.2.2",version:"3.2.2".split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),uj.maxKey=l5(uj.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(l1("storagemutated",e=>{if(!uM){let t;lD?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uM=!0,dispatchEvent(t),uM=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{uM||uA(e)}));let uM=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");l1("storagemutated",t=>{uM||e.postMessage(t)}),e.onmessage=e=>{e.data&&uA(e.data)}}else if("u">typeof self&&"u">typeof navigator){l1("storagemutated",e=>{try{uM||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&uA(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&uA(e.changedParts)})}function uI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sX.rejectionMapper=function(e,t){if(!e||e instanceof sm||e instanceof TypeError||e instanceof SyntaxError||!e.name||!s_[e.name])return e;var n=new s_[e.name](t||e.message,e);return"stack"in e&&aH(n,"stack",{get:function(){return this.inner.stack}}),n},sl=lO;class u$ extends uj{constructor(){super("EsmOffline"),uI(this,"syncQueue",void 0),uI(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function uL(){return new u$}let uF=new u$,uB={},uV=Z("offline-synchronization",{});function uU(){return uV}async function uW(){if(uV.getState().synchronization)return;let e=await uF.syncQueue.count(),t={},n=Object.entries(uB),r=n.length,o={},i=new AbortController,a=()=>{let e=uV.getState().synchronization;uV.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{uV.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<r&&n.length>0;e++)for(let e=n.length;e--;){let[r,s]=n[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[r]={},await Promise.all(l),t[r]=uK(s,o,i,a),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{uV.setState({synchronization:void 0})}}async function uK({type:e,dependsOn:t,process:n},r,o,i){let a=[],s=[],l=await uH();await uF.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:p,dependencies:f=[]}]=a[u];try{let i=await n(d,{abort:o,index:u,items:s,userId:l,dependencies:f.map(({id:e,type:n})=>t.includes(n)?r[n][e]:void 0)});void 0!==p&&(r[e][p]=i),await uF.syncQueue.delete(c)}catch(e){await uF.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function uH(){let e=await ip();return e?.uuid||"*"}async function uz(e,t,n,r){let o=r&&r.id;return void 0!==o&&await uF.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(uj.errnames.DatabaseClosed),await uF.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(uj.errnames.DatabaseClosed,()=>-1)}async function uG(e,t,n){let r=await uH();return await uz(r,e,t,n)}async function uq(e,t){return(await uZ(e,t)).map(e=>e.content)}async function uZ(e,t){return await uF.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(uj.errnames.DatabaseClosed,()=>[])}async function uY(e){let t=await uH();return await uq(t,e)}async function uJ(e){let t=await uH();return await uZ(t,e)}async function uQ(e){return await uF.syncQueue.get(e).catch(uj.errnames.DatabaseClosed,()=>void 0)}function uX(e){return!!uB[e]?.options.onBeginEditSyncItem}async function u0(e){let t=await uQ(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let n=uB[t.type]?.options.onBeginEditSyncItem;if(!n)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function u1(e){await uF.syncQueue.delete(e).catch(uj.errnames.DatabaseClosed)}function u2(e,t,n,r={}){uB[e]={type:e,dependsOn:t,process:n,options:r}}let u4="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),u3=new Uint8Array(16),u6=[];for(let e=0;e<256;++e)u6.push((e+256).toString(16).slice(1));let u5=function(e,t,n){if(u4&&!t&&!e)return u4();let r=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(u3)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return u6[e[t+0]]+u6[e[t+1]]+u6[e[t+2]]+u6[e[t+3]]+"-"+u6[e[t+4]]+u6[e[t+5]]+"-"+u6[e[t+6]]+u6[e[t+7]]+"-"+u6[e[t+8]]+u6[e[t+9]]+"-"+u6[e[t+10]]+u6[e[t+11]]+u6[e[t+12]]+u6[e[t+13]]+u6[e[t+14]]+u6[e[t+15]]}(r)},u7="OFFLINE+";function u9(){return u7+u5()}function u8(e){return e.startsWith(u7)}let ce={};function ct(){return Object.values(ce)}function cn(e){ce[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),ce[e.id]=e}async function cr(e){let t=await cd();return await co(t,e)}async function co(e,t){let n=new u$;return await n.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(uj.errnames.DatabaseClosed,()=>[])}async function ci(e,t){let n=await cd();return await ca(n,e,t)}async function ca(e,t,n){let r=new u$,o=await r.dynamicOfflineData.get({type:t,identifier:n}).catch(uj.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(uj.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(uj.errnames.DatabaseClosed)}async function cs(e,t){let n=await cd();return await cl(n,e,t)}async function cl(e,t,n){let r=new u$,o=await r.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(uj.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(uj.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(uj.errnames.DatabaseClosed))}async function cu(e,t){let n=await cr(e);await Promise.all(n.map(async e=>cc(e.type,e.identifier,t)))}async function cc(e,t,n){await ci(e,t);let r=new u$,o=await cd(),i=await r.dynamicOfflineData.get({type:e,identifier:t}).catch(uj.errnames.DatabaseClosed,()=>void 0),a=ct().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(n){let t=n.message?.toString()??n.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await r.dynamicOfflineData.update(i.id,{syncState:d}).catch(uj.errnames.DatabaseClosed)}async function cd(){let e=(await ip()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let cp=Z("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function cf(){return cy(),cp}function ch(e,t){cy(),cn({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??new AbortController().signal})})}async function cm(e){cy(),await cc("patient",e)}function cy(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function cg(e,t,n=!0){if(e){let r=null,[o,i]=await Promise.all([ie(`${o7}/Patient/${e}`,t).catch(e=>r=e),n?cb(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(r)throw r}return null}async function cb(e){let t=(await uY("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function cv(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function cw(e,t){let n=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}var c_=n(99549);function cx(e){return{uuid:e.uuid,display:e.display}}function cS(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return it(`${o5}/location${r?"?"+r:""}`).pipe((0,c_.map)(e=>e.data.results.map(cx))).pipe((0,c_.take)(1))}function cE(e){return{uuid:e.uuid,display:e.display,name:e.name}}function cD(){return it(`${o5}/visittype`).pipe((0,c_.map)(e=>e.data.results.map(cE))).pipe((0,c_.take)(1))}var cO=n(29827),cP=((es={}).NEWVISIT="startVisit",es.EDITVISIT="editVisit",es.LOADING="loadingVisit",es),ck=((el={}).NOTSTARTED="notStarted",el.ONGOING="ongoing",el);let cC="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))",cj=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function cT(){return J("visit",cj)}function cR(e,t){cT().setState({patientUuid:e,manuallySetVisitUuid:t})}function cN(e,t){return ie(`${o5}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function cA(e,t,n){return ie(`${o5}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function cM(e,t,n){return ie(`${o5}/visit?patient=${e}&v=${n??cC}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}cT().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let cI=new cO.t(null);class c${static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+c$.version}static addUnaryOp(e){return c$.max_unop_len=Math.max(e.length,c$.max_unop_len),c$.unary_ops[e]=1,c$}static addBinaryOp(e,t,n){return c$.max_binop_len=Math.max(e.length,c$.max_binop_len),c$.binary_ops[e]=t,n?c$.right_associative.add(e):c$.right_associative.delete(e),c$}static addIdentifierChar(e){return c$.additional_identifier_chars.add(e),c$}static addLiteral(e,t){return c$.literals[e]=t,c$}static removeUnaryOp(e){return delete c$.unary_ops[e],e.length===c$.max_unop_len&&(c$.max_unop_len=c$.getMaxKeyLen(c$.unary_ops)),c$}static removeAllUnaryOps(){return c$.unary_ops={},c$.max_unop_len=0,c$}static removeIdentifierChar(e){return c$.additional_identifier_chars.delete(e),c$}static removeBinaryOp(e){return delete c$.binary_ops[e],e.length===c$.max_binop_len&&(c$.max_binop_len=c$.getMaxKeyLen(c$.binary_ops)),c$.right_associative.delete(e),c$}static removeAllBinaryOps(){return c$.binary_ops={},c$.max_binop_len=0,c$}static removeLiteral(e){return delete c$.literals[e],c$}static removeAllLiterals(){return c$.literals={},c$}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 c$(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 c$.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!c$.binary_ops[String.fromCharCode(e)]||c$.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return c$.isIdentifierStart(e)||c$.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(c$.hooks[e]){let n={context:this,node:t};return c$.hooks.run(e,n),n.node}return t}searchHook(e){if(c$.hooks[e]){let t={context:this};return c$.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===c$.SPACE_CODE||e===c$.TAB_CODE||e===c$.LF_CODE||e===c$.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:c$.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===c$.SEMCOL_CODE||n===c$.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===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,c$.max_binop_len),t=e.length;for(;t>0;){if(c$.binary_ops.hasOwnProperty(e)&&(!c$.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!c$.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,o,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:c$.binaryPrecedence(t),right_a:c$.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[i,o,a];t=this.gobbleBinaryOp();){if(0===(n=c$.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:n,right_a:c$.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&s(r[r.length-2]);)a=r.pop(),t=r.pop().value,i=r.pop(),e={type:c$.BINARY_EXP,operator:t,left:i,right:a},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(o,e)}for(s=r.length-1,e=r[s];s>1;)e={type:c$.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,c$.isDecimalDigit(e)||e===c$.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===c$.SQUOTE_CODE||e===c$.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===c$.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,c$.max_unop_len)).length;n>0;){if(c$.unary_ops.hasOwnProperty(t)&&(!c$.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!c$.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:c$.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}c$.isIdentifierStart(e)?(r=this.gobbleIdentifier(),c$.literals.hasOwnProperty(r.name)?r={type:c$.LITERAL,value:c$.literals[r.name],raw:r.name}:r.name===c$.this_str&&(r={type:c$.THIS_EXP})):e===c$.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===c$.PERIOD_CODE||t===c$.OBRACK_CODE||t===c$.OPAREN_CODE||t===c$.QUMARK_CODE;){let n;if(t===c$.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==c$.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===c$.OBRACK_CODE?((e={type:c$.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==c$.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===c$.OPAREN_CODE?e={type:c$.CALL_EXP,arguments:this.gobbleArguments(c$.CPAREN_CODE),callee:e}:(t===c$.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:c$.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;c$.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===c$.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);c$.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++));c$.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);c$.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,c$.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===c$.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===c$.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:c$.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!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 r||this.throwError('Unclosed quote after "'+e+'"'),{type:c$.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(c$.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,c$.isIdentifierPart(e))this.index++;else break;return{type:c$.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){n=!0,this.index++,e===c$.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===c$.COMMA_CODE){if(this.index++,++r!==t.length){if(e===c$.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===c$.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==c$.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(c$.CPAREN_CODE);if(this.code===c$.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:c$.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:c$.ARRAY_EXP,elements:this.gobbleArguments(c$.CBRACK_CODE)}}}Object.assign(c$,{hooks:new class{add(e,t,n){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][n?"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)})}}(c$),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"}),c$.max_unop_len=c$.getMaxKeyLen(c$.unary_ops),c$.max_binop_len=c$.getMaxKeyLen(c$.binary_ops);let cL=e=>new c$(e).parse(),cF=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(c$).filter(e=>!cF.includes(e)&&void 0===cL[e]).forEach(e=>{cL[e]=c$[e]}),cL.Jsep=c$,cL.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||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:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}});let cB="ArrowFunctionExpression",cV={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)}},cU={...cV,Promise};function cW(e,t={}){return cZ(e,t,cQ)}async function cK(e,t={}){return cY(e,t,cQ)}function cH(e,t={}){return cZ(e,t,cX)}function cz(e,t={}){return cY(e,t,cX)}function cG(e,t={}){return cZ(e,t,c0)}function cq(e,t={}){return cY(e,t,c0)}function cZ(e,t={},n){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 r=c6(t,cV),o=c1("string"==typeof e?cL(e):e,r);if(n(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 cY(e,t={},n){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 r=c6(t,cU);return Promise.resolve(c1("string"==typeof e?cL(e):e,r)).then(t=>{if(n(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 cJ(e){return cL(e)}function cQ(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function cX(e){return"boolean"==typeof e}function c0(e){return"number"==typeof e}function c1(e,t){switch(e.type){case"UnaryExpression":var n,r,o,i,a,s,l,u,c,d,p,f,h,m=e,y=t;let g=c1(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return c1(b.left,v)&&c1(b.right,v);case"||":return c1(b.left,v)||c1(b.right,v);case"??":return c1(b.left,v)??c1(b.right,v)}let w=c1(b.left,v),x=c1(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return n=e,r=t,c1(n.test,r)?c1(n.consequent,r):c1(n.alternate,r);case"CallExpression":return c9(c4(e,t));case"ArrowFunctionExpression":let S;return o=e,i=t,S=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<S.length)throw`Required argument(s) ${S.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(S.reduce((t,n,r)=>{let o=e[r];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 n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(o)&&t.push([n,o]),t},[]));return c1(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return c9(c3(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(c8(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(c8(u)))[E.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(c8(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.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,(de(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 P,k;return p=e,f=t,P=p.expressions?.map(c8(f))??[],(k=p.quasis?.map(c8(f))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function c2(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return c2(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function c4(e,t){let n=c7(e.callee,t);if(n===c5||e.optional&&null==n)return c5;let r=e.arguments?.map(c8(t));if(n){if("function"!=typeof n)throw`${dr(e.callee)} is not a function`}else throw`No function named ${dr(e.callee)} is defined in this context`;return n(...r)}function c3(e,t){let n=c7(e.object,t);if(n===c5||e.optional&&null==n)return c5;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${dn(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=c2(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${dn(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof n&&"function"!=typeof n&&"string"!=typeof n&&"number"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;let r=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}(c1(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);de(r),function(e,t){if(dt.has(String(t)))return;let n=Object(e);for(;null!==n;){if(Object.hasOwn(n,t)){if(n===Object.prototype||n===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}n=Object.getPrototypeOf(n)}}(n,r);let o=n[r];return"function"==typeof o?o.bind(n):o}function c6(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}cL.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 n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:cB,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=cB,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),cL.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),cL.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 n(t){let n=this.index,r="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(r+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(r+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(a===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:r},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var o,i,a;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,i=u,95===o||i.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,n.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,r)})}}),cL.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,o=this.expr.slice(n,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{r=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),cL.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||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:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),cL.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},r="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",r="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=a}else r+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),cL.addBinaryOp("in",7),cL.addBinaryOp("??",1);let c5=Symbol("optional chain short-circuited");function c7(e,t){switch(e.type){case"MemberExpression":return c3(e,t);case"CallExpression":return c4(e,t);default:return c1(e,t)}}function c9(e){return e===c5?void 0:e}function c8(e){return function(t){return null===t?null:c1(t,e)}}function de(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let dt=new Set(["toString","valueOf","hasOwnProperty"]);function dn(e,t){try{return c2(e,t)}catch{return"<computed>"}}function dr(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function di(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:{...cU},isLocalExpression:!1,variables:new Set};return da("string"==typeof e?cL(e):e,t),[...t.variables]}function da(e,t){switch(e.type){case"UnaryExpression":return r=e,o=t,da(r.argument,o);case"BinaryExpression":return i=e,a=t,[da(i.left,a),da(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[da(s.consequent,l),da(s.test,l),da(s.alternate,l)].filter(Boolean);case"CallExpression":let n;return u=e,c=t,n=da(u.callee,c),u.arguments?.map(ds(c)),n;case"ArrowFunctionExpression":var r,o,i,a,s,l,u,c,d,p,f,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let S=v.params?.map(ds(x))??[],E=da(v.body,x)??[];if(E&&Array.isArray(E))for(let e of E)S.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(da(D.object,O),D.computed)return void da(D.property,O);let P={...O};P.isLocalExpression=!0,da(D.property,P);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(ds(p));case"SequenceExpression":return f=e,h=t,void f.expressions?.map(ds(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(ds(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(ds(b)),g.quasis?.map(ds(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ds(e){return function(t){return null===t?null:da(t,e)}}let dl=J("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()});function du(e,t,n){dl.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function dc(){let e=dl.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function dd(e){return dl.getState().flags[e].enabled}function dp(e,t){dl.subscribe(n=>{t(n.flags[e].enabled)})}function df(e,t){dl.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}function dh(e){return!window.offlineEnabled||(e??navigator.onLine)}dl.subscribe(e=>{for(let[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))});var dm=e0(function(e,t,n){eW(e,t,n)});function dy(e=!0,t=!1){return dg(dh(),e,t)}function dg(e,t=!0,n=!1){return!!(e?t:n)}let db=Z("extensionsInternal",{slots:{},extensions:{}}),dv=Z("extensionRenderings",{renderings:new Map}),dw=()=>J("extensionsInternal",{slots:{},extensions:{}}),d_=()=>J("extensionRenderings",{renderings:new Map});function dx(e){let t=db.getState(),n=e(t);n!==t&&db.setState(n)}let dS=null,dE=null;function dD(){let e=dv.getState();return dS&&e===dE||(dS=new Map(e.renderings),dE=e,function(e){for(let t of(dM.clear(),e.values()))d$(t,1);dI=!0}(dS)),dS}function dO(e){dE={renderings:e},dv.setState(dE,!0)}function dP(e){let t=dD();t.has(e.renderingId)||(t.set(e.renderingId,e),d$(e,1),dO(t))}function dk(e){let t=dD(),n=t.get(e);n&&(t.delete(e),d$(n,-1),dO(t))}let dC=()=>J("extensions",{slots:{}}),dj=0,dT=new Set;function dR(e){dj++;try{return e()}finally{if(0==--dj&&dT.size>0){let e=Array.from(dT);for(let t of(dT.clear(),e))dN(t)}}}function dN(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function dA(e){dj>0?dT.add(e):dN(e)}let dM=new Map,dI=!1;function d$(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=dM.get(n);if(!r){if(t<0)return;dM.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),dI=!0;return}r.count+=t,r.count<1&&(dM.delete(n),dI=!0)}function dL(){var e,t;if(dD(),!dI)return;dI=!1;let n=Array.from(dM.values(),({record:e})=>e);n.sort(dF),e=tI.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===dF(e,t[n]))||tI.setState({mountedExtensions:n})}function dF(e,t){return dB(e.slotName,t.slotName)||dB(e.extensionId,t.extensionId)||dB(e.slotModuleName,t.slotModuleName)||dB(e.extensionModuleName,t.extensionModuleName)}function dB(e,t){return e===t?0:e<t?-1:1}dL(),dv.subscribe(()=>dA(dL));let dV=dw(),dU=dC(),dW=tL(),dK=tV(),dH=new Set,dz=!1;function dG(e){if(null===e)dH=null;else if(null!==dH)for(let t of e)dH.add(t);dA(dq)}function dq(){if(!dz){dz=!0;try{for(let e=1;;e++){let t=dH;if(null!==t&&0===t.size)return;dH=new Set;try{!function(e,t,n,r,o,i=null){let a=dU.getState().slots,s={},l=!1,u=dh(),c=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,d]of Object.entries(e.slots)){let p=a[r];if(p&&i&&!i.has(r)){s[r]=p;continue}let{config:f}=tB(t,d.name),h=function(e,t,n,r,o,i,a){let s=function(e,t){let n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=dV.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>d6(e,o,i[dQ(e)]?.order,t)-d6(n,o,i[dQ(n)]?.order,t))}(n,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=tW(r,e,u),c=tK(n,e,u),d=c?dm({},s,c):s,p=dQ(u),f=t.extensions[p];if(f){let e=d?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!id(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!dg(i,f.online,f.offline))continue;l.push({id:u,name:p,moduleName:f.moduleName,config:d,featureFlag:f.featureFlag,meta:f.meta,online:d?.["Display conditions"]?.online??f.online??!0,offline:d?.["Display conditions"]?.offline??f.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||f.displayExpression})}}return l}(r,e,f,n,c,u,o.session);p&&p.moduleName===d.moduleName&&(0,e2.A)(p.candidateExtensions,h)?s[r]=p:(s[r]={moduleName:d.moduleName,candidateExtensions:h},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&dU.setState({slots:s})}(dV.getState(),dW.getState(),dK.getState(),dl.getState(),io.getState(),t)}catch(e){throw dH=null===t||null===dH?null:new Set([...t,...dH]),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{dz=!1}}}function dZ(e,t){let n=new Set;for(let r of Object.keys(e))e[r]!==t[r]&&n.add(r);for(let r of Object.keys(t))r in e||n.add(r);return n}function dY(){dG(null)}function dJ(e,t){return{moduleName:t,name:e,attachedIds:[]}}function dQ(e){let[t]=e.split("#");return t}function dX(e,t){let n=dQ(t);return e.extensions[n]}function d0(e){return dX(dV.getState(),e)}dV.subscribe((e,t)=>{dG(e.extensions!==t.extensions?null:dZ(e.slots,t.slots))}),dW.subscribe((e,t)=>{dG(dZ(e.slots,t.slots))}),dK.subscribe((e,t)=>{dG(dZ(e.configs,t.configs))}),dl.subscribe(()=>dG(null)),io.subscribe(()=>dG(null)),dY(),b(dY);let d1=e=>dx(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function d2(e,t){dx(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...dJ(e),attachedIds:[t]}}}})}function d4(e,t){dx(n=>{let r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function d3(e){dx(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function d6(e,t,n,r){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==n)return 1e3+n;let t=r.indexOf(e);return -1!==t?2e3+t:3e3}}function d5(e,t){return function(e,t,n=null,r){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:n,...t}:{session:n});try{return!!cH(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(d7(e),t,io.getState().session,e)}function d7(e){return dU.getState().slots[e]?.candidateExtensions??[]}let d9=(e,t)=>dV.setState(n=>{let r=n.slots[t]?.moduleName;if(r&&r!=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 ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let o=dJ(t,e);return{...n,slots:{...n.slots,[t]:{...o}}}}),d8=()=>{dH=null,dx(()=>({slots:{},extensions:{}})),d_().setState({renderings:new Map}),dU.setState({slots:{}})},pe=Z("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function pt({name:e,basePath:t,mode:n,componentContext:r,state:o}){pe.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:o})}function pn(e){pe.getState().slotName===e&&pe.setState(pe.getInitialState(),!0)}let pr=Z("modalRegistry",{modals:{}});function po(e){pr.setState(t=>(t.modals[e.name]=e,t))}function pi(e){let t=pr.getState().modals[e];if(!t){let n=d0(e);n&&(t={name:e,load:n.load,moduleName:n.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.`),po(t))}return t}let pa=Z("workspaceRegistrations",{workspaces:{}}),ps=Z("workspaceGroups",{workspaceGroups:{}});function pl(e){pa.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 pu(e){ps.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let pc=new Set;function pd(e){let t=pa.getState().workspaces;if(t[e])return t[e];{let t=d0(e);if(t){var n;let r;return pc.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.`),pc.add(e)),{name:t.name,title:(n=t,"string"==typeof(r=n?.meta?.title)?r:r&&"object"==typeof r?oz(n.moduleName,r.key,r.default):n.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 pp(e){let t=ps.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let pf=Z("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function ph(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=pf.getState(),r=t[e];if(r){let t=n[r.window];if(t)return t;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function pm(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=pf.getState(),r=n[e];if(r){let n=t[r.group];if(n)return n;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function py(e){let{openedWindows:t}=pf.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function pg(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=pf.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}pf.setState({registeredGroupsByName:r})}function pb(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=pf.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace window ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}pf.setState({registeredWindowsByName:r})}function pv(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=pf.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}pf.setState({registeredWorkspacesByName:r})}let pw=0,p_=null,px={bootstrap:15e3,mount:15e3,unmount:15e3};function pS(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(px).filter(t=>e[t]).map(r=>{var o,i;let a,s;return[r,(o=e[r],i=px[r],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${r} at array index ${i} for parcel ${n} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${r} for parcel ${n} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(r,!1),e),e=>{throw t(r,!0),e})})]}));return{...e,...r}}async function pE(e,t){var n,r;let o,i,a,s,l,u=await (p_??(p_=new Promise((e,t)=>{ry({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),ry))),p_),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return r=u((n=d.onSettled,"function"==typeof e?()=>e().then(e=>pS(e,n)):pS(e,n)),c),s=e=>t=>e.call(r,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===r.getStatus()&&d.release(),e}),l=r.update&&s(r.update),Object.defineProperty(r,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function pD(){return pO}function pO(e,t){let n,r=pE(e,t).then(e=>n=e);return{mount:()=>r.then(e=>e.mount()),unmount:()=>r.then(e=>e.unmount()),update:e=>r.then(t=>t.update?.(e)),getStatus:()=>n?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return r.then(e=>e.loadPromise)},get bootstrapPromise(){return r.then(e=>e.bootstrapPromise)},get mountPromise(){return r.then(e=>e.mountPromise)},get unmountPromise(){return r.then(e=>e.unmountPromise)}}}async function pP(e,t,n,r,o=e=>e,i={}){let a=dQ(r),s=d0(r),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:d,offline:p,load:f}=s;if(dy(d,p)){let s,d=pw++,p=`${t}/${r}-${d}`;e.dataset.extensionRenderingId=p;let h=e=>{try{dk(p)}catch(t){console.error(e,t)}};try{dP({renderingId:p,extensionName:a,extensionModuleName:c,extensionId:r,slotName:t,slotModuleName:n})}catch(e){throw h(`Recomputing configuration after registering '${r}' failed also failed`),e}try{s=await f()}catch(e){throw h(`Recomputing configuration after '${r}' failed to load also failed`),e}try{l=await pE(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:u,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:c,extensionMeta:u},domElement:e})}catch(e){throw h(`Recomputing configuration after '${r}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${r}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${r}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${r}' failed`),e=>{console.error(`Extension '${r}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${r}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return l}var pk=n(35399),pC=n.n(pk);let pj=(0,pk.createContext)({moduleName:"",featureName:""});function pT({to:e,templateParams:t,onBeforeNavigate:n,children:r,...o}){return(0,pk.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}`)},[]),pC().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),oY({to:e,templateParams:t})),0===r.button&&(r.ctrlKey||r.metaKey)&&n?.(r),0===r.button&&r.shiftKey&&n?.(r),1===r.button&&n?.(r)},href:oq(e,t),...o},r)}let pR=({state:e,children:t,...n})=>{let{extension:r}=(0,pk.useContext)(pj),o=(0,pk.useRef)(null),i=(0,pk.useRef)(Promise.resolve()),a=(0,pk.useRef)(!1),s=(0,pk.useRef)(!1),l=(0,pk.useRef)(e),u=(0,pk.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,pk.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.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 '${r?.extensionId}' failed to update`,e)}))},[]),d=(0,pk.useCallback)(t=>{t&&!o.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,pP(t,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,pk.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,pk.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),r?pC().createElement("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function pN(e){let t=(0,pk.useRef)(e);return F(t.current,e)||(t.current=e),t.current}function pA(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[r,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};n[r]=t}return n}let pM=e=>e;function pI(e,t=pM,n){let r=(0,pk.useCallback)(t=>e.subscribe(t),[e]),o=(0,pk.useCallback)(()=>t(e.getState()),[e,t]),i=(0,pk.useSyncExternalStore)(r,o,o),a=(0,pk.useMemo)(()=>n?pA(e,n):null,[e,n]);return(0,pk.useMemo)(()=>a?{...i,...a}:i,[i,a])}function p$(e,t){return pI(e,pM,t)}function pL(e){return function(t){let n=(0,pk.useCallback)(t=>e.subscribe(t),[]),r=(0,pk.useCallback)(()=>e.getState(),[]),o=(0,pk.useSyncExternalStore)(n,r,r),i=(0,pk.useMemo)(()=>t?pA(e,t):null,[t]);return(0,pk.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let pF=[];Object.freeze(pF);let pB={candidateExtensions:pF};Object.freeze(pB);let pV=e=>{let t=(0,pk.useCallback)(t=>t.slots?.[e]??pB,[e]);return pI(dC(),t)},pU=e=>e.session;function pW(e,t){let{candidateExtensions:n}=pV(e),r=pI(io,pU),o=pN(t);return(0,pk.useMemo)(()=>d5(e,o),[e,o,r,n])}function pK(e,t){let{moduleName:n}=(0,pk.useContext)(pj);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,pk.useEffect)(()=>{d9(n,e)},[n,e]),{extensions:pW(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function pH(e){return e}function pz({name:e,extensionSlotName:t,select:n=pH,children:r,state:o,style:i,...a}){if(r&&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,pk.useRef)(null),{extensions:u,extensionSlotModuleName:c}=pK(s,o),d=(0,pk.useMemo)(()=>n(u),[n,u]),p=(0,pk.useMemo)(()=>{if("function"==typeof r&&!pC().isValidElement(r))return d.map(e=>r(e,o))},[r,d]);return pC().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>pC().createElement(pj.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},p?.[t]??("function"!=typeof r?r:null)??pC().createElement(pR,{state:o}))))}var pG=n(25873);function pq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pq(Object(n),!0).forEach(function(t){var r,o,i;r=e,o=t,i=n[t],o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pY(e){return(pY="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 pJ(e){return(pJ="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 pQ(e,t){var n;if("function"!=typeof(n=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 n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,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(pJ(n)));return function(){var e=n(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(pJ(e)));return e}}var pX=null;try{pX=require("react").createContext()}catch(e){}var p0={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 p1(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function p2(e,t){return new Promise(function(n,r){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,i=p5(e,t,function(){n(this)}),a=pQ(e,t)(),s=function(e){var t=e.reactDom,n=e.renderType,r=e.elementToRender,o=e.domElement,i=t[n];if("function"!=typeof i)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(r),a;case"hydrateRoot":return i(o,r);default:return i(r,o),null}}({elementToRender:i,domElement:a,reactDom:p6(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function p4(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():p6(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function p3(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=p5(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=pQ(e,t)();p6(e).render(r,i)}})}function p6(e){return e.ReactDOMClient||e.ReactDOM}function p5(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=pX?e.React.createElement(pX.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,pZ(pZ({},t),{},{mountFinished:n,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 p7=n(27807),p9=n(1619),p8=n.n(p9),fe=n(43432);let ft={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},fn=new Map;(0,fe.initCache)(fn);let fr={errorRetryCount:3,fetcher:ie,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof ir){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>fn};function fo(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},ft,e),n={...fr,...t.swrConfig};return function(e){var r,o,i,a,s;return i=o=class extends(r=pC().Component){componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return pC().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=pC().createElement(pk.Suspense,{fallback:null},pC().createElement(p9.SWRConfig,{value:n},pC().createElement(pj.Provider,{value:this.state.config},t.disableTranslations?pC().createElement(e,this.props):pC().createElement(p7.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},pC().createElement(e,this.props)))));return t.strictMode&&pC().StrictMode?pC().createElement(pC().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function fi(e,t){return function(e){if("object"!==pY(e))throw Error("single-spa-react requires a configuration object");var t,n=pZ(pZ({},p0),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!pX&&n.React.createContext&&(pX=n.React.createContext()),n.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}(n);var r={bootstrap:p1.bind(null,n),mount:p2.bind(null,n),unmount:p4.bind(null,n)};return n.parcelCanUpdate&&(r.update=p3.bind(null,n)),r}({React:pC(),ReactDOMClient:pG,rootComponent:fo(t)(e)})}function fa(e,t){return()=>e().then(({default:e})=>fi(e,t))}function fs(e,t){return()=>Promise.resolve(fi(e,t))}let fl=fa,fu=W()(()=>({}));Y("openmrs-app-context",fu);let fc={};function fd(e,t=e=>e){let n=fu.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function fp(e,t){fu.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function ff(e){return null===e?null:Object.freeze(Object.assign({},e))}let fh=new Map;function fm(e,t){let n=(0,pk.useRef)(t??{}),r=(0,pk.useRef)(t=>fp(e,t)),o=(0,pk.useRef)(Symbol());return(0,pk.useEffect)(()=>{let n=t??{},r=o.current;return null===fd(e)?!function(e,t=fc){fu.setState(n=>{if(e in n)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({},n,{[e]:t===fc?{}:t})})}(e,n):(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.`),fp(e,()=>n)),fh.set(e,r),()=>{fh.get(e)===r&&(fu.setState(t=>(e in t&&delete t[e],t)),fh.delete(e))}},[e]),(0,pk.useEffect)(()=>{let r=t??{};F(n.current,r)||(fp(e,()=>r),n.current=r)},[t]),r.current}function fy({namespace:e,value:t}){return fm(e,t),null}let fg=({children:e,value:t,fallback:n})=>t?pC().createElement(pC().Fragment,null,e):n?pC().createElement(pC().Fragment,null,n):null;function fb(){let e=(0,pk.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,pk.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function fv(e,t=e=>e??{}){let[n,r]=(0,pk.useState)(()=>{if(fw(e))return;let n=fd(e);if(null!==n)return t?t(n):n});return(0,pk.useEffect)(()=>{if(fw(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,pk.useEffect)(()=>{var n;let o;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>F(e,n)?e:n)})(ff(o=fd(e))),fu.subscribe(t=>{let r=e in t?t[e]:null;r!==o&&(o=r,n(ff(r)))})},[e,t]),n}function fw(e){return"string"!=typeof e||0===e.trim().length}function f_(e){let t=pW(e);return(0,pk.useMemo)(()=>t.map(e=>e.id),[t])}function fx(e){return pV(e).candidateExtensions}function fS(e,t,n){let{data:r,error:o,mutate:i,isLoading:a,isValidating:s}=p8()(e?as(e,t,n):null,ie);return(0,pk.useMemo)(()=>({isLoading:a,data:r?.data.results??[],error:o,mutate:i,isValidating:s}),[r,o,a,s,i])}function fE(e){(0,pk.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let fD={},fO=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function fP(e){let{moduleName:t,extension:n}=(0,pk.useContext)(pj),r=e?.externalModuleName??t;if(!r&&!n)throw Error(fO);let o=function(e){let t=(0,pk.useMemo)(()=>t$(e),[e]),n=function(e){let[t,n]=(0,pk.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,pk.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw fD[e]||(fD[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),fD[e];return n}(r),i=function(e){let t=(0,pk.useMemo)(tV,[]),n=function(e,t){let[n,r]=(0,pk.useState)(t?()=>{let n=tW(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,pk.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=tW(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,e2.A)(o.config,n)&&r(o.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!fD[n]&&t&&(fD[n]=new Promise(n=>{let r=t.subscribe(t=>{let o=tW(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())})})),fD[n]}return n||{}}(n);return(0,pk.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...o}:{...o,...i},[r,e?.externalModuleName,o,i])}let fk=pW;function fC(){let[e,t]=(0,pk.useState)(dh());return(0,pk.useEffect)(()=>b(({online:e})=>t(e)),[]),e}function fj(e,t=300){let[n,r]=(0,pk.useState)(e);return(0,pk.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var fT=n(13660),fR=n.n(fT);let fN=`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 fA(){let e=`${o5}/emrapi/configuration?v=${fN}`,t=fR()(e,ie);return(0,pk.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function fM(){return(0,pk.useContext)(pj).extension}let fI=pL(dw());function f$(e){let t=pW(e);return(0,pk.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let fL=pL(dC());function fF(e){let{flags:t}=pI(dl);return t[e]?.enabled??!1}function fB(){let[,e]=(0,pk.useState)(0);return(0,pk.useCallback)(()=>{e(e=>e+1)},[])}function fV(e,t,n={}){return fW(e,t,fU,n)}let fU={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(o8(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.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 fW(e,t,n,r={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??ie,[d,p]=(0,pk.useState)(1),f=(0,pk.useRef)(NaN),h=(0,pk.useRef)(NaN),m=(0,pk.useRef)(d),y=(0,pk.useRef)(!1),g=(0,pk.useRef)(!1),b=e?.toString()??"",[v,w]=(0,pk.useState)(b);b!==v&&(w(b),p(1),m.current=1,f.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,S=(0,pk.useMemo)(()=>o(e,t,x),[e,t,x]),{data:E,...D}=(l?fR():p8())(S,c,u);E?.data&&(f.current=i(E?.data),h.current=a(E?.data),y.current=!0);let O=Math.ceil(f.current/t),P=(0,pk.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let n=Math.ceil(f.current/t);!y.current||Number.isNaN(n)||e<=n?(m.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,pk.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(f.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} 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}.`),m.current=e,p(e))},[d,t,b,E]);let k=(0,pk.useCallback)(()=>{P(m.current+1)},[P]),C=(0,pk.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(E?.data),totalPages:O,totalCount:f.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...D}}function fK(e,t,n={}){return fW(e,t,fH(),n)}function fH(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(o8(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.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 fz=n(30682),fG=n.n(fz);function fq(e,t={}){return fZ(e,fU,t)}function fZ(e,t,n={}){let{swrInfiniteConfig:r,immutable:o}=n,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=n.fetcher??ie,u=(0,pk.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:p,...f}=fG()(u,l,{...r,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{p((c?.length??0)+1)},nextUri:h,...f}}function fY(e,t={}){return fJ(e,fU,t)}function fJ(e,t,n={}){let r=fZ(e,t,n),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=r;return((0,pk.useEffect)(()=>{o&&!i&&s()},[o,u]),n.partialData)?r:{...r,data:o||i?void 0:a,isLoading:l||o}}function fQ(e,t={}){return fJ(e,fH(),t)}function fX(e,t={}){return fZ(e,fH(),t)}function f0(){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 f1(){let[e,t]=(0,pk.useState)(f0);return(0,pk.useEffect)(()=>{let e=()=>{t(f0())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let f2=e=>"small-desktop"===e||"large-desktop"===e;function f4(e){let t=(0,pk.useContext)(pj);(0,pk.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),pt(e),()=>{pn(e.name)}),[t,e])}function f3(){return pI(pe)}function f6(e=null,t=null){let[n,r]=(0,pk.useState)([]);return(0,pk.useEffect)(()=>{let n=cS(e,t).subscribe(e=>{r(e)},e=>{console.error(e)});return()=>n.unsubscribe()},[e,t]),n}function f5(e,t=!0){let n=(0,pk.useRef)(null);return(0,pk.useEffect)(()=>{let r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}function f7(e){let t=(0,pk.useRef)();return(0,pk.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function f9(e,t={}){let{abortController:n,fetchInit:r,url:o,swrConfig:i}=t,a=fb(),s=(0,pk.useMemo)(()=>r?.signal??n?.signal??a.signal,[n?.signal,r?.signal,a.signal]),l=(0,pk.useCallback)(e=>ie(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),{...r,signal:s}),[s,r,o]);return p8()(e,l,i)}function f8(e=[],t=10){let[n,r]=(0,pk.useState)(1),o=(0,pk.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);n>o&&r(o);let i=Math.min(Math.max(1,n),o),a=(0,pk.useMemo)(()=>{let n=(i-1)*t,r=(i+0)*t;return e.slice(n,r)},[e,i,t]),s=(0,pk.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,pk.useCallback)(()=>{r(e=>e+1)},[]),u=(0,pk.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,pk.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function he(e,t,n,r){return{pageSizes:(0,pk.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,pk.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function ht(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function hn(e){let[t,n]=(0,pk.useState)(e??ht()),{data:r,error:o,isValidating:i}=p8()(t?["patient",t]:null,()=>cg(t,{}));return(0,pk.useEffect)(()=>{let e=()=>{let e=ht();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,pk.useMemo)(()=>({isLoading:i&&!o&&!r,patient:r,patientUuid:t,error:o}),[i,o,r,t])}function hr(){let e=`${o5}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=p8()(e,ie);return(0,pk.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function ho(e){let{extensions:t,extensionSlotModuleName:n}=pK(e);return e?t.map(t=>({state:r})=>pC().createElement(pj.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n,extensionMeta:t.meta}}},pC().createElement(pR,{state:r}))):[]}function hi(){let e=(0,pk.useRef)(),[t,n]=(0,pk.useState)(null),r=null;if(!t){if(s){let e=is().getState();e.loaded&&(r=e.session)}else s=new Promise(t=>{let n=({loaded:n,session:o})=>{n&&(t(o),r=o,e.current&&(e.current(),e.current=void 0))};n(is().getState()),r||(e.current=is().subscribe(n))});if(r)n(r);else throw s}(0,pk.useEffect)(()=>(e.current||(e.current=is().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||r;if(!o)if(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let ha=({privilege:e,fallback:t,children:n})=>{let[r,o]=(0,pk.useState)(null);return((0,pk.useEffect)(()=>{let e=ia({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),r&&id(e,r))?pC().createElement(pC().Fragment,null,n):t?pC().createElement(pC().Fragment,null,t):null};var hs=n(80222),hl=n.n(hs),hu=n(85602);let hc=new Map;function hd(){for(let e of Array.from(hc.values()))e()}let hp={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function hf(e){let t=(0,pk.useId)();return(0,pk.useEffect)(()=>{if(e)return hc.set(t,e),()=>{hc.delete(t)}},[t,e]),{...p$(cT(),hp),mutateVisit:hd}}function hh(e,t=cC){let n=(0,pk.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:o,setVisitContext:i}=hf((0,pk.useCallback)(()=>n.current?.(),[])),a=e&&r==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=p8()(e?`${o5}/visit${s}`:null,ie),{data:f,error:h,mutate:m,isValidating:y}=p8()(e&&a?`${o5}/visit${l}`:null,ie),g=(0,pk.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,pk.useMemo)(()=>a&&f?f.data:null,[f,a]),v=(0,pk.useRef)(null);(0,pk.useEffect)(()=>{!p&&g&&r===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,p,y,r]);let w=(0,pk.useCallback)(()=>{d(),m()},[d,m]);(0,pk.useEffect)(()=>{n.current=w},[w]);let x=!!(!u||a&&!f),S=!!(a?h:c);return{error:c||h,mutate:w,isValidating:p||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!S}}function hm(){let[e,t]=(0,pk.useState)([]);return(0,pk.useEffect)(()=>{let e=cD().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}hl().extend(hu);let hy=new Map;async function hg(e,t){let n=t.indexOf("#"),r=n>=0,o=r?t.substring(0,n):e,i=r?t.substring(n+1):t,a=await iK(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?hv(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),hb)}let hb={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function hv(e,t){if(e in hy)await hy[e];else{let n=t??await iK(e);await (hy[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let o=n.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{ne(e),t(null)}).catch(r)}ne(e),t(null)}))}}function hw(e,t){let n=t.name;if(!n)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 ${n} from ${e} declares both a 'slots' property and
19
19
  a 'slot' property. Only the 'slots' property will be honored.`);let r=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${n} 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(d3({name:n,load:()=>hw(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))d6(o,n)}let hE=[];function hD(e,t){dA(()=>(function(e,t){if(e&&t&&"object"==typeof t){nn(e);let n=t.extensions??[],r=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=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"))?hE.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)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?hS(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let n;(n=t.name)?t.component?ps({name:n,moduleName:e,load:()=>hw(e,t.component)}):console.error(`The modal ${n} 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(d1({name:n,load:()=>hg(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))d2(o,n)}let h_=[];function hx(e,t){dR(()=>(function(e,t){if(e&&t&&"object"==typeof t){t8(e);let n=t.extensions??[],r=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=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"))?h_.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)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?hw(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let n;(n=t.name)?t.component?po({name:n,moduleName:e,load:()=>hg(e,t.component)}):console.error(`The modal ${n} 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 n=t.name;if(!n)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 r=t.title;if(!r)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 ${n} 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(pd({name:n,title:r,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>hw(e,t.component)}),t.groups||[]))pp({name:o,members:[n]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let n;(n=t.name)?pp({name:n,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)}),pw(e,s);for(let t of(p_(e,l),l))t.icon&&hS(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});px(e,u),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?dp(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(pl({name:n,title:r,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>hg(e,t.component)}),t.groups||[]))pu({name:o,members:[n]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let n;(n=t.name)?pu({name:n,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)}),pg(e,s);for(let t of(pb(e,l),l))t.icon&&hw(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});pv(e,u),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?du(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 hO(){hE.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of hE){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${r}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
- To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?r0(e,()=>hw(t.appName,t.component),function(e,{online:t,offline:n,featureFlag:r}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&n)&&(!r||!!dh(r))&&e(o):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?r5(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let hP={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 hk(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<hP.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>hP.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>hP.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<hP.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<hP.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<hP.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>hP.SMALL_DESKTOP_MAX)}let hC=!1;function hj(){hC||(window.addEventListener("resize",hk),hk(),hC=!0)}var hT=n(31085),hR=n(53373),hM=n.n(hR);function hN({title:e,children:t}){let n="tablet"===f3();return(0,hT.jsxs)("div",{className:hM()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,hT.jsx)("h4",{children:e}),t]})}let hA=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],hI={primaryColor:{_type:tC.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nA.oneOf(hA)]},secondaryColor:{_type:tC.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nA.oneOf(hA)]}},h$={"Brand color #1":{_default:"#005d5d",_type:tC.String},"Brand color #2":{_default:"#004144",_type:tC.String},"Brand color #3":{_default:"#007d79",_type:tC.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tC.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tC.UUID}}},implementationName:{_type:tC.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tC.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:tC.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:[nA.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:tC.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:tC.String}},diagnosisTags:hI};var hL=n(52697);let hF={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},hB=e=>(0,hT.jsx)(hL.GGC,{translateWithId:(e,t)=>{let n=hF[e];return n?oY(n,e,t):e},...e}),hV="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",hU="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",hW="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",hK="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",hz=(0,pT.createContext)(null);function hH(){let e=(0,pT.useContext)(hz);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function hq({menuTitle:e,children:t}){let[n,r]=pR().useState(!1),o=f8(()=>r(!1),n),i="tablet"===f3(),a=(0,pT.useCallback)(()=>r(e=>!e),[]),s=(0,pT.useRef)(null),l=(0,pT.useRef)(null),u=(0,pT.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,pT.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,pT.useMemo)(()=>({closeMenu:p}),[p]),h=(0,pT.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),p())},[p,n]),m=pT.Children.toArray(t);(0,pT.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let y=(0,pT.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(n).indexOf(r);if(-1===o)return void n[t>0?0:n.length-1]?.focus();let i=o+t,a=i<0?n.length-1:i>=n.length?0:i;n[a]?.focus()},[]),g=m.map((e,t)=>(0,pT.isValidElement)(e)?(0,pT.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:y,index:t}):e);return(0,hT.jsxs)("div",{"data-overflow-menu":!0,className:hM()("cds--overflow-menu",hV),ref:o,children:[(0,hT.jsx)("button",{className:hM()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},hK),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,hT.jsxs)("div",{className:hM()("cds--overflow-menu-options","cds--overflow-menu--flip",hU,{[hW]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,hT.jsx)("ul",{className:hM()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,hT.jsx)(hz.Provider,{value:f,children:g})}),(0,hT.jsx)("span",{})]})]})}function hG(e){let t=(0,pT.useContext)(hz);return(0,hT.jsx)(hL.XSD,{...e,closeMenu:t?.closeMenu})}var hZ=n(95571);let hY=["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"],hJ=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),hQ=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-add",iconProps:e})})),hX=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),h0=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),h1=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),h2=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),h4=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),h3=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),h6=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),h5=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),h7=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),h9=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),h8=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),me=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),mt=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),mn=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),mr=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),mo=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),mi=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),ma=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),ms=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),ml=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),mu=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-close",iconProps:e})})),mc=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),md=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),mp=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-document",iconProps:e})})),mf=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),mh=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-download",iconProps:e})})),mm=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),my=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),mg=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),mb=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-events",iconProps:e})})),mv=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),mw=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),m_=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),mx=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),mS=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),mE=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-group",iconProps:e})})),mD=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),mO=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),mP=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),mk=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-information",iconProps:e})})),mC=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),mj=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),mT=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),mR=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),mM=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),mN=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-location",iconProps:e})})),mA=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),mI=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),m$=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),mL=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),mF=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),mB=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),mV=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-money",iconProps:e})})),mU=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),mW=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),mK=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),mz=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),mH=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-password",iconProps:e})})),mq=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),mG=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),mZ=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),mY=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),mJ=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),mQ=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),mX=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),m0=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-report",iconProps:e})})),m1=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),m2=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-save",iconProps:e})})),m4=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-search",iconProps:e})})),m3=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),m6=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),m5=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),m7=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),m9=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),m8=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),ye=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),yt=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-table",iconProps:e})})),yn=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-time",iconProps:e})})),yr=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),yo=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),yi=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),ya=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),ys=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),yl=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),yu=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),yc=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),yd=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-user",iconProps:e})})),yp=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),yf=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-view",iconProps:e})})),yh=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(y_,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),ym=yh,yy=mf,yg=mM,yb=mP,yv=m7,yw=(0,pT.memo)((0,pT.forwardRef)(function({icon:e,fallback:t,...n},r){let o=(0,pT.useRef)(e?document.getElementById(e):void 0);return(0,pT.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,hT.jsx)(fw,{value:o.current,fallback:t,children:(0,hT.jsx)(y_,{ref:r,icon:e,iconProps:n})})})),y_=(0,pT.memo)((0,pT.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,pT.useRef)(null);return(0,pT.useImperativeHandle)(n,()=>a.current),(0,pT.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,hT.jsx)("svg",{ref:a,className:hM()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:i,width:i,viewBox:"0 0 16 16",children:(0,hT.jsx)("use",{href:`#${e}`})})})),yx=({path:e,title:t,basePath:n,icon:r})=>{let{t:o}=(0,fe.useTranslation)(),i=(0,hZ.useLocation)(),a=(0,pT.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[i.pathname,e]);return(0,hT.jsx)("div",{children:(0,hT.jsx)(pN,{className:hM()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${n}/${encodeURIComponent(e)}`,children:(0,hT.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,hT.jsx)(yw,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,hT.jsx)("span",{children:o(t)})]})})},e)};function yS(e){return function({basePath:t}){return(0,hT.jsx)(hZ.BrowserRouter,{children:(0,hT.jsx)(yx,{basePath:t,...e})})}}function yE(e){let t=(0,pT.useRef)(null),n=(0,pT.useRef)(void 0),r=(0,pT.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,pT.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function yD(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=yO(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():yO(e[n],null)})}}}function yO(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yP(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let yk="u">typeof document?pR().useLayoutEffect:()=>{},yC={prefix:String(Math.round(1e10*Math.random())),current:0},yj=pR().createContext(yC),yT=pR().createContext(!1),yR=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),yM="function"==typeof pR().useId?function(e){let t=pR().useId(),[n]=(0,pT.useState)(y$()),r=n?"react-aria":`react-aria${yC.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,pT.useContext)(yj),n=function(e=!1){let t=(0,pT.useContext)(yj),n=(0,pT.useRef)(null);if(null===n.current&&!e){let e=pR().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=yR.get(e);null==n?yR.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,yR.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function yN(){return!1}function yA(){return!0}function yI(e){return()=>{}}function y$(){return"function"==typeof pR().useSyncExternalStore?pR().useSyncExternalStore(yI,yN,yA):(0,pT.useContext)(yT)}let yL=!!("u">typeof window&&window.document&&window.document.createElement),yF=new Map;function yB(e){let[t,n]=(0,pT.useState)(e),r=(0,pT.useRef)(null),o=yM(t),i=(0,pT.useRef)(null);if(l&&l.register(i,o),yL){let e=yF.get(o);e&&!e.includes(r)?e.push(r):yF.set(o,[r])}return yk(()=>()=>{l&&l.unregister(i),yF.delete(o)},[o]),(0,pT.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),o}function yV(e=[]){let t=yB(),[n,r]=function(e){let[t,n]=(0,pT.useState)(e),r=(0,pT.useRef)(t),o=(0,pT.useRef)(null),i=(0,pT.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}r.current===e.value?i.current():n(e.value)});return yk(()=>{r.current=t,o.current&&i.current()}),[t,(0,pT.useCallback)(e=>{o.current=e(r.current),i.current()},[i])]}(t),o=(0,pT.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return yk(o,[t,o,...e]),n}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{yF.delete(e)}));let yU=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r};function yW(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],o=r[e];"function"==typeof n&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=yP(n,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof o?t[e]=yU(n,o):"id"===e&&n&&o?t.id=function(e,t){if(e===t)return e;let n=yF.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=yF.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,o):"ref"===e&&n&&o?t.ref=yD(n,o):t[e]=void 0!==o?o:n}}return t}let yK=Symbol("default");function yz({values:e,children:t}){for(let[n,r]of e)t=pR().createElement(n.Provider,{value:r},t);return t}function yH(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,pT.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,u="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,n,r,o,i,a,s])}function yq(e,t){let n=(0,pT.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||yK;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function yG(e,t,n){let{ref:r,...o}=yq(n,e.slot)||{},i=yE((0,pT.useMemo)(()=>yD(t,r),[t,r])),a=yW(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let n="function"==typeof o.style?o.style(t):o.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:a.style={...o.style,...e.style}),[a,i]}function yZ(e=!0){let[t,n]=(0,pT.useState)(e),r=(0,pT.useRef)(!1),o=(0,pT.useCallback)(e=>{r.current=!0,n(!!e)},[]);return yk(()=>{r.current||n(!1)},[]),[o,t]}function yY(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let yJ=(0,pT.createContext)(null),yQ=null;function yX(e,t="assertive",n=7e3){yQ?yQ.announce(e,t,n):(yQ=new y0,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yQ.announce(e,t,n):setTimeout(()=>{(null==yQ?void 0:yQ.isAttached())&&(null==yQ||yQ.announce(e,t,n))},100))}class y0{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"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 y1=new Set(["id"]),y2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y4=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),y3=new Set(["dir","lang","hidden","inert","translate"]),y6=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),y5=/^(data-.*)$/;function y7(e,t={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(y1.has(t)||n&&y2.has(t)||r&&y4.has(t)||o&&y3.has(t)||i&&(y6.has(t)||t.endsWith("Capture")&&y6.has(t.slice(0,-7)))||a?.has(t)||y5.test(t))&&(s[t]=e[t]);return s}function y9(e){if(function(){if(null==y8){y8=!1;try{document.createElement("div").focus({get preventScroll(){return y8=!0,!0}})}catch{}}return y8}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let y8=null,ge=e=>e?.ownerDocument??document,gt=e=>e&&"window"in e&&e.window===e?e:ge(e).defaultView||window;function gn(e,t){return!!t&&!!e&&e.contains(t)}function gr(e){return e.target}function go(e){if(!e)return!1;let t=e.getRootNode(),n=gt(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let gi="u">typeof Element&&"checkVisibility"in Element.prototype;function ga(e,t){return gi?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=gt(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o="none"!==n&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);o="none"!==n&&"hidden"!==r&&"collapse"!==r}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||ga(e.parentElement,e))}let gs=["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"])',"permission"],gl=gs.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";gs.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let gu=gs.join(':not([hidden]):not([tabindex="-1"]),');function gc(e,t){return e.matches(gl)&&!gp(e)&&(t?.skipVisibilityCheck||ga(e))}function gd(e){return e.matches(gu)&&ga(e)&&!gp(e)}function gp(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function gf(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gh(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function gm(e){let t=(0,pT.useRef)({isFocused:!1,observer:null});return yk(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,pT.useCallback)(n=>{let r=gr(n);(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&(t.current.isFocused=!0,r.addEventListener("focusout",n=>{if(t.current.isFocused=!1,r.disabled){let t=gf(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer?.disconnect();let e=r===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let gy=!1;function gg(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function gb(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function gv(e){let t=null;return()=>(null==t&&(t=e()),t)}let gw=gv(function(){return gb(/^Mac/i)}),g_=gv(function(){return gb(/^iPhone/i)}),gx=gv(function(){return gb(/^iPad/i)||gw()&&navigator.maxTouchPoints>1}),gS=gv(function(){return g_()||gx()});gv(function(){return gw()||gS()});let gE=gv(function(){return gg(/AppleWebKit/i)&&!gD()}),gD=gv(function(){return gg(/Chrome/i)}),gO=gv(function(){return gg(/Android/i)}),gP=gv(function(){return gg(/Firefox/i)});function gk(e){return""===e.pointerType&&!!e.isTrusted||(gO()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function gC(e,t,n=!0){let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:a}=t;gP()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(gw()?r=!0:o=!0);let s=gE()&&gw()&&!gx()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});gC.isOpening=n,y9(e),e.dispatchEvent(s),gC.isOpening=!1}gC.isOpening=!1;let gj=null,gT=new Set,gR=new Map,gM=!1,gN=!1,gA={Tab:!0,Escape:!0};function gI(e,t){for(let n of gT)n(e,t)}function g$(e){gM=!0,gC.isOpening||e.metaKey||!gw()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(gj="keyboard",gI("keyboard",e))}function gL(e){gj="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(gM=!0,gI("pointer",e))}function gF(e){!gC.isOpening&&gk(e)&&(gM=!0,gj="virtual")}function gB(e){let t=gt(gr(e)),n=ge(gr(e));gr(e)!==t&&gr(e)!==n&&!gy&&e.isTrusted&&(gM||gN||(gj="virtual",gI("virtual",e)),gM=!1,gN=!1)}function gV(){gy||(gM=!1,gN=!0)}function gU(e){if("u"<typeof window||"u"<typeof document)return;let t=gt(e),n=ge(e);if(gR.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){gM=!0,r.apply(this,arguments)},n.addEventListener("keydown",g$,!0),n.addEventListener("keyup",g$,!0),n.addEventListener("click",gF,!0),t.addEventListener("focus",gB,!0),t.addEventListener("blur",gV,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",gL,!0),n.addEventListener("pointermove",gL,!0),n.addEventListener("pointerup",gL,!0)),t.addEventListener("beforeunload",()=>{gW(e)},{once:!0}),gR.set(t,{focus:r})}let gW=(e,t)=>{let n=gt(e),r=ge(e);t&&r.removeEventListener("DOMContentLoaded",t),gR.has(n)&&(n.HTMLElement.prototype.focus=gR.get(n).focus,r.removeEventListener("keydown",g$,!0),r.removeEventListener("keyup",g$,!0),r.removeEventListener("click",gF,!0),n.removeEventListener("focus",gB,!0),n.removeEventListener("blur",gV,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",gL,!0),r.removeEventListener("pointermove",gL,!0),r.removeEventListener("pointerup",gL,!0)),gR.delete(n))};function gK(){return"pointer"!==gj}"u">typeof document&&("loading"!==(f=ge(void 0)).readyState?gU(void 0):f.addEventListener("DOMContentLoaded",()=>{gU(void 0)}));let gz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),gH=new Map,gq=new Set;function gG(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=gr(n);if(!e(n)||!r)return;let o=gH.get(r);if(o&&(o.delete(n.propertyName),0===o.size&&(r.removeEventListener("transitioncancel",t),gH.delete(r)),0===gH.size)){for(let e of gq)e();gq.clear()}};document.body.addEventListener("transitionrun",n=>{let r=gr(n);if(!e(n)||!r)return;let o=gH.get(r);o||(o=new Set,gH.set(r,o),r.addEventListener("transitioncancel",t,{once:!0})),o.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function gZ(e){requestAnimationFrame(()=>{for(let[e]of gH)"isConnected"in e&&!e.isConnected&&gH.delete(e);0===gH.size?e():gq.add(e)})}function gY(e){if(!e.isConnected)return;let t=ge(e);if("virtual"===gj){let n=((e=document)=>e.activeElement)(t);gZ(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&y9(e)})}else y9(e)}function gJ(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e,i=(0,pT.useCallback)(e=>{if(gr(e)===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),a=gm(i),s=(0,pT.useCallback)(e=>{let t=gr(e),r=ge(t),i=r?((e=document)=>e.activeElement)(r):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(n&&n(e),o&&o(!0),a(e))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function gQ(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}function gX(e,t){yk(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?gG():document.addEventListener("DOMContentLoaded",gG));let g0=pR().createContext(null);function g1(e,t){let{focusProps:n}=gJ(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:gQ(e.onKeyDown),onKeyUp:gQ(e.onKeyUp)}},o=yW(n,r),i=function(e){let t=(0,pT.useContext)(g0)||{};gX(t,e);let{ref:n,...r}=t;return r}(t),a=e.isDisabled?{}:i,s=(0,pT.useRef)(e.autoFocus);(0,pT.useEffect)(()=>{s.current&&t.current&&gY(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:yW({...o,tabIndex:l},a)}}pR().forwardRef(function(e,t){let{children:n,...r}=e,o=yE(t),i={...r,ref:o};return pR().createElement(g0.Provider,{value:i},n)});let g2="default",g4="",g3=new WeakMap;function g6(e){if(gS())"disabled"===g2&&(g2="restoring",setTimeout(()=>{gZ(()=>{if("restoring"===g2){let t=ge(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=g4||""),g4="",g2="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&g3.has(e)){let t=g3.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),g3.delete(e)}}function g5(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let g7=new WeakMap;function g9(e){let t=e??("u">typeof document?document:void 0);if(!t)return g5(t);if(g7.has(t))return g7.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof gt(n).HTMLMetaElement&&(n.nonce||n.content)||g5(t)||void 0;return void 0!==r&&g7.set(t,r),r}let g8=pR().createContext({register:()=>{}});g8.displayName="PressResponderContext";let be=pR().useInsertionEffect??yk;function bt(e){let t=(0,pT.useRef)(null);return be(()=>{t.current=e},[e]),(0,pT.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function bn(){let e=(0,pT.useRef)(new Map),t=(0,pT.useCallback)((t,n,r,o)=>{let i=o?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=(0,pT.useCallback)((t,n,r,o)=>{let i=e.current.get(r)?.fn||r;t.removeEventListener(n,i,o),e.current.delete(r)},[]),r=(0,pT.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,pT.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var br=n(43144);class bo{#e;constructor(e,t,n,r){this.#e=!0;let o=r?.target??n.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),i&&(null!=l&&null!=u?(a=l-i.left,s=u-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=s,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let bi=Symbol("linkClicked"),ba="react-aria-pressable-style",bs="data-react-aria-pressable";function bl(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,pT.useContext)(g8);if(t){let{register:n,ref:r,...o}=t;e=yW(o,e),n()}return gX(t,e.ref),e}(e),[h,m]=(0,pT.useState)(!1),y=(0,pT.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=bn(),v=(0,pT.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,r){let n=new bo("pressstart",t,e);r(n),i=n.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,r,n]),w=(0,pT.useCallback)((e,r,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new bo("pressend",r,e);o(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&i&&!s){let n=new bo("press",r,e);t(n),l&&=n.shouldStopPropagation}return a.isTriggeringEvent=!1,l},[s,o,n,t]),x=bt(w),S=bt((0,pT.useCallback)((e,t)=>{let n=y.current;if(s)return!1;if(i){n.isTriggeringEvent=!0;let r=new bo("pressup",t,e);return i(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,i])),E=(0,pT.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(bd(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||g6(t.target),t.disposables))n();t.disposables=[]}},[d,b,w]),D=bt(E),O=(0,pT.useCallback)(e=>{c&&E(e)},[c,E]),P=(0,pT.useCallback)(e=>{s||a?.(e)},[s,a]),k=(0,pT.useCallback)((e,t)=>{if(!s&&a){let n=new MouseEvent("click",e);gh(n,t),a(gf(n))}},[s,a]),C=(0,pT.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(bc(t.nativeEvent,t.currentTarget)&&gn(t.currentTarget,gr(t))){bp(gr(t),t.key)&&t.preventDefault();let r=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=v(t,"keyboard"));let o=t.currentTarget;g(ge(t.currentTarget),"keyup",yP(t=>{bc(t,o)&&!t.repeat&&gn(o,gr(t))&&e.target&&S(bd(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&gw()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||gn(t.currentTarget,gr(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!gC.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||gk(t.nativeEvent))){let e=v(t,"virtual"),r=S(t,"virtual"),o=x(t,"virtual");P(t),n=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",o=S(bd(t.currentTarget,t),r),i=x(bd(t.currentTarget,t),r,!0);n=o&&i,e.isOverTarget=!1,P(t),D(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&bc(t,e.target)){bp(gr(t),t.key)&&t.preventDefault();let n=gr(t),r=gn(e.target,n);x(bd(e.target,t),"keyboard",r),r&&k(t,e.target),b(),"Enter"!==t.key&&bu(e.target)&&gn(e.target,n)&&!t[bi]&&(t[bi]=!0,gC(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!gn(t.currentTarget,gr(t)))return;if(o=t.nativeEvent,!gO()&&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 i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(gS()){if("default"===g2){let t=ge(e);g4=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}g2="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";g3.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=gr(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(ge(t.currentTarget),"pointerup",n,!1),g(ge(t.currentTarget),"pointercancel",r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(gn(t.currentTarget,gr(t))&&0===t.button){if(u){let n=function(e){for(;e&&!gc(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=gt(e),n=t.document.activeElement;if(!n||n===e)return;gy=!0;let r=!1,o=e=>{(gr(e)===n||r)&&e.stopImmediatePropagation()},i=t=>{(gr(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,y9(n),l()))},a=t=>{(gr(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(gr(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,y9(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),gy=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{gn(t.currentTarget,gr(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(bd(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(bd(e.target,t),e.pointerType,!1),O(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(gn(e.target,gr(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?D(t):(y9(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else D(t);e.isOverTarget=!1}},r=e=>{D(e)};t.onDragStart=e=>{gn(e.currentTarget,gr(e))&&D(e)}}return t},[g,s,u,b,d,O,v,P,k]);return(0,pT.useEffect)(()=>{if(!p)return;let e=ge(p.current);if(!e||!e.head||e.getElementById(ba))return;let t=e.createElement("style");t.id=ba;let n=g9(e);n&&(t.nonce=n),t.textContent=`
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 hS(){h_.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of h_){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${r}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
+ To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rJ(e,()=>hg(t.appName,t.component),function(e,{online:t,offline:n,featureFlag:r}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&n)&&(!r||!!dd(r))&&e(o):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?r4(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let hE={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 hD(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<hE.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>hE.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>hE.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<hE.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<hE.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<hE.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>hE.SMALL_DESKTOP_MAX)}let hO=!1;function hP(){hO||(window.addEventListener("resize",hD),hD(),hO=!0)}var hk=n(31085),hC=n(53373),hj=n.n(hC);function hT({title:e,children:t}){let n="tablet"===f1();return(0,hk.jsxs)("div",{className:hj()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,hk.jsx)("h4",{children:e}),t]})}let hR=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],hN={primaryColor:{_type:tO.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nR.oneOf(hR)]},secondaryColor:{_type:tO.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nR.oneOf(hR)]}},hA={"Brand color #1":{_default:"#005d5d",_type:tO.String},"Brand color #2":{_default:"#004144",_type:tO.String},"Brand color #3":{_default:"#007d79",_type:tO.String},excludePatientIdentifierCodeTypes:{uuids:{_type:tO.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:tO.UUID}}},implementationName:{_type:tO.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:tO.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:tO.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:[nR.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:tO.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:tO.String}},diagnosisTags:hN};var hM=n(50324);let hI={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},h$=e=>(0,hk.jsx)(hM.TableBatchActions,{translateWithId:(e,t)=>{let n=hI[e];return n?oG(n,e,t):e},...e}),hL="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",hF="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",hB="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",hV="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",hU=(0,pk.createContext)(null);function hW(){let e=(0,pk.useContext)(hU);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function hK({menuTitle:e,children:t}){let[n,r]=pC().useState(!1),o=f5(()=>r(!1),n),i="tablet"===f1(),a=(0,pk.useCallback)(()=>r(e=>!e),[]),s=(0,pk.useRef)(null),l=(0,pk.useRef)(null),u=(0,pk.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,pk.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,pk.useMemo)(()=>({closeMenu:p}),[p]),h=(0,pk.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),p())},[p,n]),m=pk.Children.toArray(t);(0,pk.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let y=(0,pk.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(n).indexOf(r);if(-1===o)return void n[t>0?0:n.length-1]?.focus();let i=o+t,a=i<0?n.length-1:i>=n.length?0:i;n[a]?.focus()},[]),g=m.map((e,t)=>(0,pk.isValidElement)(e)?(0,pk.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:y,index:t}):e);return(0,hk.jsxs)("div",{"data-overflow-menu":!0,className:hj()("cds--overflow-menu",hL),ref:o,children:[(0,hk.jsx)("button",{className:hj()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},hV),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,hk.jsxs)("div",{className:hj()("cds--overflow-menu-options","cds--overflow-menu--flip",hF,{[hB]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,hk.jsx)("ul",{className:hj()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,hk.jsx)(hU.Provider,{value:f,children:g})}),(0,hk.jsx)("span",{})]})]})}function hH(e){let t=(0,pk.useContext)(hU);return(0,hk.jsx)(hM.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var hz=n(95571);let hG=["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"],hq=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),hZ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-add",iconProps:e})})),hY=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),hJ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),hQ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),hX=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),h0=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),h1=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),h2=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),h4=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),h3=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),h6=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),h5=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),h7=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),h9=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),h8=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),me=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),mt=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),mn=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),mr=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),mo=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),mi=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),ma=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-close",iconProps:e})})),ms=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),ml=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),mu=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-document",iconProps:e})})),mc=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),md=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-download",iconProps:e})})),mp=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),mf=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),mh=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),mm=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-events",iconProps:e})})),my=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),mg=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),mb=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),mv=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),mw=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),m_=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-group",iconProps:e})})),mx=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),mS=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),mE=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),mD=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-information",iconProps:e})})),mO=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),mP=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),mk=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),mC=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),mj=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),mT=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-location",iconProps:e})})),mR=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),mN=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),mA=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),mM=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),mI=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),m$=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),mL=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-money",iconProps:e})})),mF=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),mB=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),mV=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),mU=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),mW=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-password",iconProps:e})})),mK=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),mH=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),mz=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),mG=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),mq=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),mZ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),mY=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),mJ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-report",iconProps:e})})),mQ=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),mX=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-save",iconProps:e})})),m0=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-search",iconProps:e})})),m1=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),m2=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),m4=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),m3=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),m6=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),m5=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),m7=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),m9=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-table",iconProps:e})})),m8=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-time",iconProps:e})})),ye=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),yt=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),yn=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),yr=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),yo=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),yi=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),ya=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),ys=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),yl=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-user",iconProps:e})})),yu=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),yc=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-view",iconProps:e})})),yd=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(yb,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),yp=yd,yf=mc,yh=mj,ym=mE,yy=m3,yg=(0,pk.memo)((0,pk.forwardRef)(function({icon:e,fallback:t,...n},r){let o=(0,pk.useRef)(e?document.getElementById(e):void 0);return(0,pk.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,hk.jsx)(fg,{value:o.current,fallback:t,children:(0,hk.jsx)(yb,{ref:r,icon:e,iconProps:n})})})),yb=(0,pk.memo)((0,pk.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,pk.useRef)(null);return(0,pk.useImperativeHandle)(n,()=>a.current),(0,pk.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,hk.jsx)("svg",{ref:a,className:hj()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:i,width:i,viewBox:"0 0 16 16",children:(0,hk.jsx)("use",{href:`#${e}`})})})),yv=({path:e,title:t,basePath:n,icon:r})=>{let{t:o}=(0,p7.useTranslation)(),i=(0,hz.useLocation)(),a=(0,pk.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[i.pathname,e]);return(0,hk.jsx)("div",{children:(0,hk.jsx)(pT,{className:hj()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${n}/${encodeURIComponent(e)}`,children:(0,hk.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,hk.jsx)(yg,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,hk.jsx)("span",{children:o(t)})]})})},e)};function yw(e){return function({basePath:t}){return(0,hk.jsx)(hz.BrowserRouter,{children:(0,hk.jsx)(yv,{basePath:t,...e})})}}function y_(e){let t=(0,pk.useRef)(null),n=(0,pk.useRef)(void 0),r=(0,pk.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,pk.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function yx(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=yS(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():yS(e[n],null)})}}}function yS(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yE(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let yD="u">typeof document?pC().useLayoutEffect:()=>{},yO={prefix:String(Math.round(1e10*Math.random())),current:0},yP=pC().createContext(yO),yk=pC().createContext(!1),yC=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),yj="function"==typeof pC().useId?function(e){let t=pC().useId(),[n]=(0,pk.useState)(yA()),r=n?"react-aria":`react-aria${yO.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,pk.useContext)(yP),n=function(e=!1){let t=(0,pk.useContext)(yP),n=(0,pk.useRef)(null);if(null===n.current&&!e){let e=pC().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=yC.get(e);null==n?yC.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,yC.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function yT(){return!1}function yR(){return!0}function yN(e){return()=>{}}function yA(){return"function"==typeof pC().useSyncExternalStore?pC().useSyncExternalStore(yN,yT,yR):(0,pk.useContext)(yk)}let yM=!!("u">typeof window&&window.document&&window.document.createElement),yI=new Map;function y$(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(null),o=yj(t),i=(0,pk.useRef)(null);if(l&&l.register(i,o),yM){let e=yI.get(o);e&&!e.includes(r)?e.push(r):yI.set(o,[r])}return yD(()=>()=>{l&&l.unregister(i),yI.delete(o)},[o]),(0,pk.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),o}function yL(e=[]){let t=y$(),[n,r]=function(e){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(t),o=(0,pk.useRef)(null),i=(0,pk.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}r.current===e.value?i.current():n(e.value)});return yD(()=>{r.current=t,o.current&&i.current()}),[t,(0,pk.useCallback)(e=>{o.current=e(r.current),i.current()},[i])]}(t),o=(0,pk.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return yD(o,[t,o,...e]),n}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{yI.delete(e)}));let yF=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r};function yB(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],o=r[e];"function"==typeof n&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=yE(n,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof o?t[e]=yF(n,o):"id"===e&&n&&o?t.id=function(e,t){if(e===t)return e;let n=yI.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=yI.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,o):"ref"===e&&n&&o?t.ref=yx(n,o):t[e]=void 0!==o?o:n}}return t}let yV=Symbol("default");function yU({values:e,children:t}){for(let[n,r]of e)t=pC().createElement(n.Provider,{value:r},t);return t}function yW(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,pk.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,u="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,n,r,o,i,a,s])}function yK(e,t){let n=(0,pk.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||yV;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function yH(e,t,n){let{ref:r,...o}=yK(n,e.slot)||{},i=y_((0,pk.useMemo)(()=>yx(t,r),[t,r])),a=yB(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let n="function"==typeof o.style?o.style(t):o.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:a.style={...o.style,...e.style}),[a,i]}function yz(e=!0){let[t,n]=(0,pk.useState)(e),r=(0,pk.useRef)(!1),o=(0,pk.useCallback)(e=>{r.current=!0,n(!!e)},[]);return yD(()=>{r.current||n(!1)},[]),[o,t]}function yG(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let yq=(0,pk.createContext)(null),yZ=null;function yY(e,t="assertive",n=7e3){yZ?yZ.announce(e,t,n):(yZ=new yJ,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yZ.announce(e,t,n):setTimeout(()=>{(null==yZ?void 0:yZ.isAttached())&&(null==yZ||yZ.announce(e,t,n))},100))}class yJ{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"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 yQ=new Set(["id"]),yX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y0=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),y1=new Set(["dir","lang","hidden","inert","translate"]),y2=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),y4=/^(data-.*)$/;function y3(e,t={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yQ.has(t)||n&&yX.has(t)||r&&y0.has(t)||o&&y1.has(t)||i&&(y2.has(t)||t.endsWith("Capture")&&y2.has(t.slice(0,-7)))||a?.has(t)||y4.test(t))&&(s[t]=e[t]);return s}function y6(e){if(function(){if(null==y5){y5=!1;try{document.createElement("div").focus({get preventScroll(){return y5=!0,!0}})}catch{}}return y5}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let y5=null,y7=e=>e?.ownerDocument??document,y9=e=>e&&"window"in e&&e.window===e?e:y7(e).defaultView||window;function y8(e,t){return!!t&&!!e&&e.contains(t)}function ge(e){return e.target}function gt(e){if(!e)return!1;let t=e.getRootNode(),n=y9(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let gn="u">typeof Element&&"checkVisibility"in Element.prototype;function gr(e,t){return gn?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=y9(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o="none"!==n&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);o="none"!==n&&"hidden"!==r&&"collapse"!==r}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||gr(e.parentElement,e))}let go=["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"])',"permission"],gi=go.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";go.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let ga=go.join(':not([hidden]):not([tabindex="-1"]),');function gs(e,t){return e.matches(gi)&&!gu(e)&&(t?.skipVisibilityCheck||gr(e))}function gl(e){return e.matches(ga)&&gr(e)&&!gu(e)}function gu(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function gc(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gd(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function gp(e){let t=(0,pk.useRef)({isFocused:!1,observer:null});return yD(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,pk.useCallback)(n=>{let r=ge(n);(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&(t.current.isFocused=!0,r.addEventListener("focusout",n=>{if(t.current.isFocused=!1,r.disabled){let t=gc(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer?.disconnect();let e=r===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let gf=!1;function gh(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function gm(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function gy(e){let t=null;return()=>(null==t&&(t=e()),t)}let gg=gy(function(){return gm(/^Mac/i)}),gb=gy(function(){return gm(/^iPhone/i)}),gv=gy(function(){return gm(/^iPad/i)||gg()&&navigator.maxTouchPoints>1}),gw=gy(function(){return gb()||gv()});gy(function(){return gg()||gw()});let g_=gy(function(){return gh(/AppleWebKit/i)&&!gx()}),gx=gy(function(){return gh(/Chrome/i)}),gS=gy(function(){return gh(/Android/i)}),gE=gy(function(){return gh(/Firefox/i)});function gD(e){return""===e.pointerType&&!!e.isTrusted||(gS()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function gO(e,t,n=!0){let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:a}=t;gE()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(gg()?r=!0:o=!0);let s=g_()&&gg()&&!gv()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});gO.isOpening=n,y6(e),e.dispatchEvent(s),gO.isOpening=!1}gO.isOpening=!1;let gP=null,gk=new Set,gC=new Map,gj=!1,gT=!1,gR={Tab:!0,Escape:!0};function gN(e,t){for(let n of gk)n(e,t)}function gA(e){gj=!0,gO.isOpening||e.metaKey||!gg()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(gP="keyboard",gN("keyboard",e))}function gM(e){gP="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(gj=!0,gN("pointer",e))}function gI(e){!gO.isOpening&&gD(e)&&(gj=!0,gP="virtual")}function g$(e){let t=y9(ge(e)),n=y7(ge(e));ge(e)!==t&&ge(e)!==n&&!gf&&e.isTrusted&&(gj||gT||(gP="virtual",gN("virtual",e)),gj=!1,gT=!1)}function gL(){gf||(gj=!1,gT=!0)}function gF(e){if("u"<typeof window||"u"<typeof document)return;let t=y9(e),n=y7(e);if(gC.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){gj=!0,r.apply(this,arguments)},n.addEventListener("keydown",gA,!0),n.addEventListener("keyup",gA,!0),n.addEventListener("click",gI,!0),t.addEventListener("focus",g$,!0),t.addEventListener("blur",gL,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",gM,!0),n.addEventListener("pointermove",gM,!0),n.addEventListener("pointerup",gM,!0)),t.addEventListener("beforeunload",()=>{gB(e)},{once:!0}),gC.set(t,{focus:r})}let gB=(e,t)=>{let n=y9(e),r=y7(e);t&&r.removeEventListener("DOMContentLoaded",t),gC.has(n)&&(n.HTMLElement.prototype.focus=gC.get(n).focus,r.removeEventListener("keydown",gA,!0),r.removeEventListener("keyup",gA,!0),r.removeEventListener("click",gI,!0),n.removeEventListener("focus",g$,!0),n.removeEventListener("blur",gL,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",gM,!0),r.removeEventListener("pointermove",gM,!0),r.removeEventListener("pointerup",gM,!0)),gC.delete(n))};function gV(){return"pointer"!==gP}"u">typeof document&&("loading"!==(f=y7(void 0)).readyState?gF(void 0):f.addEventListener("DOMContentLoaded",()=>{gF(void 0)}));let gU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),gW=new Map,gK=new Set;function gH(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=ge(n);if(!e(n)||!r)return;let o=gW.get(r);if(o&&(o.delete(n.propertyName),0===o.size&&(r.removeEventListener("transitioncancel",t),gW.delete(r)),0===gW.size)){for(let e of gK)e();gK.clear()}};document.body.addEventListener("transitionrun",n=>{let r=ge(n);if(!e(n)||!r)return;let o=gW.get(r);o||(o=new Set,gW.set(r,o),r.addEventListener("transitioncancel",t,{once:!0})),o.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function gz(e){requestAnimationFrame(()=>{for(let[e]of gW)"isConnected"in e&&!e.isConnected&&gW.delete(e);0===gW.size?e():gK.add(e)})}function gG(e){if(!e.isConnected)return;let t=y7(e);if("virtual"===gP){let n=((e=document)=>e.activeElement)(t);gz(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&y6(e)})}else y6(e)}function gq(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e,i=(0,pk.useCallback)(e=>{if(ge(e)===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),a=gp(i),s=(0,pk.useCallback)(e=>{let t=ge(e),r=y7(t),i=r?((e=document)=>e.activeElement)(r):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(n&&n(e),o&&o(!0),a(e))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function gZ(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}function gY(e,t){yD(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?gH():document.addEventListener("DOMContentLoaded",gH));let gJ=pC().createContext(null);function gQ(e,t){let{focusProps:n}=gq(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:gZ(e.onKeyDown),onKeyUp:gZ(e.onKeyUp)}},o=yB(n,r),i=function(e){let t=(0,pk.useContext)(gJ)||{};gY(t,e);let{ref:n,...r}=t;return r}(t),a=e.isDisabled?{}:i,s=(0,pk.useRef)(e.autoFocus);(0,pk.useEffect)(()=>{s.current&&t.current&&gG(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:yB({...o,tabIndex:l},a)}}pC().forwardRef(function(e,t){let{children:n,...r}=e,o=y_(t),i={...r,ref:o};return pC().createElement(gJ.Provider,{value:i},n)});let gX="default",g0="",g1=new WeakMap;function g2(e){if(gw())"disabled"===gX&&(gX="restoring",setTimeout(()=>{gz(()=>{if("restoring"===gX){let t=y7(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=g0||""),g0="",gX="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&g1.has(e)){let t=g1.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),g1.delete(e)}}function g4(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let g3=new WeakMap;function g6(e){let t=e??("u">typeof document?document:void 0);if(!t)return g4(t);if(g3.has(t))return g3.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof y9(n).HTMLMetaElement&&(n.nonce||n.content)||g4(t)||void 0;return void 0!==r&&g3.set(t,r),r}let g5=pC().createContext({register:()=>{}});g5.displayName="PressResponderContext";let g7=pC().useInsertionEffect??yD;function g9(e){let t=(0,pk.useRef)(null);return g7(()=>{t.current=e},[e]),(0,pk.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function g8(){let e=(0,pk.useRef)(new Map),t=(0,pk.useCallback)((t,n,r,o)=>{let i=o?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=(0,pk.useCallback)((t,n,r,o)=>{let i=e.current.get(r)?.fn||r;t.removeEventListener(n,i,o),e.current.delete(r)},[]),r=(0,pk.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,pk.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var be=n(43144);class bt{#e;constructor(e,t,n,r){this.#e=!0;let o=r?.target??n.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),i&&(null!=l&&null!=u?(a=l-i.left,s=u-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=s,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let bn=Symbol("linkClicked"),br="react-aria-pressable-style",bo="data-react-aria-pressable";function bi(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,pk.useContext)(g5);if(t){let{register:n,ref:r,...o}=t;e=yB(o,e),n()}return gY(t,e.ref),e}(e),[h,m]=(0,pk.useState)(!1),y=(0,pk.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=g8(),v=(0,pk.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,r){let n=new bt("pressstart",t,e);r(n),i=n.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,r,n]),w=(0,pk.useCallback)((e,r,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new bt("pressend",r,e);o(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&i&&!s){let n=new bt("press",r,e);t(n),l&&=n.shouldStopPropagation}return a.isTriggeringEvent=!1,l},[s,o,n,t]),x=g9(w),S=g9((0,pk.useCallback)((e,t)=>{let n=y.current;if(s)return!1;if(i){n.isTriggeringEvent=!0;let r=new bt("pressup",t,e);return i(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,i])),E=(0,pk.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(bl(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||g2(t.target),t.disposables))n();t.disposables=[]}},[d,b,w]),D=g9(E),O=(0,pk.useCallback)(e=>{c&&E(e)},[c,E]),P=(0,pk.useCallback)(e=>{s||a?.(e)},[s,a]),k=(0,pk.useCallback)((e,t)=>{if(!s&&a){let n=new MouseEvent("click",e);gd(n,t),a(gc(n))}},[s,a]),C=(0,pk.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(bs(t.nativeEvent,t.currentTarget)&&y8(t.currentTarget,ge(t))){bu(ge(t),t.key)&&t.preventDefault();let r=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=v(t,"keyboard"));let o=t.currentTarget;g(y7(t.currentTarget),"keyup",yE(t=>{bs(t,o)&&!t.repeat&&y8(o,ge(t))&&e.target&&S(bl(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&gg()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||y8(t.currentTarget,ge(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!gO.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||gD(t.nativeEvent))){let e=v(t,"virtual"),r=S(t,"virtual"),o=x(t,"virtual");P(t),n=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",o=S(bl(t.currentTarget,t),r),i=x(bl(t.currentTarget,t),r,!0);n=o&&i,e.isOverTarget=!1,P(t),D(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&bs(t,e.target)){bu(ge(t),t.key)&&t.preventDefault();let n=ge(t),r=y8(e.target,n);x(bl(e.target,t),"keyboard",r),r&&k(t,e.target),b(),"Enter"!==t.key&&ba(e.target)&&y8(e.target,n)&&!t[bn]&&(t[bn]=!0,gO(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!y8(t.currentTarget,ge(t)))return;if(o=t.nativeEvent,!gS()&&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 i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(gw()){if("default"===gX){let t=y7(e);g0=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}gX="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";g1.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=ge(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(y7(t.currentTarget),"pointerup",n,!1),g(y7(t.currentTarget),"pointercancel",r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(y8(t.currentTarget,ge(t))&&0===t.button){if(u){let n=function(e){for(;e&&!gs(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=y9(e),n=t.document.activeElement;if(!n||n===e)return;gf=!0;let r=!1,o=e=>{(ge(e)===n||r)&&e.stopImmediatePropagation()},i=t=>{(ge(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,y6(n),l()))},a=t=>{(ge(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(ge(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,y6(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),gf=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{y8(t.currentTarget,ge(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(bl(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(bl(e.target,t),e.pointerType,!1),O(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(y8(e.target,ge(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?D(t):(y6(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else D(t);e.isOverTarget=!1}},r=e=>{D(e)};t.onDragStart=e=>{y8(e.currentTarget,ge(e))&&D(e)}}return t},[g,s,u,b,d,O,v,P,k]);return(0,pk.useEffect)(()=>{if(!p)return;let e=y7(p.current);if(!e||!e.head||e.getElementById(br))return;let t=e.createElement("style");t.id=br;let n=g6(e);n&&(t.nonce=n),t.textContent=`
33
33
  @layer {
34
- [${bs}] {
34
+ [${bo}] {
35
35
  touch-action: pan-x pan-y pinch-zoom;
36
36
  }
37
37
  }
38
- `.trim(),e.head.prepend(t)},[p]),(0,pT.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||g6(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:yW(f,C,{[bs]:!0})}}function bu(e){return"A"===e.tagName&&e.hasAttribute("href")}function bc(e,t){let{key:n,code:r}=e,o=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof gt(t).HTMLInputElement&&!bh(t,n)||t instanceof gt(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&bu(t))&&"Enter"!==n)}function bd(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function bp(e,t){return e instanceof HTMLInputElement?!bh(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!bu(e))}let bf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bh(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:bf.has(e.type)}function bm(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=(0,pT.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=bn(),l=(0,pT.useCallback)(e=>{gn(e.currentTarget,gr(e))&&i.current.isFocusWithin&&!gn(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),u=gm(l),c=(0,pT.useCallback)(e=>{if(!gn(e.currentTarget,gr(e)))return;let t=gr(e),n=ge(t),s=((e=document)=>e.activeElement)(n);if(!i.current.isFocusWithin&&s===t){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(n,"focus",e=>{let r=gr(e);if(i.current.isFocusWithin&&!gn(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});gh(e,t),l(gf(e))}},{capture:!0})}},[r,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function by(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:o}=e,i=(0,pT.useRef)({isFocused:!1,isFocusVisible:n||gK()}),[a,s]=(0,pT.useState)(!1),[l,u]=(0,pT.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,pT.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,pT.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=gK(),s(e),c()},[c]);t={enabled:a,isTextInput:r},gU(),(0,pT.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,n)=>{var r;let o,a,s,l,u,d,p,f;r=!!t?.isTextInput,a=ge(o=n?gr(n):void 0),l=void 0!==(s=gt(o))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,p=void 0!==s?s.KeyboardEvent:KeyboardEvent,f=((e=document)=>e.activeElement)(a),(r=r||f instanceof l&&!gz.has(f.type)||f instanceof u||f instanceof d&&f.isContentEditable)&&"keyboard"===e&&n instanceof p&&!gA[n.key]||(e=>{i.current.isFocusVisible=e,c()})(gK())};return gT.add(e),()=>{gT.delete(e)}},[r,a]);let{focusProps:p}=gJ({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=bm({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?f:p}}let bg=!1,bb=0;function bv(e){"touch"===e.pointerType&&(bg=!0,setTimeout(()=>{bg=!1},500))}function bw(){let e=ge(null);if(void 0!==e)return 0===bb&&"u">typeof PointerEvent&&e.addEventListener("pointerup",bv),bb++,()=>{!(--bb>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",bv)}}function b_(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,a]=(0,pT.useState)(!1),s=(0,pT.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,pT.useEffect)(bw,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=bn(),{hoverProps:c,triggerHoverEnd:d}=(0,pT.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:o,pointerType:t}),n&&n(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=r=>{bg&&"mouse"===r.pointerType||((r,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!gn(r.currentTarget,gr(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(ge(gr(r)),"pointerover",t=>{s.isHovered&&s.target&&!gn(s.target,gr(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),n&&n(!0),a(!0)})(r,r.pointerType)},i.onPointerLeave=t=>{!o&&gn(t.currentTarget,gr(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,n,r,o,s,l,u]);return(0,pT.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 bx=(0,pT.createContext)(!1);function bS(e){let t=(t,n)=>(0,pT.useContext)(bx)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,pT.forwardRef)(t)}let bE=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),bD=(0,pT.createContext)({}),bO=bS(function(e,t){var n;[e,t]=yG(e,t,bD);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:o}=r,{buttonProps:i,isPressed:a}=function(e,t){let n,{elementType:r="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:h,rel:m,type:y="button"}=e;n="button"===r?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?y:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:g,isPressed:b}=bl({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=g1(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=yW(v,g,y7(e,{labelable:!0}));return{isPressed:b,buttonProps:yW(n,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"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=by(e),{hoverProps:c,isHovered:d}=b_({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(r.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=yH({...e,values:p,defaultClassName:"react-aria-Button"}),h=yB(i.id),m=yB(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,pT.useRef)(o);return(0,pT.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?yX(e,"assertive"):g.current&&l&&!o&&yX(e,"assertive"),g.current=o},[o,l,y,h]),pR().createElement("button",{...y7(e,{propNames:bE}),...yW(i,s,c),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["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},pR().createElement(yJ.Provider,{value:{id:m}},f.children))});(0,pT.createContext)(null),(0,pT.createContext)(null),(0,pT.createContext)(null),(0,pT.createContext)(null),(0,pT.createContext)(null);let bP=(0,pT.createContext)({}),bk=(0,pT.createContext)({}),bC=(0,pT.forwardRef)(function(e,t){[e,t]=yG(e,t,bk);let{elementType:n="span",...r}=e;return pR().createElement(n,{className:"react-aria-Text",...r,ref:t})}),bj=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function bR(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return bj.has(t.script)}let t=e.split("-")[0];return bT.has(t)}let bM=Symbol.for("react-aria.i18n.locale");function bN(){let e="u">typeof window&&window[bM]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:bR(e)?"rtl":"ltr"}}let bA=bN(),bI=new Set;function b$(){for(let e of(bA=bN(),bI))e(bA)}function bL(){let e=y$(),[t,n]=(0,pT.useState)(bA);return((0,pT.useEffect)(()=>(0===bI.size&&window.addEventListener("languagechange",b$),bI.add(n),()=>{bI.delete(n),0===bI.size&&window.removeEventListener("languagechange",b$)}),[]),e)?{locale:"u">typeof window&&window[bM]||"en-US",direction:"ltr"}:t}let bF=pR().createContext(null);function bB(e){let{locale:t,children:n}=e,r=pR().useMemo(()=>({locale:t,direction:bR(t)?"rtl":"ltr"}),[t]);return pR().createElement(bF.Provider,{value:r},n)}function bV(e){let{children:t}=e,n=bL();return pR().createElement(bF.Provider,{value:n},t)}function bU(e){let{locale:t,children:n}=e;return t?pR().createElement(bB,{locale:t,children:n}):pR().createElement(bV,{children:n})}function bW(){let e=bL();return(0,pT.useContext)(bF)||e}let bK=null;function bz(e,t="assertive",n=7e3){bK?bK.announce(e,t,n):(bK=new bH,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?bK.announce(e,t,n):setTimeout(()=>{bK?.isAttached()&&bK?.announce(e,t,n)},100))}class bH{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))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(r):this.politeLog?.appendChild(r),""!==e&&setTimeout(()=>{r.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var bq={};function bG(e,t){let n=(0,pT.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}bq={"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 bZ=new Map;class bY{constructor(e,t={}){this.formatter=bQ(e,t),this.options=t}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 n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==b0&&(b0="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),b0&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=bQ(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&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}}let bJ={true:{ja:"h11"},false:{}};function bQ(e,t={}){if("boolean"==typeof t.hour12&&(null==bX&&(bX="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),bX)){let n=bJ[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(bZ.has(n))return bZ.get(n);let r=new Intl.DateTimeFormat(e,t);return bZ.set(n,r),r}let bX=null,b0=null;function b1(e){e=bG(e??{},b2);let{locale:t}=bW();return(0,pT.useMemo)(()=>new bY(t,e),[t,e])}function b2(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}let b4=Symbol.for("react-aria.i18n.locale"),b3=Symbol.for("react-aria.i18n.strings");class b6{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[b4];if(void 0===h){let e=window[b3];if(!e)return null;for(let n in h={},e)h[n]=new b6({[t]:e[n]},t)}let n=h?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}let b5=new Map,b7=new Map;class b9{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+n,i=b5.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:n}),b5.set(o,i)),"function"==typeof(r=t[i.select(e)]||t.other)?r():r}number(e){let t=b7.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),b7.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let b8=new WeakMap;function ve(e,t){let n;return t&&b6.getGlobalDictionaryForPackage(t)||((n=b8.get(e))||(n=new b6(e),b8.set(e,n)),n)}function vt(e,t){let{locale:n}=bW(),r=ve(e,t);return(0,pT.useMemo)(()=>new b9(n,r),[n,r])}function vn(e,t){return e-t*Math.floor(e/t)}function vr(e,t,n,r){let o=(t=vi(e,t))-1,i=-2;return n<=2?i=0:vo(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)}function vo(e){return e%4==0&&(e%100!=0||e%400==0)}function vi(e,t){return"BC"===e?1-t:t}function va(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let vs={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 vl{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=vn(t,146097),o=Math.floor(r/36524),i=vn(r,36524),a=Math.floor(i/1461),s=Math.floor(vn(i,1461)/365),[l,u]=va(400*n+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-vr(l,u,1,1),d=2;e<vr(l,u,3,1)?d=0:vo(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-vr(l,u,p,1)+1;return new vC(l,u,p,f)}toJulianDay(e){return vr(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return vs[vo(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return vo(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}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 vu(e,t){let n=e.copy(),r="hour"in n?vv(n,t):0;vc(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,vd(n),vp(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,vd(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,vd(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let o=n.calendar.getYearsInEra(n);if(n.year>o){let e=n.calendar.isInverseEra?.(n);n.year=o,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let i=n.calendar.getMonthsInYear(n);return n.month>i&&(n.month=i,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vc(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function vd(e){for(;e.month<1;)vc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vc(e,1)}function vp(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 vf(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),vp(e)}function vh(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function vm(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),vf(n),n}function vy(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),vg(n),n}function vg(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 vb(e,t){let n=e%t;return n<0&&(n+=t),n}function vv(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=vb(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=vb(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=vb(e.minute,60),n=Math.floor(e.hour/24),e.hour=vb(e.hour,24),n}function vw(e,t){let n=e.copy();return vv(n,t),n}function v_(e,t,n,r){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=vS(i,n,0,t.length-1,r?.round),o.era=t[i],vf(o);break}case"year":o.calendar.isInverseEra?.(o)&&(n=-n),o.year=vS(e.year,n,-1/0,9999,r?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=vS(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":o.day=vS(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),vf(o),o}function vx(e,t,n,r){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(r?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=vS(t,n,i,a,r?.round);break}case"minute":o.minute=vS(e.minute,n,0,59,r?.round);break;case"second":o.second=vS(e.second,n,0,59,r?.round);break;case"millisecond":o.millisecond=vS(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return o}function vS(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function vE(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?vL(vu(vU(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):vM(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),vW(vB(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function vD(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 vO(e){let t,n=vW(e,new vl);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function vP(e){return`${vO(e)}T${vD(e)}`}function vk(e){let t,n="object"==typeof e[0]?e.shift():new vl;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}class vC{#t;constructor(...e){let[t,n,r,o,i]=vk(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,vf(this)}copy(){return this.era?new vC(this.calendar,this.era,this.year,this.month,this.day):new vC(this.calendar,this.year,this.month,this.day)}add(e){return vu(this,e)}subtract(e){return vu(this,vh(e))}set(e){return vm(this,e)}cycle(e,t,n){return v_(this,e,t,n)}toDate(e){return vF(this,e)}toString(){return vO(this)}compare(e){return vQ(this,e)}}class vj{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,vg(this)}copy(){return new vj(this.hour,this.minute,this.second,this.millisecond)}add(e){return vw(this,e)}subtract(e){return vw(this,vh(e))}set(e){return vy(this,e)}cycle(e,t,n){return vx(this,e,t,n)}toString(){return vD(this)}compare(e){var t,n;return t=this,n=e,vX(t)-vX(n)}}class vT{#t;constructor(...e){let[t,n,r,o,i]=vk(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,vf(this)}copy(){return this.era?new vT(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new vT(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return vu(this,e)}subtract(e){return vu(this,vh(e))}set(e){return vm(vy(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return v_(this,e,t,n);default:return vx(this,e,t,n)}}toDate(e,t){return vF(this,e,t)}toString(){return vP(this)}compare(e){var t,n;let r=vQ(this,e);return 0===r?(t=this,n=vU(e),vX(t)-vX(n)):r}}class vR{#t;constructor(...e){let[t,n,r,o,i]=vk(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,vf(this)}copy(){return this.era?new vR(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new vR(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vE(this,e)}subtract(e){return vE(this,vh(e))}set(e,t){let n,r;return 0===(r=vy(vm(n=vU(this),e),e)).compare(n)?this:vW(vB(vL(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,o=23;if(r?.hourCycle===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let i=vU(e),a=vW(vy(i,{hour:t}),new vl),s=[vL(a,e.timeZone,"earlier"),vL(a,e.timeZone,"later")].filter(t=>vB(t,e.timeZone).day===a.day)[0],l=vW(vy(i,{hour:o}),new vl),u=[vL(l,e.timeZone,"earlier"),vL(l,e.timeZone,"later")].filter(t=>vB(t,e.timeZone).day===l.day).pop(),c=vM(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return vW(vB(c=36e5*vS(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return vx(e,t,n,r);case"era":case"year":case"month":case"day":return vW(vB(vL(v_(vU(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(vM(e)-e.offset)}toString(){var e;let t,n,r,o,i;return`${vP(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof vR){var n,r;return e.timeZone===t?e:(n=e,r=t,vW(vB(vM(n)-n.offset,r),n.calendar))}return vB(vL(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function vM(e){return vN(vi((e=vW(e,new vl)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function vN(e,t,n,r,o,i,a){let s=new Date;return s.setUTCHours(r,o,i,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function vA(e,t){if("UTC"===t)return 0;if(e>0&&t===v1())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:o,hour:i,minute:a,second:s}=v$(e,t);return vN(n,r,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let vI=new Map;function v$(e,t){let n=vI.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),vI.set(t,n));let r=n.formatToParts(new Date(e)),o={};for(let e of r)"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 vL(e,t,n="compatible"){var r,o,i;let a=vU(e);if("UTC"===t)return vM(a);if(t===v1()&&"compatible"===n){a=vW(a,new vl);let e=new Date,t=vi(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=vM(a),l=vA(s-864e5,t),u=vA(s+864e5,t),c=(r=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var n;let o;return n=r,o=v$(e,t),n.year===o.year&&n.month===o.month&&n.day===o.day&&n.hour===o.hour&&n.minute===o.minute&&n.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){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 vF(e,t,n="compatible"){return new Date(vL(e,t,n))}function vB(e,t){let n=vA(e,t),r=new Date(e+n),o=r.getUTCFullYear();return new vR(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function vV(e){return new vC(e.calendar,e.era,e.year,e.month,e.day)}function vU(e,t){let n=0,r=0,o=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:o,millisecond:i}=t),new vT(e.calendar,e.era,e.year,e.month,e.day,n,r,o,i)}function vW(e,t){if(vq(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,vf(r),r}let vK={"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 vz(e,t){return t=vW(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vH(e,t){return vq(e.calendar,t.calendar)&&vz(e,t)}function vq(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let vG={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function vZ(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?vG[n]:function(e){let t=v5.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return v5.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=v6.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&v6.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];t="mon"===n?{firstDay:1}:"tue"===n?{firstDay:2}:"wed"===n?{firstDay:3}:"thu"===n?{firstDay:4}:"fri"===n?{firstDay:5}:"sat"===n?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:n&&vK[n]||0};v5.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function vY(e){return vB(Date.now(),e)}function vJ(e){return vV(vY(e))}function vQ(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function vX(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let v0=null;function v1(){return null==v0&&(v0=new Intl.DateTimeFormat().resolvedOptions().timeZone),v0}function v2(e){return e.subtract({days:e.day-1})}function v4(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function v3(e,t,n){let r=vZ(e,t,n);return e.subtract({days:r})}let v6=new Map,v5=new Map;function v7(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((vZ(v2(e),t,n)+r)/7)}function v9(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function v8(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function we(e){return e&&e.__esModule?e.default:e}let wt=new WeakMap;function wn(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function wr(e,t,n,r){let o=vt(we(bq),"@react-aria/calendar"),i=wn(e)||wn(t),a=b1({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n}),s=b1({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n});return(0,pT.useMemo)(()=>{if(vz(e,v2(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),vz(t,v4(e)))return a.format(i.toDate(n));if(vz(t,v4(t)))return r?wo(a,o,i,s,n):a.formatRange(i.toDate(n),s.toDate(n))}return r?wo(s,o,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,a,s,o,n,r])}function wo(e,t,n,r,o){let i=e.formatRangeToParts(n.toDate(o),r.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function wi(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=yB(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function wa(e,t){let n=(0,pT.useRef)(!0),r=(0,pT.useRef)(null),o=bt(e);(0,pT.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,pT.useEffect)(()=>{let e=r.current;n.current?n.current=!1:(!e||t.some((t,n)=>!Object.is(t,e[n])))&&o(),r.current=t},t)}function ws(e,t){var n;let r,o,i,a,s,l=vt((n=bq)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=y7(e),c=wr(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=wr(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);wa(()=>{t.isFocused||bz(d)},[d]);let p=(i=vt(we(bq),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:o}=t.highlightedRange||{}:r=o=t.value??void 0,a=b1({weekday:"long",month:"long",year:"numeric",day:"numeric",era:wn(r)||wn(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,pT.useMemo)(()=>{if(!s&&r&&o)if(vz(r,o)){let e=a.format(r.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=wo(a,i,r,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[r,o,s,t.timeZone,i,a]));wa(()=>{p&&bz(p,"polite",4e3)},[p]);let f=yV([!!e.errorMessage,e.isInvalid,e.validationState]);wt.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:f,selectedDateDescription:p});let[h,m]=(0,pT.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,pT.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:yW(u,wi({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:f},title:c}}let wl={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 wu(e){let{children:t,elementType:n="div",isFocusable:r,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:n}=e,[r,o]=(0,pT.useState)(!1),{focusWithinProps:i}=bm({isDisabled:!n,onFocusWithinChange:e=>o(e)}),a=(0,pT.useMemo)(()=>r?t:t?{...wl,...t}:wl,[r]);return{visuallyHiddenProps:{...i,style:a}}}(e);return pR().createElement(n,yW(i,a),t)}function wc(e,t,n,r){let o=bt(n),i=null==n;(0,pT.useEffect)(()=>{if(i||!e.current)return;let n=e.current;return n.addEventListener(t,o,r),()=>{n.removeEventListener(t,o,r)}},[e,t,r,i])}function wd(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&"hidden"!==n.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function wp(e,t){let n=e;for(wd(n,t)&&(n=n.parentElement);n&&!wd(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wf(e,t){let n=[],r=document.scrollingElement||document.documentElement;do wd(e,t)&&n.push(e),e=e.parentElement;while(e&&e!==r);return n}function wh(e,t,n={}){let{block:r="nearest",inline:o="nearest"}=n;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,p=e===d?0:l.top,f=e===d?e.clientHeight:l.bottom,h=e===d?0:l.left,m=e===d?e.clientWidth:l.right,y=parseInt(u.scrollMarginTop,10)||0,g=parseInt(u.scrollMarginBottom,10)||0,b=parseInt(u.scrollMarginLeft,10)||0,v=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,S=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,D=parseInt(c.borderTopWidth,10)||0,O=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,C=s.top-y,j=s.bottom+g,T=s.left-b,R=s.right+v,M=e===d?0:P+k,N=e===d?0:D+O,A=e.offsetWidth-e.clientWidth-M,I=e.offsetHeight-e.clientHeight-N,$=p+D+w,L=f-O-x-I,F=h+P+S,B=m-k-E;"rtl"!==c.direction||gS()?B-=A:F+=A;let V=C<$||j>L,U=T<F||R>B;if(V&&"start"===r)i+=C-$;else if(V&&"center"===r)i+=(C+j)/2-($+L)/2;else if(V&&"end"===r)i+=j-L;else if(V&&"nearest"===r){let e=C-$,t=j-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=T-F;else if(U&&"center"===o)a+=(T+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=T-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function wm(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:r}=e.getBoundingClientRect(),o=wf(e,!0);for(let t of o)wh(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(r-a)>1)for(let e of o=n?wf(n,!0):[])wh(e,n,{block:"center",inline:"center"})}else{let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(r-i)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let wy=0,wg=new Map;function wb(e){let[t,n]=(0,pT.useState)();return yk(()=>{if(!e)return;let t=wg.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${wy++}`;n(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},wg.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),wg.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class wv extends vl{fromJulianDay(e){let t=super.fromJulianDay(e);return new vC(this,vi(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(ww(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(ww(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function ww(e){let[t,n]=va(e.year+-543);return new vC(t,n,e.month,e.day)}function w_(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wx(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-w_(e,n,1,1))/30),o=t+1-w_(e,n,r,1);return[n,r,o]}function wS(e){return Math.floor(e%4/3)}function wE(e,t){return t%13!=0?30:wS(e)+5}class wD{fromJulianDay(e){let[t,n,r]=wx(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new vC(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),w_(1723856,t,e.month,e.day)}getDaysInMonth(e){return wE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+wS(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class wO extends wD{fromJulianDay(e){let[t,n,r]=wx(1723856,e);return new vC(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class wP extends wD{fromJulianDay(e){let[t,n,r]=wx(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new vC(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),w_(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),wE(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 wk=765433;function wC(e){return 7>vn(7*e+1,19)}function wj(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>vn(3*(n+1),7)&&(n+=1),n}function wT(e){let t,n;return wj(e)+(t=wj(e-1),n=wj(e),wj(e+1)-n==356?2:+(n-t==382))}function wR(e){return wT(e+1)-wT(e)}function wM(e,t){if(t>=6&&!wC(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=wR(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!wC(e):30}class wN{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/wk*19+234)/235)+1,r=wT(n),o=Math.floor(t-r);for(;o<1;)o=Math.floor(t-(r=wT(--n)));let i=1,a=0;for(;a<o;)a+=wM(n,i),i++;let s=o-(a-=wM(n,--i));return new vC(this,n,i,s)}toJulianDay(e){let t=wT(e.year);for(let n=1;n<e.month;n++)t+=wM(e.year,n);return t+e.day+347997}getDaysInMonth(e){return wM(e.year,e.month)}getMonthsInYear(e){return wC(e.year)?13:12}getDaysInYear(e){return wR(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(wC(t.year)&&!wC(e.year)&&t.month>6?e.month--:!wC(t.year)&&wC(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class wA extends vl{fromJulianDay(e){let t,n,r,o=super.fromJulianDay(e),i=o.year-78,a=e-vr(o.era,o.year,1,1);if(a<80?(i--,a+=(t=vo(o.year-1)?31:30)+155+90+10):(t=vo(o.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new vC(this,i,n,r)}toJulianDay(e){let t,n,[r,o]=va(e.year+78);return(vo(o)?(t=31,n=vr(r,o,3,21)):(t=30,n=vr(r,o,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&vo(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 wI(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function w$(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+wI(t,r,1,1)))/29.5)+1),i=n-wI(t,r,o,1)+1;return new vC(e,r,o,i)}function wL(e){return(14+11*e)%30<11}class wF{fromJulianDay(e){return w$(this,1948440,e)}toJulianDay(e){return wI(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&wL(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return wL(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class wB extends wF{fromJulianDay(e){return w$(this,1948439,e)}toJulianDay(e){return wI(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function wV(e){return 460322+c[e-1300]}function wU(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function wW(e,t){let n=wV(e);for(let r=1;r<t;r++)n+=wU(e,r);return n}function wK(e){return c[e+1-1300]-c[e-1300]}class wz extends wF{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=wU(t,n)}}}fromJulianDay(e){let t=e-1948440,n=wV(1300),r=wV(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-wV(++e)+1;let o=wK(e);if(r===o){n=12;break}if(r<o){let t=wU(e,n);for(n=1;r>t;)r-=t,t=wU(e,++n);break}}return new vC(this,e,n,t-wW(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+wW(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):wU(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):wK(e.year)}}let wH=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],wq=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],wG=[1867,1911,1925,1988,2018],wZ=["meiji","taisho","showa","heisei","reiwa"];function wY(e){let t=wH.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?wH.length-1:0===t?0:t-1}function wJ(e){let t=wG[wZ.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new vC(e.year+t,e.month,e.day)}class wQ extends vl{fromJulianDay(e){let t=super.fromJulianDay(e),n=wY(t);return new vC(this,wZ[n],t.year-wG[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(wJ(e))}balanceDate(e){let t=wJ(e),n=wY(t);wZ[n]!==e.era&&(e.era=wZ[n],e.year=t.year-wG[n]),this.constrainDate(e)}constrainDate(e){let t=wZ.indexOf(e.era),n=wq[t];if(null!=n){let[r,o,i]=n,a=r-wG[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,n,r]=wH[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return wZ}getYearsInEra(e){let t=wZ.indexOf(e.era),n=wH[t],r=wH[t+1];if(null==r)return 9999-n[0]+1;let o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(wJ(e))}getMinimumMonthInYear(e){let t=wX(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=wX(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function wX(e){if(1===e.year)return wH[wZ.indexOf(e.era)]}let w0=[0,31,62,93,124,155,186,216,246,276,306,336];class w1{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),i=r-w0[o]+1;return new vC(this,n,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=w0[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>vn(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function w2(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function w4(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class w3 extends vl{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=w4(vi(t.era,t.year));return new vC(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(w6(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=w4(w2(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(w6(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function w6(e){let[t,n]=va(w2(e));return new vC(t,n,e.month,e.day)}function w5(e){switch(e){case"buddhist":return new wv;case"ethiopic":return new wD;case"ethioaa":return new wO;case"coptic":return new wP;case"hebrew":return new wN;case"indian":return new wA;case"islamic-civil":return new wF;case"islamic-tbla":return new wB;case"islamic-umalqura":return new wz;case"japanese":return new wQ;case"persian":return new w1;case"roc":return new w3;default:return new vl}}function w7(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function w9(e,t,n,r,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=w8(e,t,n).subtract(i);return _t(e,a,t,n,r,o)}function w8(e,t,n,r,o){let i=e;if(t.years)i=v2(e.subtract({months:e.month-1}));else t.months?i=v2(e):t.weeks&&(i=v3(e,n));return _t(e,i,t,n,r,o)}function _e(e,t,n,r,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=w8(e,t,n).subtract(i);return _t(e,a,t,n,r,o)}function _t(e,t,n,r,o,i){if(o&&e.compare(o)>=0){let e=v8(t,w8(vV(o),n,r));e&&(t=e)}if(i&&0>=e.compare(i)){let e=v9(t,_e(vV(i),n,r));e&&(t=e)}return t}function _n(e,t,n){if(t){let n=v8(e,vV(t));n&&(e=n)}if(n){let t=v9(e,vV(n));t&&(e=t)}return e}function _r(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let _o="u">typeof document?pR().useInsertionEffect??pR().useLayoutEffect:()=>{};function _i(e,t,n){let[r,o]=(0,pT.useState)(e||t),i=(0,pT.useRef)(r),a=(0,pT.useRef)(void 0!==e),s=void 0!==e;(0,pT.useEffect)(()=>{a.current,a.current=s},[s]);let l=s?e:r;_o(()=>{i.current=l});let[,u]=(0,pT.useReducer)(()=>({}),{});return[l,(0,pT.useCallback)((e,...t)=>{let r="function"==typeof e?e(i.current):e;Object.is(i.current,r)||(i.current=r,o(r),u(),n?.(r,...t))},[n])]}function _a(e){let t=(0,pT.useMemo)(()=>new bY(e.locale),[e.locale]),n=(0,pT.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,p=(0,pT.useMemo)(()=>o(n.calendar),[o,n.calendar]),[f,h]=_i(e.value,e.defaultValue??null,e.onChange),m=(0,pT.useMemo)(()=>f?vW(vV(f),p):null,[f,p]),y=(0,pT.useMemo)(()=>f&&"timeZone"in f?f.timeZone:n.timeZone,[f,n.timeZone]),[g,b]=_i((0,pT.useMemo)(()=>e.focusedValue?_n(vW(vV(e.focusedValue),p),a,s):void 0,[e.focusedValue,p,a,s]),(0,pT.useMemo)(()=>_n(e.defaultFocusedValue?vW(vV(e.defaultFocusedValue),p):m||vW(vJ(y),p),a,s),[e.defaultFocusedValue,m,y,p,a,s]),e.onFocusChange),[v,w]=(0,pT.useState)(()=>{switch(l){case"start":return w8(g,i,r,a,s);case"end":return _e(g,i,r,a,s);default:return w9(g,i,r,a,s)}}),[x,S]=(0,pT.useState)(e.autoFocus||!1),E=(0,pT.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[D,O]=(0,pT.useState)(p);if(!vq(p,D)){let e=vW(g,p);w(w9(e,i,r,a,s)),b(e),O(p)}function P(e){b(e=_n(e,a,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=_r(e=_n(e,a,s),v,u))&&(e=vW(e,f?.calendar||new vl),f&&"hour"in f?h(f.set(e)):h(e))}}w7(g,a,s)?b(_n(g,a,s)):0>g.compare(v)?w(_e(g,i,r,a,s)):g.compare(E)>0&&w(w8(g,i,r,a,s));let C=(0,pT.useMemo)(()=>!!m&&(!!(u&&u(m))||w7(m,a,s)),[m,u,a,s]),j=e.isInvalid||"invalid"===e.validationState||C,T=(0,pT.useMemo)(()=>"visible"===c?i:_s(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:k,visibleRange:{start:v,end:E},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:j?"invalid":null,isValueInvalid:j,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(T);b(_n(g.add(T),a,s)),w(w8(_t(g,e,T,r,a,s),T,r))},focusPreviousPage(){let e=v.subtract(T);b(_n(g.subtract(T),a,s)),w(w8(_t(g,e,T,r,a,s),T,r))},focusSectionStart(){i.days?P(v):i.weeks?P(v3(g,r)):(i.months||i.years)&&P(v2(g))},focusSectionEnd(){i.days?P(E):i.weeks?P(v3(g,r,void 0).add({days:6})):(i.months||i.years)&&P(v4(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(_s(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(_s(i)))},selectFocusedDate(){u&&u(g)||k(g)},selectDate(e){k(e)},isFocused:x,setFocused:S,isInvalid:e=>w7(e,a,s),isSelected(e){return null!=m&&vz(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&vz(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return vz(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return vz(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=v){let n=t.add({weeks:e}),o=[],i=vZ(n=v3(n,r,d),r,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(n);let e=n.add({days:1});if(vz(n,e))break;n=e}for(;o.length<7;)o.push(null);return o}}}function _s(e){let t={...e};for(let n in e)t[n]=1;return t}function _l(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:vV(e),end:vV(t)}):null}function _u(e,t){return(e=vW(e,t?.calendar||new vl),t&&"hour"in t)?t.set(e):e}function _c(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let _d=(0,pT.createContext)(null),_p=(0,pT.createContext)(null),_f=(0,pT.createContext)(null),_h=(0,pT.createContext)(null),_m=(0,pT.forwardRef)(function(e,t){[e,t]=yG(e,t,_d);let{locale:n}=bW(),r=_a({...e,locale:n,createCalendar:w5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=ws(e,r),u=yH({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return pR().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},pR().createElement(yz,{values:[[bD,{slots:{previous:i,next:a}}],[bP,{"aria-hidden":!0,level:2,children:l}],[_f,r],[_d,e],[bk,{slots:{errorMessage:s}}]]},pR().createElement(wu,null,pR().createElement("h2",null,o["aria-label"])),u.children,pR().createElement(wu,null,pR().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),_y=(0,pT.forwardRef)(function(e,t){[e,t]=yG(e,t,_p);let{locale:n}=bW(),r=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=_i(t,n||null,r),[p,f]=(0,pT.useState)(null),h="center";if(c&&c.start&&c.end){let e=w9(vV(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,pT.useRef)(null),[y,g]=(0,pT.useState)(null),b=(0,pT.useMemo)(()=>v8(s,y?.start),[s,y]),v=(0,pT.useMemo)(()=>v9(l,y?.end),[l,y]),w=_a({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:_c(t,w,-1),end:_c(t,w,1)},g(m.current)):(m.current=null,g(null))},[S,E]=(0,pT.useState)(w.visibleRange);vH(w.visibleRange.start,S.start)&&vH(w.visibleRange.end,S.end)||(x(p),E(w.visibleRange));let D=e=>{e?(f(e),x(e)):(f(null),x(null))},O=p?_l(p,w.focusedDate):c&&_l(c.start,c.end),P=t=>{if(e.isReadOnly)return;let n=_r(_n(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(n)if(p){let e=_l(p,n);e&&d({start:_u(e.start,c?.start),end:_u(e.end,c?.end)}),D(null)}else D(n)},[k,C]=(0,pT.useState)(!1),{isDateUnavailable:j}=e,T=(0,pT.useMemo)(()=>!!c&&!p&&(!!(j&&(j(c.start)||j(c.end)))||w7(c.start,s,l)||w7(c.end,s,l)),[j,c,p,s,l]),R=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||w7(e,m.current?.start,m.current?.end),isDragging:k,setDragging:C,clearSelection(){D(null),d(null)}}}({...e,locale:n,createCalendar:w5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...o}=e,i=ws(o,t),a=(0,pT.useRef)(!1),s=(0,pT.useRef)("u">typeof window?window:null);wc(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return wc(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;n.current&&go(n.current)&&(!gn(n.current,o)||!o.closest('button, [role="button"]'))&&l[r]()}),i.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&gn(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},wc(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,r,t),u=yH({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return pR().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},pR().createElement(yz,{values:[[bD,{slots:{previous:i,next:a}}],[bP,{"aria-hidden":!0,level:2,children:l}],[_h,r],[_p,e],[bk,{slots:{errorMessage:s}}]]},pR().createElement(wu,null,pR().createElement("h2",null,o["aria-label"])),u.children,pR().createElement(wu,null,pR().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),_g=(0,pT.createContext)(null),_b=(0,pT.forwardRef)(function(e,t){var n,r;let o=(0,pT.useContext)(_f),i=(0,pT.useContext)(_h),a=yq(_d),s=yq(_p),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(n=null==a?void 0:a.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=bW(),a=wr(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=wt.get(t),u=wi({"aria-label":[s,a].filter(Boolean).join(", "),"aria-labelledby":l}),c=b1({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=bW(),p=(0,pT.useMemo)(()=>{let e=v3(vJ(t.timeZone),d,o);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return c.format(r)})},[d,t.timeZone,c,o]),f=v7(n,d,o);return{gridProps:yW(u,{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:p,weeksInMonth:f}}({startDate:u,endDate:v4(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return pR().createElement(_g.Provider,{value:{headerProps:p,weekDays:f,startDate:u,firstDayOfWeek:c}},pR().createElement("table",{...y7(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:pR().createElement(pR().Fragment,null,pR().createElement(_v,null,e=>pR().createElement(_w,null,e)),pR().createElement(__,null,e.children))))}),_v=(0,pT.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,{headerProps:i,weekDays:a}=(0,pT.useContext)(_g);return pR().createElement("thead",{...y7(e),...i,ref:t,style:r,className:o||"react-aria-CalendarGridHeader"},pR().createElement("tr",null,a.map((e,t)=>pR().cloneElement(n(e),{key:t}))))}),_w=(0,pT.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e;return pR().createElement("th",{...y7(e),ref:t,style:r,className:o||"react-aria-CalendarHeaderCell"},n)}),__=(0,pT.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,i=(0,pT.useContext)(_f),a=(0,pT.useContext)(_h),s=null!=i?i:a,{startDate:l,firstDayOfWeek:u}=(0,pT.useContext)(_g),{locale:c}=bW(),d=v7(l,c,u);return pR().createElement("tbody",{...y7(e),ref:t,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>pR().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?pR().cloneElement(n(e),{key:t}):pR().createElement("td",{key:t})))))}),_x=(0,pT.forwardRef)(function({date:e,...t},n){var r,o,i;let a=(0,pT.useContext)(_f),s=(0,pT.useContext)(_h),l=null!=a?a:s,{startDate:u}=null!=(r=(0,pT.useContext)(_g))?r:{startDate:l.visibleRange.start},c=(0,pT.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,n){var r;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=wt.get(t),u=vt((r=bq)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=b1({weekday:"long",day:"numeric",month:"long",year:"numeric",era:wn(i),timeZone:t.timeZone}),d=t.isSelected(i),p=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&vz(t.value,i));m&&(d=!0),i=bG(i,vH);let y=(0,pT.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=vz(i,vJ(t.timeZone)),b=(0,pT.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(vz(i,t.value.start)||vz(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&vz(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&vz(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&p&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=wb(v),x=(0,pT.useRef)(!1),S=(0,pT.useRef)(!1),E=(0,pT.useRef)(void 0),{pressProps:D,isPressed:O}=bl({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(vz(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}else if(vz(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}}let n=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(n,200):n()}},onPressEnd(){S.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(S.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=vz(i,t.focusedDate)?0:-1),(0,pT.useEffect)(()=>{p&&n.current&&(y9(n.current),"pointer"!==gj&&((e=document)=>e.activeElement)()===n.current&&wm(n.current,{containingElement:wp(n.current)}))},[p,n]);let P=b1({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,pT.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:yW(D,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=gr(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:p,isSelected:d,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},l,c),{hoverProps:h,isHovered:m}=b_({...t,isDisabled:f.isDisabled}),{focusProps:y,isFocusVisible:g}=by();g&&(g=f.isFocused);let b=(o=u,i=vW(i=e,o.calendar),o=v2(o),i=v2(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=vz(e,l.highlightedRange.start),w=vz(e,l.highlightedRange.end));let x=yH({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...f}}),S={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return pR().createElement("td",{...d,ref:n},pR().createElement("div",{...yW(y7(t),p,y,h,S,x),ref:c}))}),_S=(0,pT.createContext)({}),_E=(0,pT.forwardRef)(function(e,t){var n,r;[e,t]=yG(e,t,_S);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=b_({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:h}=by({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=yH({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return pR().createElement("div",{...yW(u,h,c),...m,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r: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":i||void 0},m.children)}),_D=(0,pT.createContext)({}),_O=bS(function(e,t){[e,t]=yG(e,t,_D);let{hoverProps:n,isHovered:r}=b_(e),{isFocused:o,isFocusVisible:i,focusProps:a}=by({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=yH({...e,values:{isHovered:r,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return pR().createElement("input",{...yW((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...o}=e;return o})(e),a,n),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function _P(e,t,n,r){return e.createTreeWalker(t,n,r)}let _k=pR().createContext(null),_C="react-aria-focus-scope-restore",_j=null;function _T(e){var t,n,r,o,i,a,s,l,u,c;let d,p,f,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,pT.useRef)(null),w=(0,pT.useRef)(null),x=(0,pT.useRef)([]),{parentNode:S}=(0,pT.useContext)(_k)||{},E=(0,pT.useMemo)(()=>new _H({scopeRef:x}),[x]);yk(()=>{let e=S||_q.root;if(_q.getTreeNode(e.scopeRef)&&_j&&!_I(_j,e.scopeRef)){let t=_q.getTreeNode(_j);t&&(e=t)}e.addChild(E),_q.addNode(E)},[E,S]),yk(()=>{let e=_q.getTreeNode(x);e&&(e.contain=!!y)},[y]),yk(()=>{let e=v.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(_C,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(_C,n)}},[m]),yk(()=>{if(n||r)return;let e=t.current,o=ge(e?e[0]:void 0),i=e=>{let n=gr(e);_N(n,t.current)?_j=t:_A(n)||(_j=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,n=g,r=y]),o=x,i=y,d=(0,pT.useRef)(void 0),p=(0,pT.useRef)(void 0),yk(()=>{let e=o.current;if(!i){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=ge(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!_M(o)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=o.current;if(!r||!_N(n,r))return;let i=_U(_R(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(_$(a,!0),a instanceof gt(a).HTMLInputElement&&a.select())},r=e=>{(!_j||_I(_j,o))&&_N(gr(e),o.current)?(_j=o,d.current=gr(e)):_M(o)&&!_A(gr(e),o)?d.current?d.current.focus():_j&&_j.current&&_F(_j.current):_M(o)&&(d.current=gr(e))},a=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let n=gj,r=("virtual"===n||null===n)&&gO()&&gD(),i=((e=document)=>e.activeElement)(t);if(!r&&i&&_M(o)&&!_A(i,o)){_j=o;let t=gr(e);t&&t.isConnected?(d.current=t,d.current?.focus()):_j.current&&_F(_j.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),yk(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),a=x,s=g,l=y,f=(0,pT.useRef)("u">typeof document?((e=document)=>e.activeElement)(ge(a.current?a.current[0]:void 0)):null),yk(()=>{let e=a.current,t=ge(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!_j||_I(_j,a))&&_N(((e=document)=>e.activeElement)(t),a.current)&&(_j=a)};return t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1))}},[a,l]),yk(()=>{let e=ge(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!_M(a)||t.isComposing)return;let n=e.activeElement;if(!_A(n,a)||!_B(a))return;let r=_q.getTreeNode(a);if(!r)return;let o=r.nodeToRestore,i=_U(e.body,{tabbable:!0});i.currentNode=n;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!_A(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(_A(s,a));(t.preventDefault(),t.stopPropagation(),s)?_$(s,!0):_A(o)?_$(o,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),yk(()=>{let e=ge(a.current?a.current[0]:void 0);if(!s)return;let t=_q.getTreeNode(a);if(t)return t.nodeToRestore=f.current??void 0,()=>{let t=_q.getTreeNode(a);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&_A(r,a)||r===e.body&&_B(a))){let t=_q.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void _V(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&_q.getTreeNode(e.scopeRef))return void _V(_L(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),u=x,c=b,h=pR().useRef(c),(0,pT.useEffect)(()=>{h.current&&(_j=u,!_N(((e=document)=>e.activeElement)(ge(u.current?u.current[0]:void 0)),_j.current)&&u.current&&_F(u.current)),h.current=!1},[u]),(0,pT.useEffect)(()=>{let e=((e=document)=>e.activeElement)(ge(x.current?x.current[0]:void 0)),t=null;if(_N(e,x.current)){for(let n of _q.traverse())n.scopeRef&&_N(e,n.scopeRef.current)&&(t=n);t===_q.getTreeNode(x)&&(_j=t.scopeRef)}},[x]),yk(()=>()=>{let e=_q.getTreeNode(x)?.parent?.scopeRef??null;(x===_j||_I(x,_j))&&(!e||_q.getTreeNode(e))&&(_j=e),_q.removeTreeNode(x)},[x]);let D=(0,pT.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,s=r||((e=document)=>e.activeElement)(ge(n[0]??void 0)),l=n[0].previousElementSibling,u=_U(_R(n),{tabbable:o,accept:a},n);u.currentNode=_N(s,n)?s:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&_$(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,s=r||((e=document)=>e.activeElement)(ge(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=_U(_R(n),{tabbable:o,accept:a},n);u.currentNode=_N(s,n)?s:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&_$(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=_U(_R(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&_$(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=_U(_R(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&_$(a,!0),a}}},[]),O=(0,pT.useMemo)(()=>({focusManager:D,parentNode:E}),[E,D]);return pR().createElement(_k.Provider,{value:O},pR().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,pR().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function _R(e){return e[0].parentElement}function _M(e){let t=_q.getTreeNode(_j);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function _N(e,t){return!!e&&!!t&&t.some(t=>gn(t,e))}function _A(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of _q.traverse(_q.getTreeNode(t)))if(n&&_N(e,n.current))return!0;return!1}function _I(e,t){let n=_q.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function _$(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{gY(e)}catch{}}function _L(e,t=!0){let n=e[0].previousElementSibling,r=_R(e),o=_U(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&((o=_U(r=_R(e),{tabbable:!1},e)).currentNode=n,i=o.nextNode()),i}function _F(e,t=!0){_$(_L(e,t))}function _B(e){let t=_q.getTreeNode(_j);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function _V(e){e.dispatchEvent(new CustomEvent(_C,{bubbles:!0,cancelable:!0}))&&_$(e)}function _U(e,t,n){let r=t?.tabbable?gd:gc,o=ge(e?.nodeType===Node.ELEMENT_NODE?e:null),i=_P(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>gn(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(ge(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=gt(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||_N(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function _W(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(ge(r)),u=_U(r,{tabbable:i,accept:s});gn(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=r,c=u.nextNode()),c&&_$(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(ge(r)),u=_U(r,{tabbable:i,accept:s});if(gn(r,l))u.currentNode=l;else{let e=_K(u);return e&&_$(e,!0),e??null}let c=u.previousNode();if(!c&&a){u.currentNode=r;let e=_K(u);if(!e)return null;c=e}return c&&_$(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=_U(r,{tabbable:o,accept:i}).nextNode();return a&&_$(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=_K(_U(r,{tabbable:o,accept:i}));return a&&_$(a,!0),a??null}}}function _K(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class _z{constructor(){this.fastMap=new Map,this.root=new _H({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let o=new _H({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&_N(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.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(){let e=new _z;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class _H{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let _q=new _z;var _G={};function _Z(e,t,n){let{direction:r}=bW(),o=(0,pT.useMemo)(()=>_W(t),[t]),i=()=>{if(!t.current)return;let e=window.event?gr(window.event):null,n=_U(t.current,{tabbable:!0});if(e&&(n.currentNode=e,e=n.previousNode()),!e){let t;do(t=n.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=n.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=bl({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return yW(a,{onKeyDown:i=>{if(gn(i.currentTarget,gr(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!n))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=gr(i),n=_Y(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=gr(i),n=_Y(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else o.focusNext()}}})}function _Y(e,t,n){let r=_U(e,{tabbable:!0}),o=r.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<a&&(i=o,a=s),o=r.nextNode()}return i}function _J(e){let{description:t,errorMessage:n,isInvalid:r,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=yB(t);let a=yB(),s={};return n&&(r=r?`${a} ${r}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:wi({id:t,"aria-label":o,"aria-labelledby":r})}}(e),s=yV([!!t,!!n,r,o]),l=yV([!!t,!!n,r,o]);return{labelProps:i,fieldProps:a=yW(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function _Q(e,t,n){let r=bt(e=>{n&&!e.defaultPrevented&&n(t)});(0,pT.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",r),()=>{t?.removeEventListener("reset",r)}},[e])}function _X(e,t,n){let{validationBehavior:r,focus:o}=e;yk(()=>{if("native"===r&&n?.current&&!n.current.disabled){var e;let r,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(o),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,pT.useRef)(!1),a=bt(()=>{i.current||t.resetValidation()}),s=bt(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}(r)===n.current&&(o?o():n.current?.focus(),gj="keyboard",gI("keyboard",null));e.preventDefault()}),l=bt(()=>{t.commitValidation()});(0,pT.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&gr(window.event)instanceof MessagePort,r?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",a),t&&(t.reset=r)}},[n,r])}_G={"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:"Startdatum",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 _0=new WeakMap,_1="__reactAriaDateFieldRole",_2="__reactAriaDateFieldFocusManager";function _4(e,t,n){var r;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=_J({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=(0,pT.useRef)(null),{focusWithinProps:f}=bm({...e,onFocusWithin(n){p.current=t.value,e.onFocus?.(n)},onBlurWithin:n=>{t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),h=vt((r=_G)&&r.__esModule?r.default:r,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=wb(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[_1]?u["aria-describedby"]:[g["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[_2],w=(0,pT.useMemo)(()=>v||_W(n),[v,n]),x=_Z(t,n,"presentation"===e[_1]);_0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let S=(0,pT.useRef)(e.autoFocus);o="presentation"===e[_1]?{role:"presentation"}:yW(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,pT.useEffect)(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),_Q(e.inputRef,t.defaultValue,t.setValue),_X({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let D=y7(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:yW(D,o,x,f,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var _3={};_3={"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 Startdatum 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{D6C4}\u{C5EC}\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 _6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},_5={..._6,customError:!0,valid:!1},_7={isInvalid:!1,validationDetails:_6,validationErrors:[]},_9=(0,pT.createContext)({}),_8="__reactAriaFormValidationState";function xe(e){if(e[_8]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=e[_8];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:n,name:r,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;n&&(t||="invalid"===n);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:_5}:null,u=(0,pT.useMemo)(()=>a&&null!=o?xn(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return xt(n)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,pT.useContext)(_9),d=(0,pT.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>xt(c[e])):xt(c[r]):[],[c,r]),[p,f]=(0,pT.useState)(c),[h,m]=(0,pT.useState)(!1);c!==p&&(f(c),m(!1));let y=(0,pT.useMemo)(()=>xn(h?[]:d),[h,d]),g=(0,pT.useRef)(_7),[b,v]=(0,pT.useState)(_7),w=(0,pT.useRef)(_7),[x,S]=(0,pT.useState)(!1);return(0,pT.useEffect)(()=>{if(!x)return;S(!1);let e=u||i||g.current;xr(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||_7,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||xr(b,e)?g.current=e:v(e)},resetValidation(){xr(_7,w.current)||(w.current=_7,v(_7)),"native"===s&&S(!1),m(!0)},commitValidation(){"native"===s&&S(!0),m(!0)}}}(e)}function xt(e){return e?Array.isArray(e)?e:[e]:[]}function xn(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:_5}:null}function xr(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function xo(...e){let t=new Set,n=!1,r={..._6};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in n||=o.isInvalid,r)r[e]||=o.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let xi=new b6((eu=_3)&&eu.__esModule?eu.default:eu);function xa(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function xs(e,t,n,r,o){let i=null!=e&&null!=n&&e.compare(n)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&r?.(e)||!1,l=i||a||s,u=[];if(l){let e=xa(),r=new b9(e,b6.getGlobalDictionaryForPackage("@react-stately/datepicker")||xi),l=new bY(e,xc({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=n&&u.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(c))})),s&&u.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let xl={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},xu={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function xc(e,t){e={...t.shouldForceLeadingZeros?xu:xl,...e};let n=t.granularity||"minute",r=Object.keys(e),o=r.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=r.indexOf(n);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=r.slice(o,i+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function xd(e){return e&&"hour"in e?e:new vj}function xp(e,t){return null===e?null:e?vW(e,t):void 0}function xf(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,pT.useState)([r,n]);return e&&(o[0]!==r||o[1]!==n)&&i([r,n]),t||(t=e?r:o[0]),[t,e?n:o[1]]}let xh=new b6({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"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},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"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},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");class xm{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,null!=this.hour){let[e,n]=xg(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new xm(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,n]=xg(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,n){let r=this.copy();return r[e]=t,"hour"===e&&null==r.dayPeriod&&"hour"in n&&(r.dayPeriod=xg(n.hour,this.hourCycle)[0]),"year"===e&&null==r.era&&(r.era=n.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in n){let[e,t]=xg(n.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=n[e];return"year"===e&&null==o.era&&(o.era=n.era),o}switch(e){case"era":{let e=this.calendar.getEras(),n=e.indexOf(o.era);n=xy(n,t,0,e.length-1),o.era=e[n];break}case"year":{let r=new vC(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);o.era=(r=r.cycle(e,t,{round:"year"===e})).era,o.year=r.year;break}case"month":o.month=xy(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=xy(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=r.some(e=>["year","month","day"].includes(e));if("timeZone"in n&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(n),[r,i]=xg((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=r,o.offset=e.offset}else{let e=o.hour??0,r=this.getSegmentLimits("hour");o.hour=xy(e,t,r.minValue,r.maxValue),null==o.dayPeriod&&"hour"in n&&(o.dayPeriod=xg(n.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=xy(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=xy(o.minute??0,t,0,59,!0);break;case"second":o.second=xy(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,n){switch(n){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in n&&null!=this.offset&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function xy(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function xg(e,t){let n=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":n=null;break;case"h24":e+=1,n=null}return[n,e]}var xb=n(19264);let xv={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},xw={year:5,month:2,day:7,hour:2,minute:15,second:15},x_={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function xx(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,p]=xf(c,e.granularity),f=p||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,pT.useMemo)(()=>{let r=new bY(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[y,g]=_i(e.value,e.defaultValue??null,e.onChange),[b]=(0,pT.useState)(y),v=(0,pT.useMemo)(()=>xp(y,h)??null,[y,h]),[w,x]=(0,pT.useState)(()=>new xm(h,m,v)),S="gregory"===h.identifier&&"BC"===w.era,E=(0,pT.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:p,hideTimeZone:r,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,p,r,S]),D=(0,pT.useMemo)(()=>xc({},E),[E]),O=(0,pT.useMemo)(()=>new bY(t,D),[t,D]),P=(0,pT.useMemo)(()=>O.resolvedOptions(),[O]),k=(0,pT.useMemo)(()=>(function(e,t,n,r){if(e)return xp(e,n);let o=vW(vY(r??v1()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?vV(o):r?o:vU(o)})(e.placeholderValue,d,h,p),[e.placeholderValue,d,h,p]),C=(0,pT.useMemo)(()=>{let t="h11"===m||"h12"===m,n=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],r=n.indexOf(e.maxGranularity||"era"),o=n.indexOf("hour"===d&&t?"dayPeriod":d);return n.slice(r,o+1)},[e.maxGranularity,d,m]),[j,T]=(0,pT.useState)(v),[R,M]=(0,pT.useState)(h),[N,A]=(0,pT.useState)(m);v===j&&m===N&&vq(h,R)||(w=new xm(h,m,v),T(v),M(h),A(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof xm&&t.isCleared(C))x(new xm(h,m,v)),g(null);else if(t instanceof xm){if(t.isComplete(C)){let e=t.toValue(v??k);if(t.validate(e,C)){let t=vW(e,c?.calendar||new vl);if(!y||0!==t.compare(y)){x(new xm(h,m,v)),g(t);return}}}x(t)}else t=vW(t,c?.calendar||new vl),x(new xm(h,m,v)),g(t)},$=(0,pT.useMemo)(()=>w.toValue(v??k).toDate(f),[w,f,v,k]),L=(0,pT.useMemo)(()=>(function(e,t,n,r,o,i,a){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,xb.K)(i,{useGrouping:!1}),c=new(0,xb.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let n=t[e.type]??0;"2-digit"===r[e.type]?e.value=c.format(n):e.value=u.format(n)}let d=[];for(let e of l){var p;let n=x_[e.type]||e.type,r=xv[n];"era"===n&&1===o.getEras().length&&(r=!1);let l=xv[n]&&null==t[e.type],u=xv[n]?(p=e.value,"era"===n||"dayPeriod"===n?p:"year"===n||"month"===n||"day"===n?xh.getStringForLocale(n,i):"––"):null,c={type:n,text:l?u:e.value,...t.getSegmentLimits(n),isPlaceholder:l,placeholder:u,isEditable:r};"hour"===n?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),n===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(n)&&n===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,O,P,h,t,d),[$,O,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,k,C))},B=(0,pT.useMemo)(()=>xs(y,s,l,u,E),[y,s,l,u,E]),V=xe({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:O,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,xw[e]||1)},decrementPage(e){F(e,-(xw[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,k))},setSegment(e,t){I(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(C)){let e=vW(w.toValue(v??k),c?.calendar||new vl);y&&0===e.compare(y)||g(e),x(new xm(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new bY(t,xc(e,E)).format($):"",getDateFormatter:(e,t)=>new bY(e,xc({},{...E,...t}))}}let xS=(0,pT.createContext)(null),xE=(0,pT.createContext)(null),xD=(0,pT.createContext)(null),xO=(0,pT.forwardRef)(function(e,t){let n=(0,pT.useContext)(xE),r=(0,pT.useContext)(xD);return n||r?pR().createElement(xk,{...e,ref:t}):pR().createElement(xP,{...e,ref:t})}),xP=(0,pT.forwardRef)((e,t)=>{let[n,r]=yG({slot:e.slot},t,xS),{locale:o}=bW(),i=xx({...n,locale:o,createCalendar:w5}),a=(0,pT.useRef)(null),{fieldProps:s,inputProps:l}=_4({...n,inputRef:a},i,r);return pR().createElement(yz,{values:[[xE,i],[_D,{...l,ref:a}],[_S,{...s,ref:r,isInvalid:i.isInvalid}]]},pR().createElement(xk,e))}),xk=(0,pT.forwardRef)((e,t)=>{let{className:n,children:r}=e,o=(0,pT.useContext)(xE),i=(0,pT.useContext)(xD),a=null!=o?o:i;return pR().createElement(pR().Fragment,null,pR().createElement(_E,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:a.isInvalid},a.segments.map((e,t)=>(0,pT.cloneElement)(r(e),{key:t}))),pR().createElement(_O,null))});function xC({children:e}){let t=(0,pT.useMemo)(()=>({register:()=>{}}),[]);return pR().createElement(g8.Provider,{value:t},e)}pR().forwardRef(({children:e,...t},n)=>{let r=(0,pT.useRef)(!1),o=(0,pT.useContext)(g8),i=yW(o||{},{...t,register(){r.current=!0,o&&o.register()}});return i.ref=yE(n||o?.ref),gX(o,i.ref),(0,pT.useEffect)(()=>{r.current||(r.current=!0)},[]),pR().createElement(g8.Provider,{value:i},e)});let xj=(0,pT.createContext)({}),xT=pR().createContext(null);function xR(e){let t=y$(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[o,i]=(0,pT.useState)(!1),a=(0,pT.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,pT.useContext)(xj)??{};if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=pR().createElement(_T,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!r},l)),l=pR().createElement(xT.Provider,{value:a},pR().createElement(xC,null,l)),br.createPortal(l,n)}let xM=(0,pT.createContext)(null),xN=(0,pT.createContext)(null),xA=(0,pT.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=yG(e,t,xM);let{dialogProps:r,titleProps:o}=function(e,t){let n,r,{role:o="dialog"}=e,i=yV();i=e["aria-label"]?void 0:i;let a=(0,pT.useRef)(!1);return(0,pT.useEffect)(()=>{if(t.current&&!go(t.current)){gY(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),gY(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,pT.useContext)(xT),yk(()=>{r?.(!0)},[r=n?.setContain]),(0,pT.useRef)(!1),(0,pT.useEffect)(()=>{}),{dialogProps:{...y7(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":n},t),i=(0,pT.useContext)(xN);r["aria-label"]||r["aria-labelledby"]||(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=yH({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return pR().createElement("section",{...y7(e),...r,...a,ref:t,slot:e.slot||void 0},pR().createElement(yz,{values:[[bP,{slots:{[yK]:{},title:{...o,level:2}}}],[bD,{slots:{[yK]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),xI=(0,pT.createContext)(null),x$=(0,pT.forwardRef)(function(e,t){let n=(0,pT.useContext)(xI);return(null==n?void 0:n.isInvalid)?pR().createElement(xL,{...e,ref:t}):null}),xL=(0,pT.forwardRef)((e,t)=>{let n=(0,pT.useContext)(xI),r=y7(e),o=yH({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==o.children?null:pR().createElement(bC,{slot:"errorMessage",...r,...o,ref:t})}),xF=(0,pT.createContext)(null),xB=(0,pT.createContext)({}),xV=bS(function(e,t){[e,t]=yG(e,t,xB);let{elementType:n="label",...r}=e;return pR().createElement(n,{className:"react-aria-Label",...r,ref:t})}),xU=(0,pT.createContext)({placement:"bottom"}),xW="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,xK=new WeakMap,xz=[];function xH(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function xq(e,t){let n=e,r=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(r=o.length-e)}if(r>0){let e=Math.pow(10,r);n=Math.round(n*e)/e}return n}function xG(e,t,n,r){t=Number(t),n=Number(n);let o=(e-(isNaN(t)?0:t))%r,i=xq(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(xq(n/r,r))*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor(xq((n-t)/r,r))*r),i=xq(i,r)}let xZ={top:"top",bottom:"top",left:"left",right:"left"},xY={top:"bottom",bottom:"top",left:"right",right:"left"},xJ={top:"left",left:"top"},xQ={top:"height",left:"width"},xX={width:"totalWidth",height:"totalHeight"},x0={};function x1(e,t){let n=0,r=0,o=0,i=0,a=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;o=u.clientWidth,i=u.clientHeight,n=t?.width??o,r=t?.height??i,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:n,height:r,top:a,left:s}=x7(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,o=n,i=r;return gE()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:l,top:a,left:s}}function x2(e,t,n,r,o,i,a){let s=o.scroll[e]??0,l=r[xQ[e]],u=a[e]+r.scroll[xZ[e]]+i,c=a[e]+r.scroll[xZ[e]]+l-i,d=t-s+r.scroll[xZ[e]]+a[e]-r[xZ[e]],p=t-s+n+r.scroll[xZ[e]]+a[e]-r[xZ[e]];return d<u?u-d:p>c?Math.max(c-p,u-d):0}function x4(e){if(x0[e])return x0[e];let[t,n]=e.split(" "),r=xZ[t]||"right",o=xJ[r];xZ[n]||(n="center");let i=xQ[r],a=xQ[o];return x0[e]={placement:t,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:a},x0[e]}function x3(e,t,n,r,o,i,a,s,l,u,c){let{placement:d,crossPlacement:p,axis:f,crossAxis:h,size:m,crossSize:y}=r,g={};g[h]=e[h]??0,"center"===p?g[h]+=((e[y]??0)-(n[y]??0))/2:p!==h&&(g[h]+=(e[y]??0)-(n[y]??0)),g[h]+=i;let b=e[h]-n[y]+l+u,v=e[h]+e[y]-l-u;if(g[h]=xH(g[h],b,v),d===f){let t=s?c[m]:c[xX[m]];g[xY[f]]=Math.floor(t-e[f]+o)}else g[f]=Math.floor(e[f]+e[m]+o);return g}function x6(e,t,n,r,o,i,a,s){let{placement:l,axis:u,size:c}=i;return l===u?Math.max(0,n[u]-(a.scroll[u]??0)-(e[u]+(s?t[u]:0))-(r[u]??0)-r[xY[u]]-o):Math.max(0,e[c]+e[u]+(s?t[u]:0)-n[u]-n[c]+(a.scroll[u]??0)-(r[u]??0)-r[xY[u]]-o)}function x5(e,t){let{top:n,left:r,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:n,left:r,width:o,height:i}}function x7(e,t){let{top:n,left:r,width:o,height:i}=x5(e,t),{scrollTop:a,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:n+a-l,left:r+s-u,width:o,height:i}}function x9(e,t,n){let r,o=window.getComputedStyle(e);if("fixed"===o.position)r=x5(e,n);else{r=x7(e,n);let o=x7(t,n),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=o.top,r.left-=o.left}return r.top-=parseInt(o.marginTop,10)||0,r.left-=parseInt(o.marginLeft,10)||0,r}function x8(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 Se=new WeakMap;function St(e){let{ref:t,box:n,onResize:r}=e,o=bt(r);(0,pT.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[t,n])}let Sn="u">typeof document?window.visualViewport:null;function Sr(e,t){if(e.button>0)return!1;let n=gr(e);if(n){let e=n.ownerDocument;if(!e||!gn(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let So=[],Si=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Sa(e){return e instanceof HTMLInputElement&&!Si.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let Ss="u">typeof document&&window.visualViewport,Sl=0;function Su(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Sc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Sd(e,t){t||!Ss?Sp(e):Ss.addEventListener("resize",()=>Sp(e),{once:!0})}function Sp(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=wp(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;Ss&&(n=Math.min(n,Ss.offsetTop+Ss.height));let o=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}n=e.parentElement}}var Sf={};function Sh(e){var t;let{onDismiss:n,...r}=e,o=wi(r,vt((t=Sf)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return pR().createElement(wu,null,pR().createElement("button",{...o,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function Sm(e,t,n){yk(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||(0,br.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}Sf={"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 Sy=null,Sg=new Set,Sb=new Map,Sv=!1,Sw=!1;function S_(e,t){for(let n of Sg)n(e,t)}function Sx(e){Sv=!0,e.metaKey||!gw()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Sy="keyboard",S_("keyboard",e))}function SS(e){Sy="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(Sv=!0,S_("pointer",e))}function SE(e){gk(e)&&(Sv=!0,Sy="virtual")}function SD(e){e.target!==window&&e.target!==document&&e.isTrusted&&(Sv||Sw||(Sy="virtual",S_("virtual",e)),Sv=!1,Sw=!1)}function SO(){Sv=!1,Sw=!0}function SP(e){if("u"<typeof window||Sb.get(gt(e)))return;let t=gt(e),n=ge(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Sv=!0,r.apply(this,arguments)},n.addEventListener("keydown",Sx,!0),n.addEventListener("keyup",Sx,!0),n.addEventListener("click",SE,!0),t.addEventListener("focus",SD,!0),t.addEventListener("blur",SO,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",SS,!0),n.addEventListener("pointermove",SS,!0),n.addEventListener("pointerup",SS,!0)):(n.addEventListener("mousedown",SS,!0),n.addEventListener("mousemove",SS,!0),n.addEventListener("mouseup",SS,!0)),t.addEventListener("beforeunload",()=>{Sk(e)},{once:!0}),Sb.set(t,{focus:r})}let Sk=(e,t)=>{let n=gt(e),r=ge(e);t&&r.removeEventListener("DOMContentLoaded",t),Sb.has(n)&&(n.HTMLElement.prototype.focus=Sb.get(n).focus,r.removeEventListener("keydown",Sx,!0),r.removeEventListener("keyup",Sx,!0),r.removeEventListener("click",SE,!0),n.removeEventListener("focus",SD,!0),n.removeEventListener("blur",SO,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",SS,!0),r.removeEventListener("pointermove",SS,!0),r.removeEventListener("pointerup",SS,!0)):(r.removeEventListener("mousedown",SS,!0),r.removeEventListener("mousemove",SS,!0),r.removeEventListener("mouseup",SS,!0)),Sb.delete(n))};function SC(e){let[t,n]=_i(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,pT.useCallback)(()=>{n(!0)},[n]),o=(0,pT.useCallback)(()=>{n(!1)},[n]),i=(0,pT.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:o,toggle:i}}"u">typeof document&&("loading"!==(m=ge(void 0)).readyState?SP(void 0):m.addEventListener("DOMContentLoaded",()=>{SP(void 0)}));let Sj=(0,pT.createContext)(null),ST=(0,pT.createContext)(null),SR=(0,pT.forwardRef)(function(e,t){[e,t]=yG(e,t,Sj);let n=(0,pT.useContext)(xN),r=SC(e),o=null==e.isOpen&&null==e.defaultOpen&&n?n:r,i=function(e,t){let[n,r]=(0,pT.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let o="exiting"===n;return Sm(e,o,(0,pT.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,pT.useContext)(bx),{direction:s}=bW();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),pR().createElement(pR().Fragment,null,t)}return!o||o.isOpen||i?pR().createElement(SM,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function SM({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var o,i;let a=(0,pT.useRef)(null),[s,l]=(0,pT.useState)(0),u=(0,pT.useRef)(null),c=(0,pT.useContext)(ST),p=c&&"SubmenuTrigger"===r.trigger;yk(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:p}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,l=(0,pT.useRef)(void 0);(0,pT.useEffect)(()=>{if(o&&!So.includes(t))return So.push(t),()=>{let e=So.indexOf(t);e>=0&&So.splice(e,1)}},[o,t]);let u=()=>{So[So.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e,i=(0,pT.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=bt(e=>{n&&Sr(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=bt(e=>{n&&n(e)});(0,pT.useEffect)(()=>{let e=i.current;if(r)return;let n=ge(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&Sr(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",a,!0),n.addEventListener("click",r,!0),()=>{n.removeEventListener("pointerdown",a,!0),n.removeEventListener("click",r,!0)}}},[t,r])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(gr(e)))&&(So[So.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=So[So.length-1];l.current=n,(!s||s(gr(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=bm({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||_A(e.relatedTarget,_j))&&(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??r),{overlayProps:f,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:n}=bW(),{arrowSize:r,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:p=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,pT.useState)(null),x=[h,l,i.current,o.current,a?.current,s.current,u,c,d,p,f,m,n,g,b,r],S=(0,pT.useRef)(Sn?.scale);(0,pT.useEffect)(()=>{m&&(S.current=Sn?.scale)},[m]);let E=(0,pT.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||Sn?.scale!==S.current)return;let t=null;if(s.current&&go(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),n=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-n.top}).offset>n.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-n.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,n,{placement:r,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:p,arrowSize:f=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!x8(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!x8(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?x7(o,!1):x9(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=x7(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let S=x1(u,m),E=x1(y,m);if("BODY"!==u.tagName&&"HTML"!==u.tagName||g)n=("BODY"===u.tagName||"HTML"===u.tagName)&&g?{top:0,left:0,width:0,height:0}:x9(u,y,!1);else{let e=x5(y,!1);n={top:-(e.top-S.top),left:-(e.left-S.left),width:0,height:0}}return function(e,t,n,r,o,i,a,s,l,u,c,d,p,f,h,m,y){var g,b,v;let w,x,S,E=x4(e),{size:D,crossAxis:O,crossSize:P,placement:k,crossPlacement:C}=E,j=x3(t,a,n,E,u,c,l,d,f,h,s),T=u,R=x6(a,l,t,r,o+u,E,s,m);if(i&&n[D]>R){let e=x4(`${xY[k]} ${C}`),i=x3(t,a,n,e,u,c,l,d,f,h,s);x6(a,l,t,r,o+u,e,s,m)>R&&(E=e,j=i,T=u)}let M="bottom";"top"===E.axis?"top"===E.placement?M="top":"bottom"===E.placement&&(M="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?M="bottom":"bottom"===E.crossPlacement&&(M="top"));let N=x2(O,j[O],n[P],a,s,o,l);j[O]+=N;let A=(g=j,b=n.height,v=M,w=(null!=g.top?g.top:s[xX.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?l.top:0,S={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,S.bottom-w-((r.top??0)+(r.bottom??0)+o)):Math.max(0,w+b-S.top-((r.top??0)+(r.bottom??0)+o)));p&&p<A&&(A=p),n.height=Math.min(n.height,A),N=x2(O,(j=x3(t,a,n,E,T,c,l,d,f,h,s))[O],n[P],a,s,o,l),j[O]+=N;let I={},$=t[O]-j[O]-r[xZ[O]],L=$+.5*t[P],F=f/2+h,B="left"===xZ[O]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),V=n[P]-B-f/2-h,U=xH(L,t[O]+f/2-(j[O]+r[xZ[O]]),t[O]+t[P]-f/2-(j[O]+r[xZ[O]]));I[O]=xH(U,F,V),({placement:k,crossPlacement:C}=E),f?$=I[O]:"right"===C?$+=t[P]:"center"===C&&($+=t[P]/2);let W="left"===k||"top"===k?n[D]:0,K={x:"top"===k||"bottom"===k?$:W,y:"left"===k||"right"===k?$:W};return{position:j,maxHeight:A,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:k,triggerAnchorPoint:K}}(r,v,w,x,s,l,S,E,n,c,d,!!b&&"static"!==b,p,f,h,gn(u,y),m)}({placement:(e=l,"rtl"===n?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:p,crossOffset:f,maxHeight:g,arrowSize:r??(a?.current?x5(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),n=s.current.getBoundingClientRect(),r=e[t.type]-n[t.type];s.current.scrollTop+=r-t.offset}w(v)},x);yk(E,x),yk(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),St({ref:i,onResize:E}),St({ref:o,onResize:E});let D=(0,pT.useRef)(!1);yk(()=>{let e,t=()=>{D.current=!0,clearTimeout(e),e=setTimeout(()=>{D.current=!1},500),E()},n=()=>{D.current&&t()};return Sn?.addEventListener("resize",t),Sn?.addEventListener("scroll",n),()=>{Sn?.removeEventListener("resize",t),Sn?.removeEventListener("scroll",n)}},[E]);let O=(0,pT.useCallback)(()=>{D.current||y?.()},[y,D]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,pT.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=gr(e);if(!t.current||n instanceof Node&&!gn(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let o=r||Se.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:o,isOpen:m,onClose:y&&O}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;yk(()=>{if(!t){let e,t,n,r,o,i,a,s;return 1==++Sl&&(d=gS()?(t=Su(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(o=g9())&&(r.nonce=o),r.textContent=`
38
+ `.trim(),e.head.prepend(t)},[p]),(0,pk.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||g2(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:yB(f,C,{[bo]:!0})}}function ba(e){return"A"===e.tagName&&e.hasAttribute("href")}function bs(e,t){let{key:n,code:r}=e,o=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof y9(t).HTMLInputElement&&!bd(t,n)||t instanceof y9(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&ba(t))&&"Enter"!==n)}function bl(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function bu(e,t){return e instanceof HTMLInputElement?!bd(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!ba(e))}let bc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bd(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:bc.has(e.type)}function bp(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=(0,pk.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=g8(),l=(0,pk.useCallback)(e=>{y8(e.currentTarget,ge(e))&&i.current.isFocusWithin&&!y8(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),u=gp(l),c=(0,pk.useCallback)(e=>{if(!y8(e.currentTarget,ge(e)))return;let t=ge(e),n=y7(t),s=((e=document)=>e.activeElement)(n);if(!i.current.isFocusWithin&&s===t){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(n,"focus",e=>{let r=ge(e);if(i.current.isFocusWithin&&!y8(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});gd(e,t),l(gc(e))}},{capture:!0})}},[r,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function bf(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:o}=e,i=(0,pk.useRef)({isFocused:!1,isFocusVisible:n||gV()}),[a,s]=(0,pk.useState)(!1),[l,u]=(0,pk.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,pk.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,pk.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=gV(),s(e),c()},[c]);t={enabled:a,isTextInput:r},gF(),(0,pk.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,n)=>{var r;let o,a,s,l,u,d,p,f;r=!!t?.isTextInput,a=y7(o=n?ge(n):void 0),l=void 0!==(s=y9(o))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,p=void 0!==s?s.KeyboardEvent:KeyboardEvent,f=((e=document)=>e.activeElement)(a),(r=r||f instanceof l&&!gU.has(f.type)||f instanceof u||f instanceof d&&f.isContentEditable)&&"keyboard"===e&&n instanceof p&&!gR[n.key]||(e=>{i.current.isFocusVisible=e,c()})(gV())};return gk.add(e),()=>{gk.delete(e)}},[r,a]);let{focusProps:p}=gq({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=bp({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?f:p}}let bh=!1,bm=0;function by(e){"touch"===e.pointerType&&(bh=!0,setTimeout(()=>{bh=!1},500))}function bg(){let e=y7(null);if(void 0!==e)return 0===bm&&"u">typeof PointerEvent&&e.addEventListener("pointerup",by),bm++,()=>{!(--bm>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",by)}}function bb(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,a]=(0,pk.useState)(!1),s=(0,pk.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,pk.useEffect)(bg,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=g8(),{hoverProps:c,triggerHoverEnd:d}=(0,pk.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:o,pointerType:t}),n&&n(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=r=>{bh&&"mouse"===r.pointerType||((r,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!y8(r.currentTarget,ge(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(y7(ge(r)),"pointerover",t=>{s.isHovered&&s.target&&!y8(s.target,ge(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),n&&n(!0),a(!0)})(r,r.pointerType)},i.onPointerLeave=t=>{!o&&y8(t.currentTarget,ge(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,n,r,o,s,l,u]);return(0,pk.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}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 bv=(0,pk.createContext)(!1);function bw(e){let t=(t,n)=>(0,pk.useContext)(bv)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,pk.forwardRef)(t)}let b_=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),bx=(0,pk.createContext)({}),bS=bw(function(e,t){var n;[e,t]=yH(e,t,bx);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:o}=r,{buttonProps:i,isPressed:a}=function(e,t){let n,{elementType:r="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:h,rel:m,type:y="button"}=e;n="button"===r?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?y:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:g,isPressed:b}=bi({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=gQ(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=yB(v,g,y3(e,{labelable:!0}));return{isPressed:b,buttonProps:yB(n,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"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=bf(e),{hoverProps:c,isHovered:d}=bb({...e,isDisabled:e.isDisabled||o}),p={isHovered:d,isPressed:(r.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=yW({...e,values:p,defaultClassName:"react-aria-Button"}),h=y$(i.id),m=y$(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,pk.useRef)(o);return(0,pk.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?yY(e,"assertive"):g.current&&l&&!o&&yY(e,"assertive"),g.current=o},[o,l,y,h]),pC().createElement("button",{...y3(e,{propNames:b_}),...yB(i,s,c),...f,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["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},pC().createElement(yq.Provider,{value:{id:m}},f.children))});(0,pk.createContext)(null),(0,pk.createContext)(null),(0,pk.createContext)(null),(0,pk.createContext)(null),(0,pk.createContext)(null);let bE=(0,pk.createContext)({}),bD=(0,pk.createContext)({}),bO=(0,pk.forwardRef)(function(e,t){[e,t]=yH(e,t,bD);let{elementType:n="span",...r}=e;return pC().createElement(n,{className:"react-aria-Text",...r,ref:t})}),bP=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bk=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function bC(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return bP.has(t.script)}let t=e.split("-")[0];return bk.has(t)}let bj=Symbol.for("react-aria.i18n.locale");function bT(){let e="u">typeof window&&window[bj]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:bC(e)?"rtl":"ltr"}}let bR=bT(),bN=new Set;function bA(){for(let e of(bR=bT(),bN))e(bR)}function bM(){let e=yA(),[t,n]=(0,pk.useState)(bR);return((0,pk.useEffect)(()=>(0===bN.size&&window.addEventListener("languagechange",bA),bN.add(n),()=>{bN.delete(n),0===bN.size&&window.removeEventListener("languagechange",bA)}),[]),e)?{locale:"u">typeof window&&window[bj]||"en-US",direction:"ltr"}:t}let bI=pC().createContext(null);function b$(e){let{locale:t,children:n}=e,r=pC().useMemo(()=>({locale:t,direction:bC(t)?"rtl":"ltr"}),[t]);return pC().createElement(bI.Provider,{value:r},n)}function bL(e){let{children:t}=e,n=bM();return pC().createElement(bI.Provider,{value:n},t)}function bF(e){let{locale:t,children:n}=e;return t?pC().createElement(b$,{locale:t,children:n}):pC().createElement(bL,{children:n})}function bB(){let e=bM();return(0,pk.useContext)(bI)||e}let bV=null;function bU(e,t="assertive",n=7e3){bV?bV.announce(e,t,n):(bV=new bW,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?bV.announce(e,t,n):setTimeout(()=>{bV?.isAttached()&&bV?.announce(e,t,n)},100))}class bW{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))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(r):this.politeLog?.appendChild(r),""!==e&&setTimeout(()=>{r.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var bK={};function bH(e,t){let n=(0,pk.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}bK={"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 bz=new Map;class bG{constructor(e,t={}){this.formatter=bZ(e,t),this.options=t}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 n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==bJ&&(bJ="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),bJ&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=bZ(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&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}}let bq={true:{ja:"h11"},false:{}};function bZ(e,t={}){if("boolean"==typeof t.hour12&&(null==bY&&(bY="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),bY)){let n=bq[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(bz.has(n))return bz.get(n);let r=new Intl.DateTimeFormat(e,t);return bz.set(n,r),r}let bY=null,bJ=null;function bQ(e){e=bH(e??{},bX);let{locale:t}=bB();return(0,pk.useMemo)(()=>new bG(t,e),[t,e])}function bX(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}let b0=Symbol.for("react-aria.i18n.locale"),b1=Symbol.for("react-aria.i18n.strings");class b2{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[b0];if(void 0===h){let e=window[b1];if(!e)return null;for(let n in h={},e)h[n]=new b2({[t]:e[n]},t)}let n=h?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}let b4=new Map,b3=new Map;class b6{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+n,i=b4.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:n}),b4.set(o,i)),"function"==typeof(r=t[i.select(e)]||t.other)?r():r}number(e){let t=b3.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),b3.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let b5=new WeakMap;function b7(e,t){let n;return t&&b2.getGlobalDictionaryForPackage(t)||((n=b5.get(e))||(n=new b2(e),b5.set(e,n)),n)}function b9(e,t){let{locale:n}=bB(),r=b7(e,t);return(0,pk.useMemo)(()=>new b6(n,r),[n,r])}function b8(e,t){return e-t*Math.floor(e/t)}function ve(e,t,n,r){let o=(t=vn(e,t))-1,i=-2;return n<=2?i=0:vt(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)}function vt(e){return e%4==0&&(e%100!=0||e%400==0)}function vn(e,t){return"BC"===e?1-t:t}function vr(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let vo={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 vi{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=b8(t,146097),o=Math.floor(r/36524),i=b8(r,36524),a=Math.floor(i/1461),s=Math.floor(b8(i,1461)/365),[l,u]=vr(400*n+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-ve(l,u,1,1),d=2;e<ve(l,u,3,1)?d=0:vt(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-ve(l,u,p,1)+1;return new vO(l,u,p,f)}toJulianDay(e){return ve(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return vo[vt(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return vt(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}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 va(e,t){let n=e.copy(),r="hour"in n?vy(n,t):0;vs(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,vl(n),vu(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,vl(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,vl(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let o=n.calendar.getYearsInEra(n);if(n.year>o){let e=n.calendar.isInverseEra?.(n);n.year=o,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let i=n.calendar.getMonthsInYear(n);return n.month>i&&(n.month=i,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function vs(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function vl(e){for(;e.month<1;)vs(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,vs(e,1)}function vu(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 vc(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),vu(e)}function vd(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function vp(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),vc(n),n}function vf(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),vh(n),n}function vh(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 vm(e,t){let n=e%t;return n<0&&(n+=t),n}function vy(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=vm(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=vm(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=vm(e.minute,60),n=Math.floor(e.hour/24),e.hour=vm(e.hour,24),n}function vg(e,t){let n=e.copy();return vy(n,t),n}function vb(e,t,n,r){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=vw(i,n,0,t.length-1,r?.round),o.era=t[i],vc(o);break}case"year":o.calendar.isInverseEra?.(o)&&(n=-n),o.year=vw(e.year,n,-1/0,9999,r?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=vw(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":o.day=vw(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),vc(o),o}function vv(e,t,n,r){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(r?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=vw(t,n,i,a,r?.round);break}case"minute":o.minute=vw(e.minute,n,0,59,r?.round);break;case"second":o.second=vw(e.second,n,0,59,r?.round);break;case"millisecond":o.millisecond=vw(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return o}function vw(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function v_(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?vM(va(vF(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):vj(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),vB(v$(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function vx(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 vS(e){let t,n=vB(e,new vi);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function vE(e){return`${vS(e)}T${vx(e)}`}function vD(e){let t,n="object"==typeof e[0]?e.shift():new vi;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}class vO{#t;constructor(...e){let[t,n,r,o,i]=vD(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,vc(this)}copy(){return this.era?new vO(this.calendar,this.era,this.year,this.month,this.day):new vO(this.calendar,this.year,this.month,this.day)}add(e){return va(this,e)}subtract(e){return va(this,vd(e))}set(e){return vp(this,e)}cycle(e,t,n){return vb(this,e,t,n)}toDate(e){return vI(this,e)}toString(){return vS(this)}compare(e){return vZ(this,e)}}class vP{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,vh(this)}copy(){return new vP(this.hour,this.minute,this.second,this.millisecond)}add(e){return vg(this,e)}subtract(e){return vg(this,vd(e))}set(e){return vf(this,e)}cycle(e,t,n){return vv(this,e,t,n)}toString(){return vx(this)}compare(e){var t,n;return t=this,n=e,vY(t)-vY(n)}}class vk{#t;constructor(...e){let[t,n,r,o,i]=vD(e);this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,vc(this)}copy(){return this.era?new vk(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new vk(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return va(this,e)}subtract(e){return va(this,vd(e))}set(e){return vp(vf(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return vb(this,e,t,n);default:return vv(this,e,t,n)}}toDate(e,t){return vI(this,e,t)}toString(){return vE(this)}compare(e){var t,n;let r=vZ(this,e);return 0===r?(t=this,n=vF(e),vY(t)-vY(n)):r}}class vC{#t;constructor(...e){let[t,n,r,o,i]=vD(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,vc(this)}copy(){return this.era?new vC(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new vC(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return v_(this,e)}subtract(e){return v_(this,vd(e))}set(e,t){let n,r;return 0===(r=vf(vp(n=vF(this),e),e)).compare(n)?this:vB(v$(vM(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,o=23;if(r?.hourCycle===12){let n=e.hour>=12;t=12*!!n,o=n?23:11}let i=vF(e),a=vB(vf(i,{hour:t}),new vi),s=[vM(a,e.timeZone,"earlier"),vM(a,e.timeZone,"later")].filter(t=>v$(t,e.timeZone).day===a.day)[0],l=vB(vf(i,{hour:o}),new vi),u=[vM(l,e.timeZone,"earlier"),vM(l,e.timeZone,"later")].filter(t=>v$(t,e.timeZone).day===l.day).pop(),c=vj(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return vB(v$(c=36e5*vw(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return vv(e,t,n,r);case"era":case"year":case"month":case"day":return vB(v$(vM(vb(vF(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(vj(e)-e.offset)}toString(){var e;let t,n,r,o,i;return`${vE(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof vC){var n,r;return e.timeZone===t?e:(n=e,r=t,vB(v$(vj(n)-n.offset,r),n.calendar))}return v$(vM(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function vj(e){return vT(vn((e=vB(e,new vi)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function vT(e,t,n,r,o,i,a){let s=new Date;return s.setUTCHours(r,o,i,a),s.setUTCFullYear(e,t-1,n),s.getTime()}function vR(e,t){if("UTC"===t)return 0;if(e>0&&t===vQ())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:o,hour:i,minute:a,second:s}=vA(e,t);return vT(n,r,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let vN=new Map;function vA(e,t){let n=vN.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),vN.set(t,n));let r=n.formatToParts(new Date(e)),o={};for(let e of r)"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 vM(e,t,n="compatible"){var r,o,i;let a=vF(e);if("UTC"===t)return vj(a);if(t===vQ()&&"compatible"===n){a=vB(a,new vi);let e=new Date,t=vn(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=vj(a),l=vR(s-864e5,t),u=vR(s+864e5,t),c=(r=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var n;let o;return n=r,o=vA(e,t),n.year===o.year&&n.month===o.month&&n.day===o.day&&n.hour===o.hour&&n.minute===o.minute&&n.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){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 vI(e,t,n="compatible"){return new Date(vM(e,t,n))}function v$(e,t){let n=vR(e,t),r=new Date(e+n),o=r.getUTCFullYear();return new vC(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function vL(e){return new vO(e.calendar,e.era,e.year,e.month,e.day)}function vF(e,t){let n=0,r=0,o=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:o,millisecond:i}=t),new vk(e.calendar,e.era,e.year,e.month,e.day,n,r,o,i)}function vB(e,t){if(vK(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,vc(r),r}let vV={"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 vU(e,t){return t=vB(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vW(e,t){return vK(e.calendar,t.calendar)&&vU(e,t)}function vK(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let vH={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function vz(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?vH[n]:function(e){let t=v4.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return v4.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=v2.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&v2.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];t="mon"===n?{firstDay:1}:"tue"===n?{firstDay:2}:"wed"===n?{firstDay:3}:"thu"===n?{firstDay:4}:"fri"===n?{firstDay:5}:"sat"===n?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:n&&vV[n]||0};v4.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function vG(e){return v$(Date.now(),e)}function vq(e){return vL(vG(e))}function vZ(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function vY(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let vJ=null;function vQ(){return null==vJ&&(vJ=new Intl.DateTimeFormat().resolvedOptions().timeZone),vJ}function vX(e){return e.subtract({days:e.day-1})}function v0(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function v1(e,t,n){let r=vz(e,t,n);return e.subtract({days:r})}let v2=new Map,v4=new Map;function v3(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((vz(vX(e),t,n)+r)/7)}function v6(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function v5(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function v7(e){return e&&e.__esModule?e.default:e}let v9=new WeakMap;function v8(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function we(e,t,n,r){let o=b9(v7(bK),"@react-aria/calendar"),i=v8(e)||v8(t),a=bQ({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n}),s=bQ({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n});return(0,pk.useMemo)(()=>{if(vU(e,vX(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),vU(t,v0(e)))return a.format(i.toDate(n));if(vU(t,v0(t)))return r?wt(a,o,i,s,n):a.formatRange(i.toDate(n),s.toDate(n))}return r?wt(s,o,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,a,s,o,n,r])}function wt(e,t,n,r,o){let i=e.formatRangeToParts(n.toDate(o),r.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function wn(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=y$(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function wr(e,t){let n=(0,pk.useRef)(!0),r=(0,pk.useRef)(null),o=g9(e);(0,pk.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,pk.useEffect)(()=>{let e=r.current;n.current?n.current=!1:(!e||t.some((t,n)=>!Object.is(t,e[n])))&&o(),r.current=t},t)}function wo(e,t){var n;let r,o,i,a,s,l=b9((n=bK)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=y3(e),c=we(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=we(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);wr(()=>{t.isFocused||bU(d)},[d]);let p=(i=b9(v7(bK),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:o}=t.highlightedRange||{}:r=o=t.value??void 0,a=bQ({weekday:"long",month:"long",year:"numeric",day:"numeric",era:v8(r)||v8(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,pk.useMemo)(()=>{if(!s&&r&&o)if(vU(r,o)){let e=a.format(r.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=wt(a,i,r,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[r,o,s,t.timeZone,i,a]));wr(()=>{p&&bU(p,"polite",4e3)},[p]);let f=yL([!!e.errorMessage,e.isInvalid,e.validationState]);v9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:f,selectedDateDescription:p});let[h,m]=(0,pk.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,pk.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:yB(u,wn({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:f},title:c}}let wi={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 wa(e){let{children:t,elementType:n="div",isFocusable:r,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:n}=e,[r,o]=(0,pk.useState)(!1),{focusWithinProps:i}=bp({isDisabled:!n,onFocusWithinChange:e=>o(e)}),a=(0,pk.useMemo)(()=>r?t:t?{...wi,...t}:wi,[r]);return{visuallyHiddenProps:{...i,style:a}}}(e);return pC().createElement(n,yB(i,a),t)}function ws(e,t,n,r){let o=g9(n),i=null==n;(0,pk.useEffect)(()=>{if(i||!e.current)return;let n=e.current;return n.addEventListener(t,o,r),()=>{n.removeEventListener(t,o,r)}},[e,t,r,i])}function wl(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&"hidden"!==n.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function wu(e,t){let n=e;for(wl(n,t)&&(n=n.parentElement);n&&!wl(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wc(e,t){let n=[],r=document.scrollingElement||document.documentElement;do wl(e,t)&&n.push(e),e=e.parentElement;while(e&&e!==r);return n}function wd(e,t,n={}){let{block:r="nearest",inline:o="nearest"}=n;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,p=e===d?0:l.top,f=e===d?e.clientHeight:l.bottom,h=e===d?0:l.left,m=e===d?e.clientWidth:l.right,y=parseInt(u.scrollMarginTop,10)||0,g=parseInt(u.scrollMarginBottom,10)||0,b=parseInt(u.scrollMarginLeft,10)||0,v=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,S=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,D=parseInt(c.borderTopWidth,10)||0,O=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,C=s.top-y,j=s.bottom+g,T=s.left-b,R=s.right+v,N=e===d?0:P+k,A=e===d?0:D+O,M=e.offsetWidth-e.clientWidth-N,I=e.offsetHeight-e.clientHeight-A,$=p+D+w,L=f-O-x-I,F=h+P+S,B=m-k-E;"rtl"!==c.direction||gw()?B-=M:F+=M;let V=C<$||j>L,U=T<F||R>B;if(V&&"start"===r)i+=C-$;else if(V&&"center"===r)i+=(C+j)/2-($+L)/2;else if(V&&"end"===r)i+=j-L;else if(V&&"nearest"===r){let e=C-$,t=j-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=T-F;else if(U&&"center"===o)a+=(T+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=T-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function wp(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:r}=e.getBoundingClientRect(),o=wc(e,!0);for(let t of o)wd(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(r-a)>1)for(let e of o=n?wc(n,!0):[])wd(e,n,{block:"center",inline:"center"})}else{let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(r-i)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let wf=0,wh=new Map;function wm(e){let[t,n]=(0,pk.useState)();return yD(()=>{if(!e)return;let t=wh.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${wf++}`;n(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},wh.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),wh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class wy extends vi{fromJulianDay(e){let t=super.fromJulianDay(e);return new vO(this,vn(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(wg(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(wg(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function wg(e){let[t,n]=vr(e.year+-543);return new vO(t,n,e.month,e.day)}function wb(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wv(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-wb(e,n,1,1))/30),o=t+1-wb(e,n,r,1);return[n,r,o]}function ww(e){return Math.floor(e%4/3)}function w_(e,t){return t%13!=0?30:ww(e)+5}class wx{fromJulianDay(e){let[t,n,r]=wv(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new vO(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),wb(1723856,t,e.month,e.day)}getDaysInMonth(e){return w_(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+ww(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class wS extends wx{fromJulianDay(e){let[t,n,r]=wv(1723856,e);return new vO(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class wE extends wx{fromJulianDay(e){let[t,n,r]=wv(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new vO(this,o,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),wb(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),w_(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 wD=765433;function wO(e){return 7>b8(7*e+1,19)}function wP(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>b8(3*(n+1),7)&&(n+=1),n}function wk(e){let t,n;return wP(e)+(t=wP(e-1),n=wP(e),wP(e+1)-n==356?2:+(n-t==382))}function wC(e){return wk(e+1)-wk(e)}function wj(e,t){if(t>=6&&!wO(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=wC(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!wO(e):30}class wT{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/wD*19+234)/235)+1,r=wk(n),o=Math.floor(t-r);for(;o<1;)o=Math.floor(t-(r=wk(--n)));let i=1,a=0;for(;a<o;)a+=wj(n,i),i++;let s=o-(a-=wj(n,--i));return new vO(this,n,i,s)}toJulianDay(e){let t=wk(e.year);for(let n=1;n<e.month;n++)t+=wj(e.year,n);return t+e.day+347997}getDaysInMonth(e){return wj(e.year,e.month)}getMonthsInYear(e){return wO(e.year)?13:12}getDaysInYear(e){return wC(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(wO(t.year)&&!wO(e.year)&&t.month>6?e.month--:!wO(t.year)&&wO(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class wR extends vi{fromJulianDay(e){let t,n,r,o=super.fromJulianDay(e),i=o.year-78,a=e-ve(o.era,o.year,1,1);if(a<80?(i--,a+=(t=vt(o.year-1)?31:30)+155+90+10):(t=vt(o.year)?31:30,a-=80),a<t)n=1,r=a+1;else{let e=a-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new vO(this,i,n,r)}toJulianDay(e){let t,n,[r,o]=vr(e.year+78);return(vt(o)?(t=31,n=ve(r,o,3,21)):(t=30,n=ve(r,o,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&vt(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 wN(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function wA(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+wN(t,r,1,1)))/29.5)+1),i=n-wN(t,r,o,1)+1;return new vO(e,r,o,i)}function wM(e){return(14+11*e)%30<11}class wI{fromJulianDay(e){return wA(this,1948440,e)}toJulianDay(e){return wN(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&wM(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return wM(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class w$ extends wI{fromJulianDay(e){return wA(this,1948439,e)}toJulianDay(e){return wN(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function wL(e){return 460322+c[e-1300]}function wF(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function wB(e,t){let n=wL(e);for(let r=1;r<t;r++)n+=wF(e,r);return n}function wV(e){return c[e+1-1300]-c[e-1300]}class wU extends wI{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let n=1;n<=12;n++)e+=wF(t,n)}}}fromJulianDay(e){let t=e-1948440,n=wL(1300),r=wL(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-wL(++e)+1;let o=wV(e);if(r===o){n=12;break}if(r<o){let t=wF(e,n);for(n=1;r>t;)r-=t,t=wF(e,++n);break}}return new vO(this,e,n,t-wB(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+wB(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):wF(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):wV(e.year)}}let wW=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],wK=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],wH=[1867,1911,1925,1988,2018],wz=["meiji","taisho","showa","heisei","reiwa"];function wG(e){let t=wW.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?wW.length-1:0===t?0:t-1}function wq(e){let t=wH[wz.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new vO(e.year+t,e.month,e.day)}class wZ extends vi{fromJulianDay(e){let t=super.fromJulianDay(e),n=wG(t);return new vO(this,wz[n],t.year-wH[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(wq(e))}balanceDate(e){let t=wq(e),n=wG(t);wz[n]!==e.era&&(e.era=wz[n],e.year=t.year-wH[n]),this.constrainDate(e)}constrainDate(e){let t=wz.indexOf(e.era),n=wK[t];if(null!=n){let[r,o,i]=n,a=r-wH[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,n,r]=wW[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return wz}getYearsInEra(e){let t=wz.indexOf(e.era),n=wW[t],r=wW[t+1];if(null==r)return 9999-n[0]+1;let o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(wq(e))}getMinimumMonthInYear(e){let t=wY(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=wY(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function wY(e){if(1===e.year)return wW[wz.indexOf(e.era)]}let wJ=[0,31,62,93,124,155,186,216,246,276,306,336];class wQ{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),i=r-wJ[o]+1;return new vO(this,n,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=wJ[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>b8(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function wX(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function w0(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class w1 extends vi{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=w0(vn(t.era,t.year));return new vO(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(w2(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=w0(wX(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(w2(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function w2(e){let[t,n]=vr(wX(e));return new vO(t,n,e.month,e.day)}function w4(e){switch(e){case"buddhist":return new wy;case"ethiopic":return new wx;case"ethioaa":return new wS;case"coptic":return new wE;case"hebrew":return new wT;case"indian":return new wR;case"islamic-civil":return new wI;case"islamic-tbla":return new w$;case"islamic-umalqura":return new wU;case"japanese":return new wZ;case"persian":return new wQ;case"roc":return new w1;default:return new vi}}function w3(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function w6(e,t,n,r,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=w5(e,t,n).subtract(i);return w9(e,a,t,n,r,o)}function w5(e,t,n,r,o){let i=e;if(t.years)i=vX(e.subtract({months:e.month-1}));else t.months?i=vX(e):t.weeks&&(i=v1(e,n));return w9(e,i,t,n,r,o)}function w7(e,t,n,r,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=w5(e,t,n).subtract(i);return w9(e,a,t,n,r,o)}function w9(e,t,n,r,o,i){if(o&&e.compare(o)>=0){let e=v5(t,w5(vL(o),n,r));e&&(t=e)}if(i&&0>=e.compare(i)){let e=v6(t,w7(vL(i),n,r));e&&(t=e)}return t}function w8(e,t,n){if(t){let n=v5(e,vL(t));n&&(e=n)}if(n){let t=v6(e,vL(n));t&&(e=t)}return e}function _e(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let _t="u">typeof document?pC().useInsertionEffect??pC().useLayoutEffect:()=>{};function _n(e,t,n){let[r,o]=(0,pk.useState)(e||t),i=(0,pk.useRef)(r),a=(0,pk.useRef)(void 0!==e),s=void 0!==e;(0,pk.useEffect)(()=>{a.current,a.current=s},[s]);let l=s?e:r;_t(()=>{i.current=l});let[,u]=(0,pk.useReducer)(()=>({}),{});return[l,(0,pk.useCallback)((e,...t)=>{let r="function"==typeof e?e(i.current):e;Object.is(i.current,r)||(i.current=r,o(r),u(),n?.(r,...t))},[n])]}function _r(e){let t=(0,pk.useMemo)(()=>new bG(e.locale),[e.locale]),n=(0,pk.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,p=(0,pk.useMemo)(()=>o(n.calendar),[o,n.calendar]),[f,h]=_n(e.value,e.defaultValue??null,e.onChange),m=(0,pk.useMemo)(()=>f?vB(vL(f),p):null,[f,p]),y=(0,pk.useMemo)(()=>f&&"timeZone"in f?f.timeZone:n.timeZone,[f,n.timeZone]),[g,b]=_n((0,pk.useMemo)(()=>e.focusedValue?w8(vB(vL(e.focusedValue),p),a,s):void 0,[e.focusedValue,p,a,s]),(0,pk.useMemo)(()=>w8(e.defaultFocusedValue?vB(vL(e.defaultFocusedValue),p):m||vB(vq(y),p),a,s),[e.defaultFocusedValue,m,y,p,a,s]),e.onFocusChange),[v,w]=(0,pk.useState)(()=>{switch(l){case"start":return w5(g,i,r,a,s);case"end":return w7(g,i,r,a,s);default:return w6(g,i,r,a,s)}}),[x,S]=(0,pk.useState)(e.autoFocus||!1),E=(0,pk.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[D,O]=(0,pk.useState)(p);if(!vK(p,D)){let e=vB(g,p);w(w6(e,i,r,a,s)),b(e),O(p)}function P(e){b(e=w8(e,a,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=_e(e=w8(e,a,s),v,u))&&(e=vB(e,f?.calendar||new vi),f&&"hour"in f?h(f.set(e)):h(e))}}w3(g,a,s)?b(w8(g,a,s)):0>g.compare(v)?w(w7(g,i,r,a,s)):g.compare(E)>0&&w(w5(g,i,r,a,s));let C=(0,pk.useMemo)(()=>!!m&&(!!(u&&u(m))||w3(m,a,s)),[m,u,a,s]),j=e.isInvalid||"invalid"===e.validationState||C,T=(0,pk.useMemo)(()=>"visible"===c?i:_o(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:k,visibleRange:{start:v,end:E},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:j?"invalid":null,isValueInvalid:j,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(T);b(w8(g.add(T),a,s)),w(w5(w9(g,e,T,r,a,s),T,r))},focusPreviousPage(){let e=v.subtract(T);b(w8(g.subtract(T),a,s)),w(w5(w9(g,e,T,r,a,s),T,r))},focusSectionStart(){i.days?P(v):i.weeks?P(v1(g,r)):(i.months||i.years)&&P(vX(g))},focusSectionEnd(){i.days?P(E):i.weeks?P(v1(g,r,void 0).add({days:6})):(i.months||i.years)&&P(v0(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(_o(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(_o(i)))},selectFocusedDate(){u&&u(g)||k(g)},selectDate(e){k(e)},isFocused:x,setFocused:S,isInvalid:e=>w3(e,a,s),isSelected(e){return null!=m&&vU(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&vU(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return vU(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return vU(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=v){let n=t.add({weeks:e}),o=[],i=vz(n=v1(n,r,d),r,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(n);let e=n.add({days:1});if(vU(n,e))break;n=e}for(;o.length<7;)o.push(null);return o}}}function _o(e){let t={...e};for(let n in e)t[n]=1;return t}function _i(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:vL(e),end:vL(t)}):null}function _a(e,t){return(e=vB(e,t?.calendar||new vi),t&&"hour"in t)?t.set(e):e}function _s(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let _l=(0,pk.createContext)(null),_u=(0,pk.createContext)(null),_c=(0,pk.createContext)(null),_d=(0,pk.createContext)(null),_p=(0,pk.forwardRef)(function(e,t){[e,t]=yH(e,t,_l);let{locale:n}=bB(),r=_r({...e,locale:n,createCalendar:w4}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=wo(e,r),u=yW({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return pC().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},pC().createElement(yU,{values:[[bx,{slots:{previous:i,next:a}}],[bE,{"aria-hidden":!0,level:2,children:l}],[_c,r],[_l,e],[bD,{slots:{errorMessage:s}}]]},pC().createElement(wa,null,pC().createElement("h2",null,o["aria-label"])),u.children,pC().createElement(wa,null,pC().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),_f=(0,pk.forwardRef)(function(e,t){[e,t]=yH(e,t,_u);let{locale:n}=bB(),r=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=_n(t,n||null,r),[p,f]=(0,pk.useState)(null),h="center";if(c&&c.start&&c.end){let e=w6(vL(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,pk.useRef)(null),[y,g]=(0,pk.useState)(null),b=(0,pk.useMemo)(()=>v5(s,y?.start),[s,y]),v=(0,pk.useMemo)(()=>v6(l,y?.end),[l,y]),w=_r({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:_s(t,w,-1),end:_s(t,w,1)},g(m.current)):(m.current=null,g(null))},[S,E]=(0,pk.useState)(w.visibleRange);vW(w.visibleRange.start,S.start)&&vW(w.visibleRange.end,S.end)||(x(p),E(w.visibleRange));let D=e=>{e?(f(e),x(e)):(f(null),x(null))},O=p?_i(p,w.focusedDate):c&&_i(c.start,c.end),P=t=>{if(e.isReadOnly)return;let n=_e(w8(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(n)if(p){let e=_i(p,n);e&&d({start:_a(e.start,c?.start),end:_a(e.end,c?.end)}),D(null)}else D(n)},[k,C]=(0,pk.useState)(!1),{isDateUnavailable:j}=e,T=(0,pk.useMemo)(()=>!!c&&!p&&(!!(j&&(j(c.start)||j(c.end)))||w3(c.start,s,l)||w3(c.end,s,l)),[j,c,p,s,l]),R=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||w3(e,m.current?.start,m.current?.end),isDragging:k,setDragging:C,clearSelection(){D(null),d(null)}}}({...e,locale:n,createCalendar:w4}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...o}=e,i=wo(o,t),a=(0,pk.useRef)(!1),s=(0,pk.useRef)("u">typeof window?window:null);ws(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return ws(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;n.current&&gt(n.current)&&(!y8(n.current,o)||!o.closest('button, [role="button"]'))&&l[r]()}),i.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&y8(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},ws(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,r,t),u=yW({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return pC().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},pC().createElement(yU,{values:[[bx,{slots:{previous:i,next:a}}],[bE,{"aria-hidden":!0,level:2,children:l}],[_d,r],[_u,e],[bD,{slots:{errorMessage:s}}]]},pC().createElement(wa,null,pC().createElement("h2",null,o["aria-label"])),u.children,pC().createElement(wa,null,pC().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),_h=(0,pk.createContext)(null),_m=(0,pk.forwardRef)(function(e,t){var n,r;let o=(0,pk.useContext)(_c),i=(0,pk.useContext)(_d),a=yK(_l),s=yK(_u),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(n=null==a?void 0:a.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:f}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=bB(),a=we(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=v9.get(t),u=wn({"aria-label":[s,a].filter(Boolean).join(", "),"aria-labelledby":l}),c=bQ({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=bB(),p=(0,pk.useMemo)(()=>{let e=v1(vq(t.timeZone),d,o);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return c.format(r)})},[d,t.timeZone,c,o]),f=v3(n,d,o);return{gridProps:yB(u,{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:p,weeksInMonth:f}}({startDate:u,endDate:v0(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return pC().createElement(_h.Provider,{value:{headerProps:p,weekDays:f,startDate:u,firstDayOfWeek:c}},pC().createElement("table",{...y3(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:pC().createElement(pC().Fragment,null,pC().createElement(_y,null,e=>pC().createElement(_g,null,e)),pC().createElement(_b,null,e.children))))}),_y=(0,pk.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,{headerProps:i,weekDays:a}=(0,pk.useContext)(_h);return pC().createElement("thead",{...y3(e),...i,ref:t,style:r,className:o||"react-aria-CalendarGridHeader"},pC().createElement("tr",null,a.map((e,t)=>pC().cloneElement(n(e),{key:t}))))}),_g=(0,pk.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e;return pC().createElement("th",{...y3(e),ref:t,style:r,className:o||"react-aria-CalendarHeaderCell"},n)}),_b=(0,pk.forwardRef)(function(e,t){let{children:n,style:r,className:o}=e,i=(0,pk.useContext)(_c),a=(0,pk.useContext)(_d),s=null!=i?i:a,{startDate:l,firstDayOfWeek:u}=(0,pk.useContext)(_h),{locale:c}=bB(),d=v3(l,c,u);return pC().createElement("tbody",{...y3(e),ref:t,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>pC().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?pC().cloneElement(n(e),{key:t}):pC().createElement("td",{key:t})))))}),_v=(0,pk.forwardRef)(function({date:e,...t},n){var r,o,i;let a=(0,pk.useContext)(_c),s=(0,pk.useContext)(_d),l=null!=a?a:s,{startDate:u}=null!=(r=(0,pk.useContext)(_h))?r:{startDate:l.visibleRange.start},c=(0,pk.useRef)(null),{cellProps:d,buttonProps:p,...f}=function(e,t,n){var r;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=v9.get(t),u=b9((r=bK)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=bQ({weekday:"long",day:"numeric",month:"long",year:"numeric",era:v8(i),timeZone:t.timeZone}),d=t.isSelected(i),p=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let f=t.isCellUnavailable(i),h=!a&&!f,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&vU(t.value,i));m&&(d=!0),i=bH(i,vW);let y=(0,pk.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=vU(i,vq(t.timeZone)),b=(0,pk.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(vU(i,t.value.start)||vU(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&vU(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&vU(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&p&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=wm(v),x=(0,pk.useRef)(!1),S=(0,pk.useRef)(!1),E=(0,pk.useRef)(void 0),{pressProps:D,isPressed:O}=bi({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(vU(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}else if(vU(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}}let n=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(n,200):n()}},onPressEnd(){S.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(S.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=vU(i,t.focusedDate)?0:-1),(0,pk.useEffect)(()=>{p&&n.current&&(y6(n.current),"pointer"!==gP&&((e=document)=>e.activeElement)()===n.current&&wp(n.current,{containingElement:wu(n.current)}))},[p,n]);let P=bQ({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,pk.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:yB(D,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=ge(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:p,isSelected:d,isDisabled:a,isUnavailable:f,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},l,c),{hoverProps:h,isHovered:m}=bb({...t,isDisabled:f.isDisabled}),{focusProps:y,isFocusVisible:g}=bf();g&&(g=f.isFocused);let b=(o=u,i=vB(i=e,o.calendar),o=vX(o),i=vX(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=vU(e,l.highlightedRange.start),w=vU(e,l.highlightedRange.end));let x=yW({...t,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...f}}),S={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":f.isInvalid||void 0};return pC().createElement("td",{...d,ref:n},pC().createElement("div",{...yB(y3(t),p,y,h,S,x),ref:c}))}),_w=(0,pk.createContext)({}),__=(0,pk.forwardRef)(function(e,t){var n,r;[e,t]=yH(e,t,_w);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=bb({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:p,isFocusVisible:f,focusProps:h}=bf({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=yW({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:f,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return pC().createElement("div",{...yB(u,h,c),...m,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r: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":i||void 0},m.children)}),_x=(0,pk.createContext)({}),_S=bw(function(e,t){[e,t]=yH(e,t,_x);let{hoverProps:n,isHovered:r}=bb(e),{isFocused:o,isFocusVisible:i,focusProps:a}=bf({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=yW({...e,values:{isHovered:r,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return pC().createElement("input",{...yB((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...o}=e;return o})(e),a,n),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function _E(e,t,n,r){return e.createTreeWalker(t,n,r)}let _D=pC().createContext(null),_O="react-aria-focus-scope-restore",_P=null;function _k(e){var t,n,r,o,i,a,s,l,u,c;let d,p,f,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,pk.useRef)(null),w=(0,pk.useRef)(null),x=(0,pk.useRef)([]),{parentNode:S}=(0,pk.useContext)(_D)||{},E=(0,pk.useMemo)(()=>new _W({scopeRef:x}),[x]);yD(()=>{let e=S||_K.root;if(_K.getTreeNode(e.scopeRef)&&_P&&!_N(_P,e.scopeRef)){let t=_K.getTreeNode(_P);t&&(e=t)}e.addChild(E),_K.addNode(E)},[E,S]),yD(()=>{let e=_K.getTreeNode(x);e&&(e.contain=!!y)},[y]),yD(()=>{let e=v.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(_O,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(_O,n)}},[m]),yD(()=>{if(n||r)return;let e=t.current,o=y7(e?e[0]:void 0),i=e=>{let n=ge(e);_T(n,t.current)?_P=t:_R(n)||(_P=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,n=g,r=y]),o=x,i=y,d=(0,pk.useRef)(void 0),p=(0,pk.useRef)(void 0),yD(()=>{let e=o.current;if(!i){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=y7(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!_j(o)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=o.current;if(!r||!_T(n,r))return;let i=_F(_C(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(_A(a,!0),a instanceof y9(a).HTMLInputElement&&a.select())},r=e=>{(!_P||_N(_P,o))&&_T(ge(e),o.current)?(_P=o,d.current=ge(e)):_j(o)&&!_R(ge(e),o)?d.current?d.current.focus():_P&&_P.current&&_I(_P.current):_j(o)&&(d.current=ge(e))},a=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let n=gP,r=("virtual"===n||null===n)&&gS()&&gx(),i=((e=document)=>e.activeElement)(t);if(!r&&i&&_j(o)&&!_R(i,o)){_P=o;let t=ge(e);t&&t.isConnected?(d.current=t,d.current?.focus()):_P.current&&_I(_P.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),yD(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),a=x,s=g,l=y,f=(0,pk.useRef)("u">typeof document?((e=document)=>e.activeElement)(y7(a.current?a.current[0]:void 0)):null),yD(()=>{let e=a.current,t=y7(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!_P||_N(_P,a))&&_T(((e=document)=>e.activeElement)(t),a.current)&&(_P=a)};return t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1))}},[a,l]),yD(()=>{let e=y7(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!_j(a)||t.isComposing)return;let n=e.activeElement;if(!_R(n,a)||!_$(a))return;let r=_K.getTreeNode(a);if(!r)return;let o=r.nodeToRestore,i=_F(e.body,{tabbable:!0});i.currentNode=n;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!_R(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(_R(s,a));(t.preventDefault(),t.stopPropagation(),s)?_A(s,!0):_R(o)?_A(o,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),yD(()=>{let e=y7(a.current?a.current[0]:void 0);if(!s)return;let t=_K.getTreeNode(a);if(t)return t.nodeToRestore=f.current??void 0,()=>{let t=_K.getTreeNode(a);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&_R(r,a)||r===e.body&&_$(a))){let t=_K.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void _L(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&_K.getTreeNode(e.scopeRef))return void _L(_M(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),u=x,c=b,h=pC().useRef(c),(0,pk.useEffect)(()=>{h.current&&(_P=u,!_T(((e=document)=>e.activeElement)(y7(u.current?u.current[0]:void 0)),_P.current)&&u.current&&_I(u.current)),h.current=!1},[u]),(0,pk.useEffect)(()=>{let e=((e=document)=>e.activeElement)(y7(x.current?x.current[0]:void 0)),t=null;if(_T(e,x.current)){for(let n of _K.traverse())n.scopeRef&&_T(e,n.scopeRef.current)&&(t=n);t===_K.getTreeNode(x)&&(_P=t.scopeRef)}},[x]),yD(()=>()=>{let e=_K.getTreeNode(x)?.parent?.scopeRef??null;(x===_P||_N(x,_P))&&(!e||_K.getTreeNode(e))&&(_P=e),_K.removeTreeNode(x)},[x]);let D=(0,pk.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,s=r||((e=document)=>e.activeElement)(y7(n[0]??void 0)),l=n[0].previousElementSibling,u=_F(_C(n),{tabbable:o,accept:a},n);u.currentNode=_T(s,n)?s:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&_A(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,s=r||((e=document)=>e.activeElement)(y7(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=_F(_C(n),{tabbable:o,accept:a},n);u.currentNode=_T(s,n)?s:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&_A(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=_F(_C(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&_A(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=_F(_C(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&_A(a,!0),a}}},[]),O=(0,pk.useMemo)(()=>({focusManager:D,parentNode:E}),[E,D]);return pC().createElement(_D.Provider,{value:O},pC().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,pC().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function _C(e){return e[0].parentElement}function _j(e){let t=_K.getTreeNode(_P);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function _T(e,t){return!!e&&!!t&&t.some(t=>y8(t,e))}function _R(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of _K.traverse(_K.getTreeNode(t)))if(n&&_T(e,n.current))return!0;return!1}function _N(e,t){let n=_K.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function _A(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{gG(e)}catch{}}function _M(e,t=!0){let n=e[0].previousElementSibling,r=_C(e),o=_F(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&((o=_F(r=_C(e),{tabbable:!1},e)).currentNode=n,i=o.nextNode()),i}function _I(e,t=!0){_A(_M(e,t))}function _$(e){let t=_K.getTreeNode(_P);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function _L(e){e.dispatchEvent(new CustomEvent(_O,{bubbles:!0,cancelable:!0}))&&_A(e)}function _F(e,t,n){let r=t?.tabbable?gl:gs,o=y7(e?.nodeType===Node.ELEMENT_NODE?e:null),i=_E(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>y8(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(y7(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=y9(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||_T(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function _B(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(y7(r)),u=_F(r,{tabbable:i,accept:s});y8(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=r,c=u.nextNode()),c&&_A(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=o||((e=document)=>e.activeElement)(y7(r)),u=_F(r,{tabbable:i,accept:s});if(y8(r,l))u.currentNode=l;else{let e=_V(u);return e&&_A(e,!0),e??null}let c=u.previousNode();if(!c&&a){u.currentNode=r;let e=_V(u);if(!e)return null;c=e}return c&&_A(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=_F(r,{tabbable:o,accept:i}).nextNode();return a&&_A(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=_V(_F(r,{tabbable:o,accept:i}));return a&&_A(a,!0),a??null}}}function _V(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class _U{constructor(){this.fastMap=new Map,this.root=new _W({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let o=new _W({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&_T(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.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(){let e=new _U;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class _W{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let _K=new _U;var _H={};function _z(e,t,n){let{direction:r}=bB(),o=(0,pk.useMemo)(()=>_B(t),[t]),i=()=>{if(!t.current)return;let e=window.event?ge(window.event):null,n=_F(t.current,{tabbable:!0});if(e&&(n.currentNode=e,e=n.previousNode()),!e){let t;do(t=n.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=n.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=bi({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return yB(a,{onKeyDown:i=>{if(y8(i.currentTarget,ge(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!n))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=ge(i),n=_G(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===r){if(t.current){let e=ge(i),n=_G(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else o.focusNext()}}})}function _G(e,t,n){let r=_F(e,{tabbable:!0}),o=r.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<a&&(i=o,a=s),o=r.nextNode()}return i}function _q(e){let{description:t,errorMessage:n,isInvalid:r,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=y$(t);let a=y$(),s={};return n&&(r=r?`${a} ${r}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:wn({id:t,"aria-label":o,"aria-labelledby":r})}}(e),s=yL([!!t,!!n,r,o]),l=yL([!!t,!!n,r,o]);return{labelProps:i,fieldProps:a=yB(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function _Z(e,t,n){let r=g9(e=>{n&&!e.defaultPrevented&&n(t)});(0,pk.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",r),()=>{t?.removeEventListener("reset",r)}},[e])}function _Y(e,t,n){let{validationBehavior:r,focus:o}=e;yD(()=>{if("native"===r&&n?.current&&!n.current.disabled){var e;let r,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(o),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,pk.useRef)(!1),a=g9(()=>{i.current||t.resetValidation()}),s=g9(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}(r)===n.current&&(o?o():n.current?.focus(),gP="keyboard",gN("keyboard",null));e.preventDefault()}),l=g9(()=>{t.commitValidation()});(0,pk.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&ge(window.event)instanceof MessagePort,r?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",a),t&&(t.reset=r)}},[n,r])}_H={"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:"Startdatum",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 _J=new WeakMap,_Q="__reactAriaDateFieldRole",_X="__reactAriaDateFieldFocusManager";function _0(e,t,n){var r;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=_q({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=(0,pk.useRef)(null),{focusWithinProps:f}=bp({...e,onFocusWithin(n){p.current=t.value,e.onFocus?.(n)},onBlurWithin:n=>{t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),h=b9((r=_H)&&r.__esModule?r.default:r,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=wm(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[_Q]?u["aria-describedby"]:[g["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[_X],w=(0,pk.useMemo)(()=>v||_B(n),[v,n]),x=_z(t,n,"presentation"===e[_Q]);_J.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let S=(0,pk.useRef)(e.autoFocus);o="presentation"===e[_Q]?{role:"presentation"}:yB(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,pk.useEffect)(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),_Z(e.inputRef,t.defaultValue,t.setValue),_Y({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let D=y3(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:yB(D,o,x,f,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var _1={};_1={"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 Startdatum 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{D6C4}\u{C5EC}\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 _2={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},_4={..._2,customError:!0,valid:!1},_3={isInvalid:!1,validationDetails:_2,validationErrors:[]},_6=(0,pk.createContext)({}),_5="__reactAriaFormValidationState";function _7(e){if(e[_5]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=e[_5];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:n,name:r,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;n&&(t||="invalid"===n);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:_4}:null,u=(0,pk.useMemo)(()=>a&&null!=o?_8(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return _9(n)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,pk.useContext)(_6),d=(0,pk.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>_9(c[e])):_9(c[r]):[],[c,r]),[p,f]=(0,pk.useState)(c),[h,m]=(0,pk.useState)(!1);c!==p&&(f(c),m(!1));let y=(0,pk.useMemo)(()=>_8(h?[]:d),[h,d]),g=(0,pk.useRef)(_3),[b,v]=(0,pk.useState)(_3),w=(0,pk.useRef)(_3),[x,S]=(0,pk.useState)(!1);return(0,pk.useEffect)(()=>{if(!x)return;S(!1);let e=u||i||g.current;xe(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||_3,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||xe(b,e)?g.current=e:v(e)},resetValidation(){xe(_3,w.current)||(w.current=_3,v(_3)),"native"===s&&S(!1),m(!0)},commitValidation(){"native"===s&&S(!0),m(!0)}}}(e)}function _9(e){return e?Array.isArray(e)?e:[e]:[]}function _8(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:_4}:null}function xe(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function xt(...e){let t=new Set,n=!1,r={..._2};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in n||=o.isInvalid,r)r[e]||=o.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let xn=new b2((eu=_1)&&eu.__esModule?eu.default:eu);function xr(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function xo(e,t,n,r,o){let i=null!=e&&null!=n&&e.compare(n)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&r?.(e)||!1,l=i||a||s,u=[];if(l){let e=xr(),r=new b6(e,b2.getGlobalDictionaryForPackage("@react-stately/datepicker")||xn),l=new bG(e,xs({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=n&&u.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(c))})),s&&u.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let xi={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},xa={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function xs(e,t){e={...t.shouldForceLeadingZeros?xa:xi,...e};let n=t.granularity||"minute",r=Object.keys(e),o=r.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=r.indexOf(n);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=r.slice(o,i+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function xl(e){return e&&"hour"in e?e:new vP}function xu(e,t){return null===e?null:e?vB(e,t):void 0}function xc(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,pk.useState)([r,n]);return e&&(o[0]!==r||o[1]!==n)&&i([r,n]),t||(t=e?r:o[0]),[t,e?n:o[1]]}let xd=new b2({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"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},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"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},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");class xp{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,null!=this.hour){let[e,n]=xh(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new xp(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,n]=xh(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,n){let r=this.copy();return r[e]=t,"hour"===e&&null==r.dayPeriod&&"hour"in n&&(r.dayPeriod=xh(n.hour,this.hourCycle)[0]),"year"===e&&null==r.era&&(r.era=n.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in n){let[e,t]=xh(n.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=n[e];return"year"===e&&null==o.era&&(o.era=n.era),o}switch(e){case"era":{let e=this.calendar.getEras(),n=e.indexOf(o.era);n=xf(n,t,0,e.length-1),o.era=e[n];break}case"year":{let r=new vO(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);o.era=(r=r.cycle(e,t,{round:"year"===e})).era,o.year=r.year;break}case"month":o.month=xf(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=xf(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=r.some(e=>["year","month","day"].includes(e));if("timeZone"in n&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(n),[r,i]=xh((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=r,o.offset=e.offset}else{let e=o.hour??0,r=this.getSegmentLimits("hour");o.hour=xf(e,t,r.minValue,r.maxValue),null==o.dayPeriod&&"hour"in n&&(o.dayPeriod=xh(n.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=xf(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=xf(o.minute??0,t,0,59,!0);break;case"second":o.second=xf(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,n){switch(n){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in n&&null!=this.offset&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function xf(e,t,n,r,o=!1){if(o){(e+=Math.sign(t))<n&&(e=r);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function xh(e,t){let n=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":n=null;break;case"h24":e+=1,n=null}return[n,e]}var xm=n(19264);let xy={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},xg={year:5,month:2,day:7,hour:2,minute:15,second:15},xb={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function xv(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,p]=xc(c,e.granularity),f=p||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,pk.useMemo)(()=>{let r=new bG(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[y,g]=_n(e.value,e.defaultValue??null,e.onChange),[b]=(0,pk.useState)(y),v=(0,pk.useMemo)(()=>xu(y,h)??null,[y,h]),[w,x]=(0,pk.useState)(()=>new xp(h,m,v)),S="gregory"===h.identifier&&"BC"===w.era,E=(0,pk.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:p,hideTimeZone:r,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,p,r,S]),D=(0,pk.useMemo)(()=>xs({},E),[E]),O=(0,pk.useMemo)(()=>new bG(t,D),[t,D]),P=(0,pk.useMemo)(()=>O.resolvedOptions(),[O]),k=(0,pk.useMemo)(()=>(function(e,t,n,r){if(e)return xu(e,n);let o=vB(vG(r??vQ()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?vL(o):r?o:vF(o)})(e.placeholderValue,d,h,p),[e.placeholderValue,d,h,p]),C=(0,pk.useMemo)(()=>{let t="h11"===m||"h12"===m,n=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],r=n.indexOf(e.maxGranularity||"era"),o=n.indexOf("hour"===d&&t?"dayPeriod":d);return n.slice(r,o+1)},[e.maxGranularity,d,m]),[j,T]=(0,pk.useState)(v),[R,N]=(0,pk.useState)(h),[A,M]=(0,pk.useState)(m);v===j&&m===A&&vK(h,R)||(w=new xp(h,m,v),T(v),N(h),M(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof xp&&t.isCleared(C))x(new xp(h,m,v)),g(null);else if(t instanceof xp){if(t.isComplete(C)){let e=t.toValue(v??k);if(t.validate(e,C)){let t=vB(e,c?.calendar||new vi);if(!y||0!==t.compare(y)){x(new xp(h,m,v)),g(t);return}}}x(t)}else t=vB(t,c?.calendar||new vi),x(new xp(h,m,v)),g(t)},$=(0,pk.useMemo)(()=>w.toValue(v??k).toDate(f),[w,f,v,k]),L=(0,pk.useMemo)(()=>(function(e,t,n,r,o,i,a){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,xm.K)(i,{useGrouping:!1}),c=new(0,xm.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let n=t[e.type]??0;"2-digit"===r[e.type]?e.value=c.format(n):e.value=u.format(n)}let d=[];for(let e of l){var p;let n=xb[e.type]||e.type,r=xy[n];"era"===n&&1===o.getEras().length&&(r=!1);let l=xy[n]&&null==t[e.type],u=xy[n]?(p=e.value,"era"===n||"dayPeriod"===n?p:"year"===n||"month"===n||"day"===n?xd.getStringForLocale(n,i):"––"):null,c={type:n,text:l?u:e.value,...t.getSegmentLimits(n),isPlaceholder:l,placeholder:u,isEditable:r};"hour"===n?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),n===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(n)&&n===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,O,P,h,t,d),[$,O,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,k,C))},B=(0,pk.useMemo)(()=>xo(y,s,l,u,E),[y,s,l,u,E]),V=_7({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:O,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,xg[e]||1)},decrementPage(e){F(e,-(xg[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,k))},setSegment(e,t){I(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(C)){let e=vB(w.toValue(v??k),c?.calendar||new vi);y&&0===e.compare(y)||g(e),x(new xp(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new bG(t,xs(e,E)).format($):"",getDateFormatter:(e,t)=>new bG(e,xs({},{...E,...t}))}}let xw=(0,pk.createContext)(null),x_=(0,pk.createContext)(null),xx=(0,pk.createContext)(null),xS=(0,pk.forwardRef)(function(e,t){let n=(0,pk.useContext)(x_),r=(0,pk.useContext)(xx);return n||r?pC().createElement(xD,{...e,ref:t}):pC().createElement(xE,{...e,ref:t})}),xE=(0,pk.forwardRef)((e,t)=>{let[n,r]=yH({slot:e.slot},t,xw),{locale:o}=bB(),i=xv({...n,locale:o,createCalendar:w4}),a=(0,pk.useRef)(null),{fieldProps:s,inputProps:l}=_0({...n,inputRef:a},i,r);return pC().createElement(yU,{values:[[x_,i],[_x,{...l,ref:a}],[_w,{...s,ref:r,isInvalid:i.isInvalid}]]},pC().createElement(xD,e))}),xD=(0,pk.forwardRef)((e,t)=>{let{className:n,children:r}=e,o=(0,pk.useContext)(x_),i=(0,pk.useContext)(xx),a=null!=o?o:i;return pC().createElement(pC().Fragment,null,pC().createElement(__,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:a.isInvalid},a.segments.map((e,t)=>(0,pk.cloneElement)(r(e),{key:t}))),pC().createElement(_S,null))});function xO({children:e}){let t=(0,pk.useMemo)(()=>({register:()=>{}}),[]);return pC().createElement(g5.Provider,{value:t},e)}pC().forwardRef(({children:e,...t},n)=>{let r=(0,pk.useRef)(!1),o=(0,pk.useContext)(g5),i=yB(o||{},{...t,register(){r.current=!0,o&&o.register()}});return i.ref=y_(n||o?.ref),gY(o,i.ref),(0,pk.useEffect)(()=>{r.current||(r.current=!0)},[]),pC().createElement(g5.Provider,{value:i},e)});let xP=(0,pk.createContext)({}),xk=pC().createContext(null);function xC(e){let t=yA(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[o,i]=(0,pk.useState)(!1),a=(0,pk.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,pk.useContext)(xP)??{};if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=pC().createElement(_k,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!r},l)),l=pC().createElement(xk.Provider,{value:a},pC().createElement(xO,null,l)),be.createPortal(l,n)}let xj=(0,pk.createContext)(null),xT=(0,pk.createContext)(null),xR=(0,pk.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=yH(e,t,xj);let{dialogProps:r,titleProps:o}=function(e,t){let n,r,{role:o="dialog"}=e,i=yL();i=e["aria-label"]?void 0:i;let a=(0,pk.useRef)(!1);return(0,pk.useEffect)(()=>{if(t.current&&!gt(t.current)){gG(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),gG(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,pk.useContext)(xk),yD(()=>{r?.(!0)},[r=n?.setContain]),(0,pk.useRef)(!1),(0,pk.useEffect)(()=>{}),{dialogProps:{...y3(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":n},t),i=(0,pk.useContext)(xT);r["aria-label"]||r["aria-labelledby"]||(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=yW({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return pC().createElement("section",{...y3(e),...r,...a,ref:t,slot:e.slot||void 0},pC().createElement(yU,{values:[[bE,{slots:{[yV]:{},title:{...o,level:2}}}],[bx,{slots:{[yV]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),xN=(0,pk.createContext)(null),xA=(0,pk.forwardRef)(function(e,t){let n=(0,pk.useContext)(xN);return(null==n?void 0:n.isInvalid)?pC().createElement(xM,{...e,ref:t}):null}),xM=(0,pk.forwardRef)((e,t)=>{let n=(0,pk.useContext)(xN),r=y3(e),o=yW({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==o.children?null:pC().createElement(bO,{slot:"errorMessage",...r,...o,ref:t})}),xI=(0,pk.createContext)(null),x$=(0,pk.createContext)({}),xL=bw(function(e,t){[e,t]=yH(e,t,x$);let{elementType:n="label",...r}=e;return pC().createElement(n,{className:"react-aria-Label",...r,ref:t})}),xF=(0,pk.createContext)({placement:"bottom"}),xB="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,xV=new WeakMap,xU=[];function xW(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function xK(e,t){let n=e,r=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(r=o.length-e)}if(r>0){let e=Math.pow(10,r);n=Math.round(n*e)/e}return n}function xH(e,t,n,r){t=Number(t),n=Number(n);let o=(e-(isNaN(t)?0:t))%r,i=xK(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(xK(n/r,r))*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor(xK((n-t)/r,r))*r),i=xK(i,r)}let xz={top:"top",bottom:"top",left:"left",right:"left"},xG={top:"bottom",bottom:"top",left:"right",right:"left"},xq={top:"left",left:"top"},xZ={top:"height",left:"width"},xY={width:"totalWidth",height:"totalHeight"},xJ={};function xQ(e,t){let n=0,r=0,o=0,i=0,a=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;o=u.clientWidth,i=u.clientHeight,n=t?.width??o,r=t?.height??i,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:n,height:r,top:a,left:s}=x3(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,o=n,i=r;return g_()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:l,top:a,left:s}}function xX(e,t,n,r,o,i,a){let s=o.scroll[e]??0,l=r[xZ[e]],u=a[e]+r.scroll[xz[e]]+i,c=a[e]+r.scroll[xz[e]]+l-i,d=t-s+r.scroll[xz[e]]+a[e]-r[xz[e]],p=t-s+n+r.scroll[xz[e]]+a[e]-r[xz[e]];return d<u?u-d:p>c?Math.max(c-p,u-d):0}function x0(e){if(xJ[e])return xJ[e];let[t,n]=e.split(" "),r=xz[t]||"right",o=xq[r];xz[n]||(n="center");let i=xZ[r],a=xZ[o];return xJ[e]={placement:t,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:a},xJ[e]}function x1(e,t,n,r,o,i,a,s,l,u,c){let{placement:d,crossPlacement:p,axis:f,crossAxis:h,size:m,crossSize:y}=r,g={};g[h]=e[h]??0,"center"===p?g[h]+=((e[y]??0)-(n[y]??0))/2:p!==h&&(g[h]+=(e[y]??0)-(n[y]??0)),g[h]+=i;let b=e[h]-n[y]+l+u,v=e[h]+e[y]-l-u;if(g[h]=xW(g[h],b,v),d===f){let t=s?c[m]:c[xY[m]];g[xG[f]]=Math.floor(t-e[f]+o)}else g[f]=Math.floor(e[f]+e[m]+o);return g}function x2(e,t,n,r,o,i,a,s){let{placement:l,axis:u,size:c}=i;return l===u?Math.max(0,n[u]-(a.scroll[u]??0)-(e[u]+(s?t[u]:0))-(r[u]??0)-r[xG[u]]-o):Math.max(0,e[c]+e[u]+(s?t[u]:0)-n[u]-n[c]+(a.scroll[u]??0)-(r[u]??0)-r[xG[u]]-o)}function x4(e,t){let{top:n,left:r,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:n,left:r,width:o,height:i}}function x3(e,t){let{top:n,left:r,width:o,height:i}=x4(e,t),{scrollTop:a,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:n+a-l,left:r+s-u,width:o,height:i}}function x6(e,t,n){let r,o=window.getComputedStyle(e);if("fixed"===o.position)r=x4(e,n);else{r=x3(e,n);let o=x3(t,n),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=o.top,r.left-=o.left}return r.top-=parseInt(o.marginTop,10)||0,r.left-=parseInt(o.marginLeft,10)||0,r}function x5(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 x7=new WeakMap;function x9(e){let{ref:t,box:n,onResize:r}=e,o=g9(r);(0,pk.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[t,n])}let x8="u">typeof document?window.visualViewport:null;function Se(e,t){if(e.button>0)return!1;let n=ge(e);if(n){let e=n.ownerDocument;if(!e||!y8(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let St=[],Sn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Sr(e){return e instanceof HTMLInputElement&&!Sn.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let So="u">typeof document&&window.visualViewport,Si=0;function Sa(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ss(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Sl(e,t){t||!So?Su(e):So.addEventListener("resize",()=>Su(e),{once:!0})}function Su(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=wu(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;So&&(n=Math.min(n,So.offsetTop+So.height));let o=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}n=e.parentElement}}var Sc={};function Sd(e){var t;let{onDismiss:n,...r}=e,o=wn(r,b9((t=Sc)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return pC().createElement(wa,null,pC().createElement("button",{...o,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function Sp(e,t,n){yD(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||(0,be.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}Sc={"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 Sf=null,Sh=new Set,Sm=new Map,Sy=!1,Sg=!1;function Sb(e,t){for(let n of Sh)n(e,t)}function Sv(e){Sy=!0,e.metaKey||!gg()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Sf="keyboard",Sb("keyboard",e))}function Sw(e){Sf="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(Sy=!0,Sb("pointer",e))}function S_(e){gD(e)&&(Sy=!0,Sf="virtual")}function Sx(e){e.target!==window&&e.target!==document&&e.isTrusted&&(Sy||Sg||(Sf="virtual",Sb("virtual",e)),Sy=!1,Sg=!1)}function SS(){Sy=!1,Sg=!0}function SE(e){if("u"<typeof window||Sm.get(y9(e)))return;let t=y9(e),n=y7(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Sy=!0,r.apply(this,arguments)},n.addEventListener("keydown",Sv,!0),n.addEventListener("keyup",Sv,!0),n.addEventListener("click",S_,!0),t.addEventListener("focus",Sx,!0),t.addEventListener("blur",SS,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",Sw,!0),n.addEventListener("pointermove",Sw,!0),n.addEventListener("pointerup",Sw,!0)):(n.addEventListener("mousedown",Sw,!0),n.addEventListener("mousemove",Sw,!0),n.addEventListener("mouseup",Sw,!0)),t.addEventListener("beforeunload",()=>{SD(e)},{once:!0}),Sm.set(t,{focus:r})}let SD=(e,t)=>{let n=y9(e),r=y7(e);t&&r.removeEventListener("DOMContentLoaded",t),Sm.has(n)&&(n.HTMLElement.prototype.focus=Sm.get(n).focus,r.removeEventListener("keydown",Sv,!0),r.removeEventListener("keyup",Sv,!0),r.removeEventListener("click",S_,!0),n.removeEventListener("focus",Sx,!0),n.removeEventListener("blur",SS,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",Sw,!0),r.removeEventListener("pointermove",Sw,!0),r.removeEventListener("pointerup",Sw,!0)):(r.removeEventListener("mousedown",Sw,!0),r.removeEventListener("mousemove",Sw,!0),r.removeEventListener("mouseup",Sw,!0)),Sm.delete(n))};function SO(e){let[t,n]=_n(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,pk.useCallback)(()=>{n(!0)},[n]),o=(0,pk.useCallback)(()=>{n(!1)},[n]),i=(0,pk.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:o,toggle:i}}"u">typeof document&&("loading"!==(m=y7(void 0)).readyState?SE(void 0):m.addEventListener("DOMContentLoaded",()=>{SE(void 0)}));let SP=(0,pk.createContext)(null),Sk=(0,pk.createContext)(null),SC=(0,pk.forwardRef)(function(e,t){[e,t]=yH(e,t,SP);let n=(0,pk.useContext)(xT),r=SO(e),o=null==e.isOpen&&null==e.defaultOpen&&n?n:r,i=function(e,t){let[n,r]=(0,pk.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let o="exiting"===n;return Sp(e,o,(0,pk.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,pk.useContext)(bv),{direction:s}=bB();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),pC().createElement(pC().Fragment,null,t)}return!o||o.isOpen||i?pC().createElement(Sj,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function Sj({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var o,i;let a=(0,pk.useRef)(null),[s,l]=(0,pk.useState)(0),u=(0,pk.useRef)(null),c=(0,pk.useContext)(Sk),p=c&&"SubmenuTrigger"===r.trigger;yD(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:p}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,l=(0,pk.useRef)(void 0);(0,pk.useEffect)(()=>{if(o&&!St.includes(t))return St.push(t),()=>{let e=St.indexOf(t);e>=0&&St.splice(e,1)}},[o,t]);let u=()=>{St[St.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e,i=(0,pk.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=g9(e=>{n&&Se(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=g9(e=>{n&&n(e)});(0,pk.useEffect)(()=>{let e=i.current;if(r)return;let n=y7(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&Se(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",a,!0),n.addEventListener("click",r,!0),()=>{n.removeEventListener("pointerdown",a,!0),n.removeEventListener("click",r,!0)}}},[t,r])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(ge(e)))&&(St[St.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=St[St.length-1];l.current=n,(!s||s(ge(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=bp({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||_R(e.relatedTarget,_P))&&(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??r),{overlayProps:f,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:n}=bB(),{arrowSize:r,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:p=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,pk.useState)(null),x=[h,l,i.current,o.current,a?.current,s.current,u,c,d,p,f,m,n,g,b,r],S=(0,pk.useRef)(x8?.scale);(0,pk.useEffect)(()=>{m&&(S.current=x8?.scale)},[m]);let E=(0,pk.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||x8?.scale!==S.current)return;let t=null;if(s.current&&gt(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),n=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-n.top}).offset>n.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-n.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,n,{placement:r,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:p,arrowSize:f=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!x5(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!x5(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?x3(o,!1):x6(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=x3(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let S=xQ(u,m),E=xQ(y,m);if("BODY"!==u.tagName&&"HTML"!==u.tagName||g)n=("BODY"===u.tagName||"HTML"===u.tagName)&&g?{top:0,left:0,width:0,height:0}:x6(u,y,!1);else{let e=x4(y,!1);n={top:-(e.top-S.top),left:-(e.left-S.left),width:0,height:0}}return function(e,t,n,r,o,i,a,s,l,u,c,d,p,f,h,m,y){var g,b,v;let w,x,S,E=x0(e),{size:D,crossAxis:O,crossSize:P,placement:k,crossPlacement:C}=E,j=x1(t,a,n,E,u,c,l,d,f,h,s),T=u,R=x2(a,l,t,r,o+u,E,s,m);if(i&&n[D]>R){let e=x0(`${xG[k]} ${C}`),i=x1(t,a,n,e,u,c,l,d,f,h,s);x2(a,l,t,r,o+u,e,s,m)>R&&(E=e,j=i,T=u)}let N="bottom";"top"===E.axis?"top"===E.placement?N="top":"bottom"===E.placement&&(N="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?N="bottom":"bottom"===E.crossPlacement&&(N="top"));let A=xX(O,j[O],n[P],a,s,o,l);j[O]+=A;let M=(g=j,b=n.height,v=N,w=(null!=g.top?g.top:s[xY.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?l.top:0,S={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,S.bottom-w-((r.top??0)+(r.bottom??0)+o)):Math.max(0,w+b-S.top-((r.top??0)+(r.bottom??0)+o)));p&&p<M&&(M=p),n.height=Math.min(n.height,M),A=xX(O,(j=x1(t,a,n,E,T,c,l,d,f,h,s))[O],n[P],a,s,o,l),j[O]+=A;let I={},$=t[O]-j[O]-r[xz[O]],L=$+.5*t[P],F=f/2+h,B="left"===xz[O]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),V=n[P]-B-f/2-h,U=xW(L,t[O]+f/2-(j[O]+r[xz[O]]),t[O]+t[P]-f/2-(j[O]+r[xz[O]]));I[O]=xW(U,F,V),({placement:k,crossPlacement:C}=E),f?$=I[O]:"right"===C?$+=t[P]:"center"===C&&($+=t[P]/2);let W="left"===k||"top"===k?n[D]:0,K={x:"top"===k||"bottom"===k?$:W,y:"left"===k||"right"===k?$:W};return{position:j,maxHeight:M,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:k,triggerAnchorPoint:K}}(r,v,w,x,s,l,S,E,n,c,d,!!b&&"static"!==b,p,f,h,y8(u,y),m)}({placement:(e=l,"rtl"===n?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:p,crossOffset:f,maxHeight:g,arrowSize:r??(a?.current?x4(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),n=s.current.getBoundingClientRect(),r=e[t.type]-n[t.type];s.current.scrollTop+=r-t.offset}w(v)},x);yD(E,x),yD(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),x9({ref:i,onResize:E}),x9({ref:o,onResize:E});let D=(0,pk.useRef)(!1);yD(()=>{let e,t=()=>{D.current=!0,clearTimeout(e),e=setTimeout(()=>{D.current=!1},500),E()},n=()=>{D.current&&t()};return x8?.addEventListener("resize",t),x8?.addEventListener("scroll",n),()=>{x8?.removeEventListener("resize",t),x8?.removeEventListener("scroll",n)}},[E]);let O=(0,pk.useCallback)(()=>{D.current||y?.()},[y,D]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,pk.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=ge(e);if(!t.current||n instanceof Node&&!y8(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let o=r||x7.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:o,isOpen:m,onClose:y&&O}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;yD(()=>{if(!t){let e,t,n,r,o,i,a,s;return 1==++Si&&(d=gw()?(t=Sa(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(o=g6())&&(r.nonce=o),r.textContent=`
39
39
  @layer {
40
40
  * {
41
41
  overscroll-behavior: contain;
42
42
  }
43
- }`.trim(),document.head.prepend(r),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&Sa(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||Sd(this,n)},a=yP(Sc(document,"touchstart",t=>{let r=gr(t);e=wd(r)?r:wp(r,!0),n=!1;let o=r.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),Sc(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),Sc(document,"blur",e=>{let t=gr(e),n=e.relatedTarget;if(n&&Sa(n))n.focus({preventScroll:!0}),Sd(n,Sa(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),r.remove(),HTMLElement.prototype.focus=i}):yP((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?Su(document.documentElement,"scrollbarGutter","stable"):Su(document.documentElement,"paddingRight",`${s}px`)),Su(document.documentElement,"overflow","hidden"))),()=>{0==--Sl&&d()}}},[t])}({isDisabled:i||!t.isOpen}),(0,pT.useEffect)(()=>{if(t.isOpen&&r.current)if(i){var e,n,a=o?.current??r.current;let t=xz[xz.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,p,f,h;return e=[o?.current??r.current],i=(n={shouldUseInert:!0})instanceof(t=gt(e?.[0])).Element?{root:n}:n,a=i?.root??document.body,s=i?.shouldUseInert&&xW,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(gn(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=_P(ge(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&p(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)p(e),e=n.nextNode()}},p=e=>{let n=xK.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),xK.set(e,n+1))},xz.length&&xz[xz.length-1].disconnect(),d(a),(f=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>gn(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){f.observe(a,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}},xz.push(h),()=>{for(let e of(f.disconnect(),u)){let t=xK.get(e);null!=t&&(1===t?(c(e,!1),xK.delete(e)):xK.set(e,t-1))}h===xz[xz.length-1]?(xz.pop(),xz.length&&xz[xz.length-1].observe()):xz.splice(xz.indexOf(h),1)}}},[i,t.isOpen,r,o]),{popoverProps:yW(c,f),arrowProps:h,underlayProps:p,placement:m,triggerAnchorPoint:y}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:p?c:u},e),g=r.popoverRef,b=function(e,t=!0){let[n,r]=(0,pT.useState)(!0),o=n&&t;return yk(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),Sm(e,o,(0,pT.useCallback)(()=>r(!1),[])),o}(g,!!y)||r.isEntering||!1,v=yH({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!r.isNonModal||"SubmenuTrigger"===r.trigger,[x,S]=(0,pT.useState)(!1);yk(()=>{g.current&&S(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,pT.useEffect)(()=>{var e;let t,n;x&&g.current&&!g.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=ge(e=g.current)),"virtual"===Sy?gZ(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&y9(e)}):y9(e))},[x,g]);let E={...f.style,...v.style},D=pR().createElement("div",{...yW(y7(r),f),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:g,slot:r.slot||void 0,style:E,dir:r.dir,"data-trigger":r.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!r.isNonModal&&pR().createElement(Sh,{onDismiss:e.close}),pR().createElement(xU.Provider,{value:{...m,placement:y,ref:a}},v.children),pR().createElement(Sh,{onDismiss:e.close}));return p?pR().createElement(xR,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=n?n:null==c?void 0:c.current)?i:void 0},D):pR().createElement(xR,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&pR().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),pR().createElement("div",{ref:u,style:{display:"contents"}},pR().createElement(ST.Provider,{value:u},D)))}function SN(e){return e?.start!=null&&null!=e.end}let SA=(0,pT.createContext)(null),SI=(0,pT.createContext)(null),S$=(0,pT.createContext)(null),SL=(0,pT.createContext)(null),SF=(0,pT.forwardRef)(function(e,t){var n,r;[e,t]=yG(e,t,SA);let{validationBehavior:o}=yq(xF)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){let t=SC(e),[n,r]=_i(e.value,e.defaultValue||null,e.onChange),[o]=(0,pT.useState)(n),i=n||e.placeholderValue||null,[a,s]=xf(i,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,p]=(0,pT.useState)(null),[f,h]=(0,pT.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=n?.calendar.identifier==="gregory"&&"BC"===n.era,y=(0,pT.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,pT.useMemo)(()=>xs(n,g,b,v,y),[n,g,b,v,y]),x=xe({...e,value:n,builtinValidation:w}),S=x.displayValidation.isInvalid,E=e.validationState||(S?"invalid":null),D=(e,t)=>{r("timeZone"in t?t.set(vV(e)):vU(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:n,defaultValue:e.defaultValue??o,setValue:r,dateValue:d,timeValue:f,setDateValue:n=>{let o="function"==typeof c?c():c;u?f||o?D(n,f||xd(e.defaultValue||e.placeholderValue)):p(n):(r(n),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&D(d,f||xd(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:E,isInvalid:S,formatValue:(e,t)=>l?new bY(e,xc(t,y)).format(l):"",getDateFormatter:(e,t)=>new bY(e,xc({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,pT.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,n){var r;let o=yB(),i=yB(),a=yB(),s=vt((r=_G)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=_J({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=_Z(t,n),y=p["aria-labelledby"]||p.id,{locale:g}=bW(),b=t.formatValue(g,{month:"long"}),v=wb(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=y7(e),S=(0,pT.useMemo)(()=>_W(n),[n]),E=(0,pT.useRef)(!1),{focusWithinProps:D}=bm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{gn(document.getElementById(i),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:yW(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...d,onClick:()=>{S.focusFirst()}},fieldProps:{...p,id:a,[_1]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,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,[_8]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...yY(e),label:u,validationBehavior:i},a,s),[v,w]=(0,pT.useState)(null),x=(0,pT.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);St({ref:s,onResize:x});let{focusProps:S,isFocused:E,isFocusVisible:D}=by({within:!0}),O=yH({...e,values:{state:a,isFocusWithin:E,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=y7(e);return delete P.id,pR().createElement(yz,{values:[[S$,a],[_S,{...c,ref:s,isInvalid:a.isInvalid}],[xS,p],[bD,{...f,isPressed:a.isOpen}],[xB,{...d,ref:l,elementType:"span"}],[_d,m],[xN,a],[Sj,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[xM,h],[bk,{slots:{description:y,errorMessage:g}}],[xI,b]]},pR().createElement("div",{...S,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),SB=(0,pT.forwardRef)(function(e,t){var n,r;[e,t]=yG(e,t,SI);let{validationBehavior:o}=yq(xF)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){let t=SC(e),[n,r]=_i(e.value,e.defaultValue||null,e.onChange),[o]=(0,pT.useState)(n),[i,a]=(0,pT.useState)(()=>n||{start:null,end:null});null==n&&i.start&&i.end&&a(i={start:null,end:null});let s=n||i,l=e=>{a(s=e||{start:null,end:null}),SN(s)?r(s):r(null)},[u,c]=xf(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,p=e.shouldCloseOnSelect??!0,[f,h]=(0,pT.useState)(null),[m,y]=(0,pT.useState)(null);s&&SN(s)&&(f=s,"hour"in s.start&&(m=s));let g=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(vV(e.start)):vU(e.start,t.start),end:"timeZone"in t.end?t.end.set(vV(e.end)):vU(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=n=>{let r="function"==typeof p?p():p;d?SN(n)&&(r||m?.start&&m?.end)?g(n,{start:m?.start||xd(e.placeholderValue),end:m?.end||xd(e.placeholderValue)}):h(n):SN(n)?(l(n),P.commitValidation()):h(n),r&&t.setOpen(!1)},v=e=>{SN(f)&&SN(e)?g(f,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,pT.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:S,maxValue:E,isDateUnavailable:D}=e,O=(0,pT.useMemo)(()=>{var e;let t;return e=s,t=xo(xs(e?.start??null,S,E,D,x),xs(e?.end??null,S,E,D,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=xo(t,{isInvalid:!0,validationErrors:[(b6.getGlobalDictionaryForPackage("@react-stately/datepicker")||xi).getStringForLocale("rangeReversed",xa())],validationDetails:{..._6,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,S,E,D,x]),P=xe({...e,value:n,name:(0,pT.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),k=P.displayValidation.isInvalid,C=e.validationState||(k?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:f,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:f?.end??null}):b({start:f?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&SN(f)&&d&&g(f,{start:m?.start||xd(e.placeholderValue),end:m?.end||xd(e.placeholderValue)}),t.setOpen(n)},validationState:C,isInvalid:k,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=xc(n,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),p=new bY(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let o=0;o<e.length;o++)o<t?n+=e[o].value:o>t&&(r+=e[o].value);return{start:n,end:r}}catch{}r=p}else r=new bY(t,xc(n,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new bY(e,xc({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,pT.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,n){var r;let o=vt((r=_G)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=_J({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=u["aria-labelledby"]||u.id,{locale:f}=bW(),h=t.formatValue(f,{month:"long"}),m=wb(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":p},g={"aria-label":o.format("endDate"),"aria-labelledby":p},b=yB(),v=yB(),w=_Z(t,n),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,pT.useMemo)(()=>_W(n,{accept:e=>e.id!==b}),[n,b]),E={[_2]:S,[_1]:"presentation","aria-describedby":x,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},D=y7(e),O=(0,pT.useRef)(!1),{focusWithinProps:P}=bm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{gn(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),k=(0,pT.useRef)(_7),C=(0,pT.useRef)(_7);return{groupProps:yW(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${p}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${p}`},startFieldProps:{...y,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[_8]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(xo(e,C.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[_8]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(xo(k.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...yY(e),label:u,validationBehavior:i},a,s),[w,x]=(0,pT.useState)(null),S=(0,pT.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);St({ref:s,onResize:S});let{focusProps:E,isFocused:D,isFocusVisible:O}=by({within:!0}),P=yH({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=y7(e);return delete k.id,pR().createElement(yz,{values:[[SL,a],[_S,{...c,ref:s,isInvalid:a.isInvalid}],[bD,{...h,isPressed:a.isOpen}],[xB,{...d,ref:l,elementType:"span"}],[_p,y],[xN,a],[Sj,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[xM,m],[xS,{slots:{start:p,end:f}}],[bk,{slots:{description:g,errorMessage:b}}],[xI,v]]},pR().createElement("div",{...E,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function SV(e){return pR().createElement(bU,e)}function SU(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof vC||e instanceof vT||e instanceof vR)return t?vW(e,t):e;{let n=hd()(e).toDate(),r=new vC(n.getFullYear(),n.getMonth()+1,n.getDate());return t?vW(r,t):r}}function SW(e){if(e)return e.toDate(v1())}function SK(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function Sz(e){let t=e??"",n=SK(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function SH(){let e=window.i18next.language,t=SK(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ec=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ec=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Sq=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ec||"en-US"),SG=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},SZ={};for(let e=1;e<100;e++)SZ[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var SY={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},SJ="[1234567890一二三四五六七八九〇\\d]",SQ={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},SX={},S0={"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},S1={zone:S0,year:SZ,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:{}},S2={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(S0).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,}"},S4={...S2,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}"},S3={},S6=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Sq){return S3[t.toLowerCase()]||(S3[t.toLowerCase()]=new e(t)),S3[t.toLowerCase()]}constructor(e=Sq){this.locale=e,this.lookups={...S1},this.vars={...S2};let 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 n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);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 n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}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,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=SQ: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(SX[e])return SX[e];if("fullwide"===e||"hanidec"===e)return{group:SJ,lookup:{...SQ}};let t=SY[e];if(!t)return{group:"\\d",lookup:{...SQ}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return SX[e]={group:`[${n}-${r}]`,lookup:o},SX[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,S4)S4.hasOwnProperty(n)&&(this.vars[n]=S4[n].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((n,r)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(n[a]).find(r).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]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(n[i]).find(r).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+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 n=[],r={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=a}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);n.push(s),r[s]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}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")}},S5=["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"],S7={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},S9=()=>new Date;function S8(e){return function(t){let n={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(n[o]=t[r])}return n}}var Ee=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;r=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},Et=["year","month","day","hour","minute","second","millisecond","offset"],En={};function Er(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 Eo=[[/([^\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"]],Ei={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," "],...Eo],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:Eo,id:Eo,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ea(e,t=Sq){let n=function(e){if(!En[e]){var t,n;let r,o,i=S6.factory(e);En[e]=new Ee({doneChecker:Er,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:S8(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:S8(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:S8(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${SJ}{2,4})\\s*\u5E74\\s*(${SJ}{1,2})\\s*\u6708\\s*(${SJ}{1,2})\\s*\u65E5$`),handler:S8(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:S8(["","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:S8(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=S9(),n=e[1].toLowerCase();switch(n){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let r={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===n&&(r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()),console.log("today=>",n,r),r}},{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,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?S7[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let o=S9();return"millisecond"===n?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===n?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===n?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===n?o.setUTCHours(o.getUTCHours()+t):"day"===n?o.setUTCDate(o.getUTCDate()+t):"month"===n?o.setUTCMonth(o.getUTCMonth()+t):"year"===n&&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:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:S8(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:S8(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:S8(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:S8(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:S8(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:S8(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:S8(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:S8(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:S8(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:S8(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:S8(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:S8(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:S8(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:S8(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:S8(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:S8(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:S8(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:S8(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:S8(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:S8(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:S8(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:S8(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:S8(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:S8(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:S8(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:S8(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:S8(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:S8(["zone"])}],o=i.baseName.slice(0,5),S5.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=i,function(e){let t={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=n.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(o,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(o){let e=n.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(Et.includes(r)){let e=n.toInt(o);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=SZ[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return En[e]}(t),r=function(e,t){let n=Ei[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function Es(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new SG(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 SG(t.valueOf()-60*e.offset*1e3):t}function El(e,t=Sq){let n=Ea(e,t),r=n.invalid?new SG(NaN):Es(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function Eu(e,t=Sq){return e instanceof Date?new SG(e.valueOf()):"number"==typeof e?new SG(e):El(e,t)}Date.fromString=SG.fromString=El,Date.fromAny=SG.fromAny=Eu,"u">typeof window&&(window.anyDateParser={fromString:El,fromAny:Eu,fromObject:Es,attempt:Ea});var Ec=n(44397),Ed=n(57657);let Ep=function(e){return null==e};function Ef(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}hd().extend(hp),hd().extend(Ed),hd().extend(Ec);let Eh="YYYY-MM-DDTHH:mm:ss.SSSZZ";function Em(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&hd()(e,Eh).isValid()}function Ey(e){return hd()(e).isToday()}function Eg(e){return Em(e)?hd()(e,Eh).toDate():null}function Eb(e,t=!1){let n=hd()(e);return t&&(n=n.utc()),n.format(Eh)}function Ev(e){return hd()(e).toDate()}var Ew=new WeakMap;let E_=new class{register(e,t){Ef(this,Ew).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,Ew).has(t))return Ef(this,Ew).get(t)}if(e.language&&Ef(this,Ew).has(e.language))return Ef(this,Ew).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Ef(this,Ew).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,Ew,{writable:!0,value:new Map})}};function Ex(e,t){E_.register(e,t)}function ES(e){let t=e??SH();return E_.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EE={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function ED(e,t={}){let n=Ea(e,SH());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!Ep(n.day)&&Ep(n.month)&&(n=Object.assign({},tP(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tP(n,"day"),{date:n.day}));let r=hd()().set(n).toDate();return Ep(n.year)&&(t.year=!1),Ep(n.month)&&(t.month=!1),Ep(n.date)&&(t.day=!1),EO(r,t)}function EO(e,t){let n,r=t?.locale??SH(),o=new Intl.Locale(r),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...EE,...{noToday:"am"===o.language},...t},f={calendar:i??ES(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=hd()(e).isToday();if(h&&!d)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===o.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(EP("-"))),"wide"==a&&(t=t.map(EP(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(n+=`, ${Ek(e)}`),n}let EP=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function Ek(e){return e.toLocaleTimeString(SH(),{hour:"2-digit",minute:"2-digit"})}function EC(e,t){return EO(e,{...t,time:!0})}function Ej(e,t){let n=ES("string"==typeof t?new Intl.Locale(t):t);return n?vW(e,w5(n)):e}function ET(e,t){return new Intl.DurationFormat(SH(),t).format(e)}function ER(e,t){if(null==e)return null;if("string"==typeof e){let n=Ea(e,SH());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tP(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tP(n,"day"),...{date:n.day}}),hd()(t).set(n))}return hd()(e)}let EM=["years","months","days","hours","minutes","seconds"],EN={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},EA={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function EI(e,t=hd()(),n){let r,o=hd()(t),i=ER(e,o);if(null==i)return null;if("string"==typeof n){let e=EN[n]??n;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?EN[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=EM.indexOf(n);for(let o=0;o<EM.length;o++){let i=EM[o];if(t.diff(e,i)>0)return o<=r?i:n}return n}(i,o,t??"seconds"):EN[s]??s,function(e,t,n,r){let o=EM.indexOf(n),i=EM.indexOf(r),a=EM.slice(o,i+1),s={},l=e;for(let e of a){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(i,o,e,t??e)}let u=(r=function(e){let t={...EA};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[EN[n]??n]=r);return t}(a),o.diff(i,"seconds")<r.seconds?"seconds":o.diff(i,"minutes")<r.minutes?"minutes":o.diff(i,"hours")<r.hours?"hours":o.diff(i,"days")<r.days?"days":o.diff(i,"months")<r.months?"months":"years");return{[u]:o.diff(i,u)}}let E$={style:"short",localeMatcher:"lookup"};function EL(e,t=hd()(),n){let r=EI(e,t,n);return null==r?null:ET(r,"object"==typeof n&&n.formatOptions?{...E$,...n.formatOptions}:E$)}let EF=(0,pT.createContext)(null);function EB(){let e=fj({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,pT.useMemo)(()=>{let t=SH();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,pT.useMemo)(()=>{let e=ES(t);return void 0!==e?w5(e):void 0},[t]),r=(0,pT.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),o=(0,pT.useMemo)(()=>n?vW(vJ(v1()),n):vJ(v1()),[n]);return{calendar:n,intlLocale:r,today_:o}}let EV=new vC(1793,1,1);var EU={};function EW(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function EK(e={}){let{locale:t}=bW();return(0,pT.useMemo)(()=>new(0,xb.K)(t,e),[t,e])}EU={"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 Ez={};Ez={"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:"空白"}};let EH=()=>{};function Eq(e){var t;let n=(0,pT.useRef)(void 0),{value:r,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=vt((t=Ez)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,pT.useRef)(!1),b=(0,pT.useCallback)(()=>{clearTimeout(n.current),g.current=!1},[]),v=bt(()=>{b()});(0,pT.useEffect)(()=>()=>v(),[]);let w=(0,pT.useRef)(!1),x=()=>{w.current=!0},S=()=>{w.current=!1},E=""===o?y.format("Empty"):(o||`${r}`).replace("-","−");(0,pT.useEffect)(()=>{w.current&&(bK&&bK.clear("assertive"),bz(E,"assertive"))},[E]);let D=(0,pT.useCallback)(()=>{b()},[b]),O=bt(c??EH),P=bt(p??EH),k=bt(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r<a)&&(O(),C(60))}),C=bt(e=>{v(),g.current=!0,n.current=window.setTimeout(k,e)}),j=bt(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r>i)&&(P(),T(60))}),T=bt(e=>{v(),g.current=!0,n.current=window.setTimeout(j,e)}),R=e=>{e.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:N}=bn(),A=(0,pT.useRef)(!1),[I,$]=(0,pT.useState)(null);(0,pT.useEffect)(()=>{"touch"===I?C(600):I&&C(400)},[I]);let[L,F]=(0,pT.useState)(null);return(0,pT.useEffect)(()=>{"touch"===L?T(600):L&&T(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":E,"aria-valuemin":i,"aria-valuemax":a,"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&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(f){e.preventDefault(),f?.();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),p?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(M(window,"pointercancel",D,{capture:!0}),A.current=!1,$("touch")),M(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(A.current=!0),N(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&A.current&&c?.(),A.current=!1,$(null)},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(p?.(),F("mouse")):(M(window,"pointercancel",D,{capture:!0}),A.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(A.current=!0),N(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&A.current&&p?.(),A.current=!1,F(null)},onFocus:x,onBlur:S}}}let EG=null;var EZ=n(72103);function EY(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let o=t.toString().split("."),i=n.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),n=Math.round(n*a),r=("+"===e?t+n:t-n)/a}return r}let EJ=(0,pT.createContext)(null),EQ=(0,pT.createContext)(null),EX=(0,pT.forwardRef)(function(e,t){var n,r;[e,t]=yG(e,t,EJ);let{validationBehavior:o}=yq(xF)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",{locale:a}=bW(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let p=(0,pT.useCallback)(e=>void 0===r||isNaN(r)?xH(e,t,n):xG(e,t,n,r),[r,t,n]);void 0===i||isNaN(i)||"snap"!==d||(i=p(i)),isNaN(a)||"snap"!==d||(a=p(a));let[f,h]=_i(i,isNaN(a)?NaN:a,s),[m]=(0,pT.useState)(f),[y,g]=(0,pT.useState)(()=>isNaN(f)?"":new(0,xb.K)(l,o).format(f)),b=(0,pT.useMemo)(()=>new(0,EZ.d)(l,o),[l,o]),v=(0,pT.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,pT.useMemo)(()=>new(0,xb.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,pT.useMemo)(()=>w.resolvedOptions(),[w]),S=(0,pT.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=xe({...e,value:f}),D=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(D=.01);let[O,P]=(0,pT.useState)(f),[k,C]=(0,pT.useState)(l),[j,T]=(0,pT.useState)(o);Object.is(f,O)&&l===k&&o===j||(g(S(f)),P(f),C(l),T(o));let R=(0,pT.useMemo)(()=>b.parse(y),[b,y]),M=(e,r=0)=>{if(isNaN(R))return xG(isNaN(r)?0:r,t,n,D);{let r=xG(R,t,n,D);return"+"===e&&r>R||"-"===e&&r<R?r:xG(EY(e,R,D),t,n,D)}},N=(0,pT.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===n||isNaN(n)||xG(R,t,n,D)>R||EY("+",R,D)<=n),[u,c,t,n,D,R]),A=(0,pT.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||xG(R,t,n,D)<R||EY("-",R,D)>=t),[u,c,t,n,D,R]);return{...E,validate:e=>b.isValidPartialNumber(e,t,n),increment:()=>{let e=M("+",t);e===f&&g(S(e)),h(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(h(xG(n,t,n,D)),E.commitValidation())},decrement:()=>{let e=M("-",n);e===f&&g(S(e)),h(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),E.commitValidation())},canIncrement:N,canDecrement:A,minValue:t,maxValue:n,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,n=R;if(void 0!==e&&(n=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":S(f));return}if(isNaN(n))return void g(S(f));let r="snap"===d?p(n):n,o=(r=b.parse(S(r)))!==f;h(r),g(S(void 0===i?r:f)),o&&E.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,pT.useRef)(null),[u,c]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,n){var r,o,i,a,s,l,u,c,d;let p,{id:f,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:S,formatOptions:E,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:k,onKeyUp:C,description:j,errorMessage:T,isWheelDisabled:R,...M}=e,{increment:N,incrementToMax:A,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=vt((r=EU)&&r.__esModule?r.default:r,"@react-aria/numberfield"),W=(0,pT.useCallback)(()=>{let e=n.current?.value??"";(0,br.flushSync)(()=>{B()}),n.current?.value!==e&&bz(n.current?.value??"","assertive")},[B,n]),K=yB(f),{focusProps:z}=gJ({onBlur(){W()}}),H=EK(E),q=(0,pT.useMemo)(()=>H.resolvedOptions(),[H]),G=EK({...E,currencySign:void 0}),Z=(0,pT.useMemo)(()=>isNaN(L)?"":G.format(L),[G,L]),{spinButtonProps:Y,incrementButtonProps:J,decrementButtonProps:Q}=Eq({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:N,onIncrementToMax:A,onDecrement:I,onDecrementToMin:$,value:L,textValue:Z}),[X,ee]=(0,pT.useState)(!1),{focusWithinProps:et}=bm({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:n,isDisabled:r}=e,o=(0,pT.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);wc(t,"wheel",r?void 0:o)}({onScroll:(0,pT.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?N():e.deltaY<0&&I())},[I,N]),isDisabled:R||y||g||!X},n);let en=(q.maximumFractionDigits??0)>0,er=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";g_()?er?eo="text":en&&(eo="decimal"):gO()&&(er?eo="numeric":en&&(eo="decimal"));let ei=y7(e),ea=(0,pT.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,br.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ep,errorMessageProps:ef}=function(e,t,n){let r=bt(e=>{let r=n.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,pT.useEffect)(()=>{if(!EW()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let o=EW()?null:e=>{let n=gr(e).value.slice(0,gr(e).selectionStart)+e.data+gr(e).value.slice(gr(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=_i(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=g1(e,t),d=xe({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=_J({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=y7(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,pT.useState)(l);return _Q(t,e.defaultValue??x,u),_X(e,d,t),{labelProps:m,inputProps:yW(v,"input"===n?w:void 0,{disabled:r,readOnly:i,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(gr(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(pR().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,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:p,validationErrors:f,validationDetails:h}}(e,n),c=(0,pT.useRef)(null);return{inputProps:yW(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;c.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=c.current;n.current.value=e,n.current.setSelectionRange(r,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...M,...ei,name:void 0,form:void 0,label:S,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[_8]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:K,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onKeyDown:(0,pT.useMemo)(()=>yP(ea,k),[ea,k]),onKeyUp:C,onPaste:t=>{e.onPaste?.(t);let n=gr(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,n);_Q(n,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,yk(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!EG&&"u">typeof document&&((EG=document.createElement("input")).type="number"),!EG))return;EG.min=null==l||isNaN(l)?"":String(l),EG.max=null==u||isNaN(u)?"":String(u),EG.step=null==c||isNaN(c)?"":String(c),EG.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&EG.validity.valid,n=e.validationMessage||EG.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:EG.validity.rangeOverflow,rangeUnderflow:EG.validity.rangeUnderflow,stepMismatch:EG.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(r),"native"!==i||EG.validity.valid||e.setCustomValidity(EG.validationMessage)});let eh=yW(Y,z,ed,{role:null,"aria-roledescription":gS()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(p=null!=e.label?ec.id:e["aria-labelledby"]);let eg=yB(),eb=yB(),ev=yW(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:p&&!m?eg:null,"aria-labelledby":p&&!m?`${eg} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),ew=yW(Q,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:p&&!h?eb:null,"aria-labelledby":p&&!h?`${eb} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:ew,errorMessageProps:ef,descriptionProps:ep,isInvalid:es,validationErrors:el,validationDetails:eu}}({...yY(e),label:c,validationBehavior:i},s,l),v=yH({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=y7(e);return delete w.id,pR().createElement(yz,{values:[[EQ,s],[_S,p],[_D,{...f,ref:l}],[xB,{...d,ref:u}],[bD,{slots:{increment:h,decrement:m}}],[bk,{slots:{description:y,errorMessage:g}}],[xI,b]]},pR().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&pR().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function E0(e,t){return Number.parseInt(EO(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let E1=(0,pT.forwardRef)(function(e,t){let{className:n}=e,r=(0,pT.useContext)(_f),o=(0,pT.useContext)(_h),i=r??o,a=(0,pT.useContext)(EF),s=v1(),l=EO(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=E0(i.visibleRange.start.toDate(s),a),c=i.maxValue?E0(i.maxValue.toDate(s),a):void 0,d=i.minValue?E0(i.minValue.toDate(s),a):void 0,p=(0,pT.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,hT.jsxs)("span",{ref:t,className:n,children:[(0,hT.jsx)("span",{children:l}),(0,hT.jsxs)(EX,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,hT.jsx)(_O,{}),(0,hT.jsxs)(_E,{children:[(0,hT.jsx)(bO,{slot:"increment",children:(0,hT.jsx)(h8,{size:8})}),(0,hT.jsx)(bO,{slot:"decrement",children:(0,hT.jsx)(h5,{size:8})})]})]})]})}),E2="-esm-form-engine__datepicker-module__inputGroup___gBam-",E4="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",E3="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",E6="-esm-form-engine__datepicker-module__invalidText___A4cv4",E5="-esm-form-engine__datepicker-module__flatButton___HcpME",E7="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",E9="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",E8="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function De({children:e}){let t=(0,pT.useContext)(S$),n=(0,pT.useContext)(SL),r=t??n,o=f8(()=>r?.close());return(0,hT.jsx)(xA,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:o,children:e})}let Dt=(0,pT.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},o){let i="range"===e;return(0,hT.jsx)(SR,{ref:o,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,hT.jsx)(De,{children:(0,hT.jsxs)(i?_y:_m,{...i?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,hT.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,hT.jsx)(bO,{className:hM()(E5,E7),slot:"previous",children:(0,hT.jsx)(ma,{size:16})}),(0,hT.jsx)(E1,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,hT.jsx)(bO,{className:hM()(E5,E7),slot:"next",children:(0,hT.jsx)(ms,{size:16})})]}),(0,hT.jsx)(_b,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,hT.jsx)(_x,{className:hM()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),Dn=(0,pT.forwardRef)(function(e,t){let n=(0,pT.useContext)(S$),[r,o]=yG({slot:e.slot},t,xS),{locale:i}=bW(),a=xx({...r,locale:i,createCalendar:w5}),s=(0,pT.useRef)(null),{fieldProps:l,inputProps:u}=_4({...r,inputRef:s},a,o),c=(0,pT.useCallback)(()=>{a.isDisabled||n.toggle()},[]);return(0,hT.jsxs)(yz,{values:[[xE,a],[_D,{...u,ref:s}],[_S,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,hT.jsx)(_E,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,n)=>(0,pT.cloneElement)(e.children(t),{key:n}))}),(0,hT.jsx)(_O,{})]})}),Dr=(0,pT.forwardRef)(function(e,t){let n=(0,pT.useContext)(S$),r=(0,pT.useContext)(SL);return(n??r).isInvalid?(0,hT.jsx)(yh,{ref:t,size:16,...e}):(0,hT.jsx)(h6,{ref:t,size:16,...e})});class Do{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Di=new Map,Da=(0,pT.forwardRef)(function({segment:e,...t},n){let r=(0,pT.useContext)(xE),o=yE(n),{segmentProps:i}=function(e,t,n){let r,o,i,a,s=(0,pT.useRef)(""),{locale:l,direction:u}=bW(),c=function(){var e;let{locale:t}=bW(),n=ve((e=_G)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,pT.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Do(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=_0.get(t),m=e.isPlaceholder?"":e.text,y=(0,pT.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=b1({month:"long",timeZone:y.timeZone}),b=b1({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=Eq({value:e.value??void 0,textValue:m,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="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,pT.useMemo)(()=>new(0,EZ.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=w.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:S}=(r=function(e){let{locale:t}=bW(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Di.has(n))return Di.get(n);let r=new Intl.Collator(t,e);return Di.set(n,r),r}({usage:"search",sensitivity:"base"}),o=(0,pT.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),i=(0,pT.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),a=(0,pT.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,o=(t=t.normalize("NFC")).length;for(;n+o<=e.length;n++){let i=e.slice(n,n+o);if(0===r.compare(t,i))return!0}return!1},[r]),(0,pT.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),E=b1({hour:"numeric",hour12:!0}),D=(0,pT.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),O=(0,pT.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),P=b1({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,pT.useMemo)(()=>{if("era"!==e.type)return[];let n=vW(new vC(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[P,t.calendar,e.type]),C=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(S(D,n))t.setSegment("dayPeriod",0);else if(S(O,n))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>S(e.formatted,n));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(r))return;let o=w.parse(r),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(n)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=r}}};wc((0,pT.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&gn(n.current,e?.anchorNode)&&e.collapse(n.current)});let j=(0,pT.useRef)("");wc(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":j.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&C(r.data)}}),wc(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=j.current),null!=r&&(S(D,r)||S(O,r))&&C(r))}),yk(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[n,h]);let T=gS()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,pT.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let R=yB(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),A=wi({"aria-label":`${N}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:yW(v,A,{id:R,...T,"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:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(pR().version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(gw()?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(),x()}},onFocus:()=>{s.current="",n.current&&wm(n.current,{containingElement:wp(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:a,isFocused:s,isFocusVisible:l}=by(),{hoverProps:u,isHovered:c}=b_({...t,isDisabled:r.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,pT.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,u="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,n,r,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,pT.useCallback)(e=>{e.stopPropagation()},[]);return(0,hT.jsx)("span",{...yW(y7(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.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})}),Ds={short:!1,size:"md"},Dl=(0,pT.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:g,...b}={...Ds,...e},{calendar:v,intlLocale:w,today_:x}=EB(),S=(0,pT.useId)(),E=!!(u??l),D=(0,pT.useMemo)(()=>SU(r,v),[r,v]),O=(0,pT.useMemo)(()=>SU(g,v,!0),[g,v]),P=(0,pT.useMemo)(()=>SU(d,v),[d,v]),k=(0,pT.useMemo)(()=>SU(p??EV,v),[p,v]),C=(0,pT.useMemo)(()=>i||s,[i,s]),j=(0,pT.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(SW(e)))),[h,f]);return(0,hT.jsx)(SV,{locale:w.toString(),children:(0,hT.jsx)("div",{className:hM()("cds--form-item",n),children:(0,hT.jsx)(yz,{values:[[EF,w]],children:(0,hT.jsxs)(SF,{className:hM()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,hT.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,hT.jsx)(xV,{className:hM()("cds--label",{"cds--label--disabled":o}),htmlFor:S,children:u??l}),(0,hT.jsxs)(_E,{className:E2,children:[(0,hT.jsx)(Dn,{id:E?S:void 0,ref:t,className:hM()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__inputWrapper___uKdT1",{"-esm-form-engine__datepicker-module__inputWrapperSm___0RXJc":"sm"===y,"-esm-form-engine__datepicker-module__inputWrapperMd___4Vff1":"md"===y||!y||0===y.length,"-esm-form-engine__datepicker-module__inputWrapperLg___VCRm5":"lg"===y}),children:e=>"era"!==e.type?(0,hT.jsx)(Da,{className:E4,segment:e}):(0,hT.jsx)(pR().Fragment,{})}),(0,hT.jsx)(bO,{className:hM()(E5,{[E9]:"sm"===y,[E7]:"md"===y||!y||0===y.length,[E8]:"lg"===y}),children:(0,hT.jsx)(Dr,{})})]}),(0,hT.jsx)(x$,{className:E6,children:a})]}),(0,hT.jsx)(Dt,{variant:"single",today_:x})]})})})})}),Du=(0,pT.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=EB(),w=(0,pT.useId)(),x=!!(s??a),S=(0,pT.useMemo)(()=>{if(h)return{start:SU(h[0],g,!1),end:SU(h[1],g,!1)}},[h,g]),E=(0,pT.useMemo)(()=>{if(t)return{start:SU(t[0],g,!1),end:SU(t[1],g,!1)}},[t,g]),D=(0,pT.useMemo)(()=>SU(c??EV,g,!0),[c,g]),O=(0,pT.useMemo)(()=>SU(u,g,!0),[u,g]),P=(0,pT.useMemo)(()=>n||i,[n,i]),k=(0,pT.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?.([SW(e.start),SW(e.end)]))),[p,d]);return(0,hT.jsx)(SV,{locale:b.toString(),children:(0,hT.jsx)("div",{className:hM()("cds--form-item",e),children:(0,hT.jsx)(yz,{values:[[EF,b]],children:(0,hT.jsx)(SB,{id:x?w:void 0,className:hM()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:S,defaultValue:E,ref:y,isDisabled:o,...m,onChange:k,children:(0,hT.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,hT.jsx)(xV,{className:hM()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,hT.jsxs)(_E,{className:E2,children:[(0,hT.jsxs)("div",{className:hM()("-esm-form-engine__datepicker-module__inputsWrapper___xXRQI",{"-esm-form-engine__datepicker-module__inputsWrapperSm___nL+b6":"sm"===f,"-esm-form-engine__datepicker-module__inputsWrapperMd___Kgcps":"md"===f||!f||0===f.length,"-esm-form-engine__datepicker-module__inputsWrapperLg___raaSN":"lg"===f}),children:[(0,hT.jsx)(xO,{className:hM()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",E3),slot:"start",children:e=>(0,hT.jsx)(Da,{className:E4,segment:e})}),(0,hT.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,hT.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,hT.jsx)(xO,{className:hM()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",E3),slot:"end",children:e=>(0,hT.jsx)(Da,{className:E4,segment:e})})]}),(0,hT.jsx)(bO,{className:hM()(E5,{[E9]:"sm"===f,[E7]:"md"===f||!f||0===f.length,[E8]:"lg"===f}),children:(0,hT.jsx)(Dr,{})})]}),(0,hT.jsx)(x$,{className:E6,children:r}),(0,hT.jsx)(Dt,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Dc=({diagnoses:e})=>{let{diagnosisTags:t}=fj({externalModuleName:"@openmrs/esm-styleguide"});return(0,hT.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:n,uuid:r,display:o}=e,i=t[1===n?"primaryColor":"secondaryColor"];return(0,hT.jsx)(hL.vwO,{type:i,children:o},r)})})},Dd={action:"-esm-form-engine__empty-card-module__action___oG778",content:"-esm-form-engine__empty-card-module__content___YUXvR",desktopHeading:"-esm-form-engine__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-form-engine__empty-card-module__tabletHeading___8mc7w",tile:"-esm-form-engine__empty-card-module__tile___3-rRO"},Dp=({width:e="64",height:t="64"})=>(0,hT.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,hT.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Df=e=>{let t="tablet"===f3(),n=e.launchForm;return(0,hT.jsx)(hL.Wdr,{className:Dd.layer,children:(0,hT.jsxs)(hL.FAs,{className:Dd.tile,children:[(0,hT.jsx)("div",{className:t?Dd.tabletHeading:Dd.desktopHeading,children:(0,hT.jsx)("h4",{children:e.headerTitle})}),(0,hT.jsx)(Dp,{}),(0,hT.jsx)("p",{className:Dd.content,children:oY("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,hT.jsx)("p",{className:Dd.action,children:n&&(0,hT.jsx)(hL.$nd,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:oY("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Dh=({error:e,headerTitle:t})=>{let n="tablet"===f3();return(0,hT.jsx)(hL.Wdr,{children:(0,hT.jsxs)(hL.FAs,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,hT.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,hT.jsx)("h4",{children:t})}),(0,hT.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[oY("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,hT.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:oY("errorCopy")})]})})},Dm=Dh,Dy=pR().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:o,state:i}=f7(),a=window.location??{pathname:""},s=pH(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,hT.jsxs)(hL.f8J,{"aria-label":oY("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,hT.jsx)(pZ,{name:"global-nav-menu-slot"}),n?(0,hT.jsx)(fw,{value:o,fallback:(0,hT.jsx)(pZ,{name:n,state:{basePath:r,currentPath:a,...i}}),children:(0,hT.jsx)(pM.Provider,{value:o,children:(0,hT.jsx)(pZ,{name:n,state:{basePath:r,currentPath:a,...i}})})}):null]}):null}),Dg=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:o})=>{let[i,a]=(0,pT.useState)(""),s=(0,pT.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:o}=fA()(t,io,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,pT.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&o}),[n,o,r,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:h}=function(e,t=0,n=""){let r=fM(n),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=fY()(function(n,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 i=`${ie}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),n&&a.append("_getpagesoffset",""+n*t),e&&a.append("_tag",e),"string"==typeof r&&""!==r&&a.append("name:contains",r),i+a.toString()},io);return(0,pT.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(n,r,i),m=(0,pT.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,pT.useCallback)(e=>{o(),a(e.trim())},[o]),g=he((0,pT.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),b=d?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)(hL.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:oY("searchForLocation"),id:s,placeholder:oY("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,hT.jsx)(hL.jeF,{kind:"error",subtitle:oY("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:oY("error","Error")})}),(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,hT.jsx)(hL.Psq,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:m.length>0?(0,hT.jsx)(hL.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,hT.jsx)(hL.aaP,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,hT.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,hT.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:oY("noResultsToDisplay")})})}),p&&(0,hT.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,hT.jsx)(hL.OuH,{description:oY("loading")})})]})})]})},Db=Z("modalState",{modalContainer:null,modalStack:[]}),Dv=0;async function Dw(e,t,n={}){let r=pl(t),o=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=r,a=await i(),s=Dv++;o=await pP({...a,name:`${t}-${s}`},{...n,domElement:e})}else I(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function D_(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dx(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function DS(e){return e.find(e=>!D_(e))}function DE(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let DD=window.getComputedStyle(document.body).overflow;function DO({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Dk),document.body.style.overflow="hidden",t.style.visibility="unset");let n=DS(e);e.forEach(e=>{switch(e.state){case"NEW":{let n=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=n,e.state="MOUNTING",Dw(n,e.modalName,e.props).then(r=>{D_(e)?Dx(e.modalName,r):r?(e.parcel=r,t.prepend(n),DE(e,DS(Db.getState().modalStack)===e),r.mountPromise.then(()=>{D_(e)||(e.state="MOUNTED")},t=>{I(t),e.parcel=null,DP(e)})):DP(e)},t=>{I(t),DP(e)});break}case"MOUNTING":case"MOUNTED":DE(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dx(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=Db.getState();Db.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=DD,removeEventListener("keydown",Dk)}function DP(e){if(D_(e))return;e.state="TO_BE_DELETED";let t=Db.getState();Db.setState({...t,modalStack:[...t.modalStack]})}function Dk(e){"Escape"===e.key&&function(){let[e]=Db.getState().modalStack;e&&DP(e)}()}function DC(e){Db.subscribe(DO),Db.setState({...Db.getState(),modalContainer:e})}function Dj(e,t={},n=()=>{}){let r=()=>{let e=Db.getState().modalStack.find(e=>e.onClose===n);e&&DP(e)};if(pl(e)){var o;let i,a;o={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},a=[o,...(i=Db.getState()).modalStack],Db.setState({...i,modalStack:a})}else I(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var DT=n(33696);let DR=({notification:e})=>{let{description:t,action:n,kind:r,critical:o,title:i,onAction:a}=e;return(0,hT.jsx)(hL.kZS,{actionButtonLabel:n,kind:r||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},DM=({subject:e})=>{let[t,n]=(0,pT.useState)([]);return(0,pT.useEffect)(()=>{let t=e.subscribe(e=>n(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,hT.jsx)(hT.Fragment,{children:t.map(e=>(0,hT.jsx)(DR,{notification:e},e.id))})},DN=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,pT.useState)(t);return(0,hT.jsx)(hL.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:oY("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:oY("actionableNotification","Actionable notification"),subtitle:r,title:i,lowContrast:a,inline:!0,...u})},DA=({subject:e})=>{let[t,n]=(0,pT.useState)([]);return(0,pT.useEffect)(()=>{let t=e.subscribe(e=>n(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,hT.jsx)(hT.Fragment,{children:t.map(e=>(0,hT.jsx)(DN,{notification:e},e.id))})};var DI=n(75992);let D$=new DT.B7,DL=0,DF=new DT.B7,DB=0;function DV(e){e&&(0,pY.createRoot)(e).render((0,hT.jsx)(DM,{subject:D$}))}function DU(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,DI.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{D$.next({...e,id:DL++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DW(e){e&&(0,pY.createRoot)(e).render((0,hT.jsx)(DA,{subject:DF}))}function DK(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,DI.A)(t))?setTimeout(()=>{DF.next({...e,id:DB++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Dz=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DH=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],Dq={container:"-esm-form-engine__numeric-observation-module__container___gS0Wg",card:"-esm-form-engine__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-form-engine__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-form-engine__numeric-observation-module__critical-value___Jynsn",cell:"-esm-form-engine__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-form-engine__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-form-engine__numeric-observation-module__critically-low___XP+HX",high:"-esm-form-engine__numeric-observation-module__high___JV9do",low:"-esm-form-engine__numeric-observation-module__low___-uDKD","label-container":"-esm-form-engine__numeric-observation-module__label-container___vTf2y","value-container":"-esm-form-engine__numeric-observation-module__value-container___xTUIC",label:"-esm-form-engine__numeric-observation-module__label___-pfmb",value:"-esm-form-engine__numeric-observation-module__value___1A4zt",units:"-esm-form-engine__numeric-observation-module__units___SzvX+","pad-right":"-esm-form-engine__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-form-engine__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-form-engine__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-form-engine__numeric-observation-module__arrow___9bvsX"},DG=({value:e,unit:t,label:n,interpretation:r,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,pT.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${o8}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${o8}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:i}=fA()(n,io),a=r?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||r?void 0:i,s),d=o??u,p=(0,pT.useMemo)(()=>{if(r)return r?"--"===r?"normal":Dz.includes(r)?r.toLowerCase():DH.includes(r)?r:"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"},[r,d,e,c])??"normal",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:oY("notAvailable","Not available"),w=hM()({[Dq["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[Dq["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[Dq.low]:"low"===p,[Dq.high]:"high"===p,[Dq["off-scale-low"]]:"off_scale_low"===p,[Dq["off-scale-high"]]:"off_scale_high"===p}),x=hM()({[Dq.container]:!0,[Dq.card]:!0,[Dq["critical-value"]]:f,[Dq["abnormal-value"]]:h&&!f}),S=hM()({[Dq.cell]:!0,[w]:!0});return"cell"===a?(0,hT.jsxs)("div",{className:S,children:[v,b&&t?` ${t}`:""]}):(0,hT.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,hT.jsxs)("div",{className:Dq["label-container"],children:[(0,hT.jsx)("span",{id:m,className:Dq.label,children:n}),h&&(0,hT.jsx)("span",{className:Dq[p.replace("_","-")],title:oY("abnormalValue","Abnormal value")})]}),(0,hT.jsxs)("div",{className:Dq["value-container"],children:[(0,hT.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:Dq.value,children:v}),b&&t&&(0,hT.jsx)("span",{id:g,className:Dq.units,children:t})]})]})},DZ="-esm-form-engine__page-header-module__pageHeader___6TOjO",DY=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,hT.jsx)("div",{className:hM()(DZ,n),...r,children:t})}{let{title:t,illustration:n,className:r,...o}=e;return(0,hT.jsx)("div",{className:hM()(DZ,r),...o,children:(0,hT.jsx)(DJ,{title:t,illustration:n})})}},DJ=({title:e,illustration:t,className:n})=>{let[r,o]=(0,pT.useState)(null);return(0,pT.useEffect)(()=>{nl("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,hT.jsxs)("div",{className:hM()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,hT.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,hT.jsx)("p",{children:oY(r.implementationName)}),(0,hT.jsx)("p",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},DQ=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=hr(t,e,r,i),u="tablet"===f3(),c=oY("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,hT.jsx)(hT.Fragment,{children:e>0&&(0,hT.jsxs)("div",{className:hM()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,hT.jsxs)("div",{children:[c,o&&(0,hT.jsx)(pN,{to:o,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:a??oY("seeAll","See all")})]}),(0,hT.jsx)(hL.dKS,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>oY("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function DX(e){return D1(D4(e,"usual","official"))}function D0(e){return DX(e)}function D1(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function D2(e){return D1(e)}function D4(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function D3(e,t=hd()()){let n=hd()(t),r=ER(e,n);if(null==r)return null;let o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),u={};if(o<2)u.minutes=n.diff(r,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=n.subtract(a,"weeks").diff(r,"days");u.weeks=a,u.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");u.months=s,u.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");u.years=l,u.months=e}else u.years=l;return u}function D6(e,t=hd()()){let n=D3(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),ET(n,r)}let D5={container:"-esm-form-engine__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-form-engine__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-form-engine__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-form-engine__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-form-engine__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-form-engine__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-form-engine__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-form-engine__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-form-engine__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-form-engine__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-form-engine__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-form-engine__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-form-engine__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-form-engine__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-form-engine__patient-banner-patient-info-module__tag___InccN",gender:"-esm-form-engine__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-form-engine__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-form-engine__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-form-engine__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-form-engine__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function D7({showIdentifierLabel:e,type:t,value:n}){return(0,hT.jsx)("span",{className:D5.primaryIdentifier,children:(0,hT.jsxs)(hL.vwO,{className:D5.tag,type:"gray",children:[e&&t?.text&&(0,hT.jsxs)("span",{className:D5.label,children:[t.text,": "]}),(0,hT.jsx)("span",{className:D5.value,children:n})]})})}function D9({showIdentifierLabel:e,type:t,value:n}){return(0,hT.jsxs)(hL.lRv,{className:D5.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,hT.jsxs)("span",{className:D5.label,children:[t?.text,": "]}),(0,hT.jsx)("span",{className:D5.value,children:n})]})}function D8({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=fj(),{primaryIdentifierCode:r}=ha(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,hT.jsx)(hT.Fragment,{children:o?.length?o.map(({value:e,type:n},i)=>(0,hT.jsxs)(pR().Fragment,{children:[(0,hT.jsx)("span",{className:D5.identifier,children:n?.coding?.[0]?.code===r?(0,hT.jsx)(D7,{showIdentifierLabel:t,type:n,value:e}):(0,hT.jsx)(D9,{showIdentifierLabel:t,type:n,value:e})}),i<o.length-1&&(0,hT.jsx)("span",{className:D5.separator,children:"\xb7"})]},e)):""})}let Oe={Female:mv,Male:mw,Other:m_,Unknown:mx},Ot=({gender:e})=>{let t=Oe[e];return t?(0,hT.jsx)(t,{fill:"#525252"}):null},On={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Or({patient:e,renderedFrom:t}){var n;let r,o,i=DX(e),a=e?.gender&&(o=On[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:oY(r,n),iconKey:o}),s=(0,pT.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,hT.jsxs)("div",{className:D5.patientInfo,children:[(0,hT.jsx)("div",{className:hM()(D5.row,D5.patientNameRow),children:(0,hT.jsxs)("div",{className:D5.flexRow,children:[(0,hT.jsx)("span",{className:D5.patientName,children:i}),a&&(0,hT.jsxs)("div",{className:D5.gender,children:[(0,hT.jsx)(Ot,{gender:a.iconKey}),(0,hT.jsx)("span",{children:a.displayText})]}),(0,hT.jsx)(pZ,{className:D5.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,hT.jsxs)("div",{className:D5.demographics,children:[e.birthDate&&(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)("span",{children:D6(e.birthDate)}),(0,hT.jsx)("span",{className:D5.separator,children:"\xb7"}),(0,hT.jsx)("span",{children:ED(e.birthDate,{time:!1})}),(0,hT.jsx)("span",{className:D5.separator,children:"\xb7"})]}),(0,hT.jsx)(D8,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,hT.jsx)(pZ,{className:D5.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Oo=n(58742);let Oi=pR().forwardRef(function({children:e,size:t=16,...n},r){return pR().createElement(Oo.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ed||(ed=pR().createElement("circle",{cx:"16",cy:"8",r:"2"})),ep||(ep=pR().createElement("circle",{cx:"16",cy:"16",r:"2"})),ef||(ef=pR().createElement("circle",{cx:"16",cy:"24",r:"2"})),e)});function Oa({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[o,i]=(0,pT.useState)(!1),{extensions:a}=pq(n),s="tablet"===f3(),l=f8(()=>i(!1),o),u=(0,pT.useRef)(null),c=(0,pT.useRef)(null),d=(0,pT.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,pT.useCallback)(()=>i(e=>!e),[]),m=(0,pT.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,pT.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();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 n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,pT.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,pT.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...r}),[t,e,m,r]);return 0===a.length?null:(0,hT.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,hT.jsxs)("div",{"data-overflow-menu":!0,className:hM()("cds--overflow-menu",hV),ref:l,children:[(0,hT.jsxs)("button",{className:hM()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},hK),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,hT.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:oY("actions","Actions")})," ",(0,hT.jsx)(Oi,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,hT.jsxs)("div",{className:hM()("cds--overflow-menu-options","cds--overflow-menu--flip",hU,{[hW]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,hT.jsx)("ul",{className:hM()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,hT.jsx)(pZ,{name:n,state:g},n)}),(0,hT.jsx)("span",{})]})]})})}var Os=n(35570),Ol=n.n(Os);function Ou(e){let{patientPhotoConceptUuid:t}=fj({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${o8}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:o,isLoading:i}=fn()(e?n:null,io),a=r?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Oc=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,fe.useTranslation)();return(0,hT.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,hT.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,hT.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"})]})},Od="-esm-form-engine__patient-photo-module__avatar___thboZ";function Op({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:o}=Ou(e),[i,a]=(0,pT.useState)(null),[s,l]=(0,pT.useState)(!1),u=(0,pT.useMemo)(()=>Ol().generate(e),[e]);(0,pT.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(a(e),l(!1))},n.onerror=()=>{t||(a(null),l(!1))},n.src=e,()=>{t=!0}}a(null),l(!1)},[r?.imageSrc]);let c=(0,pT.useMemo)(()=>n||(i?oY("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):oY("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,i,t]);return o||s?(0,hT.jsx)(hL.ryE,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!i?(0,hT.jsx)(Oc,{"aria-label":oY("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,hT.jsx)("div",{"aria-label":c,children:(0,hT.jsx)("img",{className:Od,src:i,alt:c,title:t})}):(0,hT.jsx)("div",{"aria-label":c,children:(0,hT.jsx)("div",{className:Od,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,hT.jsx)("span",{className:"-esm-form-engine__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Of=["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"],Oh=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Om=Oh,Oy=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),Og=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Ob=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Ov=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Ow=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),O_=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ox=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),OS=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),OE=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),OD=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),OO=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),OP=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ok=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),OC=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Oj=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),OT=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),OR=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OM=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),ON=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),OA=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),OI=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),O$=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),OL=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),OF=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),OB=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),OV=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),OU=(0,pT.memo)((0,pT.forwardRef)(function(e,t){return(0,hT.jsx)(OH,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),OW=OE,OK=OM,Oz=(0,pT.memo)((0,pT.forwardRef)(function({pictogram:e,fallback:t,...n},r){let o=(0,pT.useRef)(document.getElementById(e));return(0,pT.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,hT.jsx)(fw,{value:o.current,fallback:t,children:(0,hT.jsx)(OH,{ref:r,pictogram:e,pictogramProps:n})})})),OH=(0,pT.memo)((0,pT.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,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,hT.jsx)("svg",{ref:n,className:hM()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:o,width:o,children:(0,hT.jsx)("use",{href:`#${e}`})})})),Oq=({children:e})=>"tablet"===f3()?(0,hT.jsx)(hL.Wdr,{children:e}):(0,hT.jsx)(hT.Fragment,{children:e}),OG=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==r,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==r,title:c,id:d,...p}=e,[f,h]=(0,pT.useState)(n),[m,y]=(0,pT.useState)(!0),[g,b]=(0,pT.useState)(!1),v=(0,pT.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,pT.useCallback)(()=>{b(!0),v()},[v]);return(0,pT.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,pT.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,hT.jsx)(hL.kZS,{actionButtonLabel:f,"aria-label":oY("closeSnackbar","Close snackbar"),className:hM()("-esm-form-engine__snackbar-module__slideIn___senVE",{"-esm-form-engine__snackbar-module__animated___8eltL":m,"-esm-form-engine__snackbar-module__slideOut___BIIXm":g}),kind:r,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:oY("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},OZ=({subject:e})=>{let[t,n]=(0,pT.useState)([]),r=(0,pT.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,pT.useEffect)(()=>{let t=e.subscribe(e=>n(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,hT.jsx)(hT.Fragment,{children:t.map(e=>(0,hT.jsx)(OG,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},OY=new DT.B7,OJ=0;function OQ(e){e&&(0,pY.createRoot)(e).render((0,hT.jsx)(OZ,{subject:OY}))}function OX(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{OY.next({...e,id:OJ++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let O0=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,pT.useCallback)(()=>{s(),t()},[t,s]);return(0,hT.jsx)("div",{children:(0,hT.jsx)(hL.kZS,{actionButtonLabel:a,kind:r||"info",lowContrast:o,subtitle:n,title:i||"",onActionButtonClick:l,onClose:t})})},O1=({subject:e})=>{let[t,n]=(0,pT.useState)([]),r=(0,pT.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,pT.useEffect)(()=>{let t=e.subscribe(e=>n(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,hT.jsx)(hT.Fragment,{children:t.map(e=>(0,hT.jsx)(O0,{toast:e,closeToast:()=>r(e)},e.id))})},O2=new DT.B7,O4=0;function O3(e){e&&(0,pY.createRoot)(e).render((0,hT.jsx)(O1,{subject:O2}))}function O6(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,DI.A)(t))?setTimeout(()=>{O2.next({...e,id:O4++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function O5(e,t=!1){if(t)return!0;let n=Pt[e];return!n||!n()}function O7(e,t){let n=Pu.getState()?.workspaceGroup,r=n?.name;r&&e===r&&Pf(()=>{let r=Pb(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),Pu.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function O9(e,t){let{name:n,additionalProps:r}=t;ph(n);let o=()=>{Pa(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>O8(n,r),closeWorkspaceGroup:!1})};O5(e.name)?o():Pm("closing-workspace-launching-new-workspace",o,e.title??e.name)}function O8(e,t){let n=ph(e),r=Pu.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void O7(r.name,()=>{O8(e,t)});let o=Pu.getState().workspaceGroup?.name,i={...n,title:Py(n,t),closeWorkspace:(t={})=>Pa(e,t),closeWorkspaceWithSavedChanges:t=>Pa(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(Pt[n]=r)},setTitle:(t,n)=>{i.title=t,i.titleNode=n,Pu.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){Pu.setState(n=>{let r=[e,...t??n.openWorkspaces],o=Pp(e);return{...n,openWorkspaces:r,workspaceWindowState:o}})}o&&Pb(o,t);let s=Pu.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===Py(t,t.additionalProps)&&{title:Py(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,Pu.getState().openWorkspaces.filter(e=>e.type!=i.type)),O9(u,{name:e,additionalProps:t})):a(i);else O9(s[0],{name:e,additionalProps:t})}function Pe({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Ps(t),O8(n,r),oX({to:e})}let Pt={};function Pn(e,t){Pt[e]=t}function Pr(e){return Pt[e]}function Po(){let e=Pu.getState();Pu.setState({...e,prompt:null})}let Pi={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Pa(e,t={}){t={...Pi,...t};let n=()=>{let n=Pu.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),o=Pu.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&O7(o),Pt[e]=()=>!1,Pu.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:Pp(r?.[0])})),t?.onWorkspaceClose?.()};return O5(e,t?.ignoreChanges)?(n(),!0):(Pm("closing-workspace",n,ph(e).title??e),!1)}function Ps(e){Pu.getState().context!=e&&Pu.setState({context:e,openWorkspaces:[],prompt:null})}let Pl={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},Pu=Z("workspace",Pl);function Pc(){return Pu}function Pd(e){let t=Pu.getState();Pu.setState({...t,workspaceWindowState:e})}function Pp(e){return e?.preferredWindowSize??"normal"}function Pf(e=()=>{},t=()=>!0){let n=Pu.getState().openWorkspaces.filter(t).every(({name:e})=>O5(e)),r=()=>{Pg(),e?.()};n?r():Pm("closing-all-workspaces",r)}function Ph(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=pF(Pu);return(0,pT.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function Pm(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:oY("unsavedChangesTitleText","Unsaved changes"),body:oY("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:oY("discard","Discard")};break;case"closing-all-workspaces":{let e=Pu.getState().openWorkspaces.filter(({name:e})=>!O5(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:oY("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:oY("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:oY("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:oY("unsavedChangesTitleText","Unsaved changes"),body:oY("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{Pu.setState(e=>({...e,prompt:null})),t?.()},confirmText:oY("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}Pu.setState(e=>({...e,prompt:r}))}function Py(e,t){return t?.workspaceTitle??e.title}function Pg(){Pu.setState(Pl)}function Pb(e,t={}){if(!e||"default"===e)return;let n=J(e,{});return t&&n.setState(e=>({...e,...t})),n}let Pv="-esm-form-engine__action-menu-button-module__container___F68g0",Pw="-esm-form-engine__action-menu-button-module__elementContainer___D1ACn",P_="-esm-form-engine__action-menu-button-module__active___HAE75";function Px({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,hT.jsxs)(hT.Fragment,{children:[e({size:16}),t?(0,hT.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,hT.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__countTag___3mn9k",children:n})]})}let PS=({getIcon:e,label:t,iconDescription:n,handler:r,type:o,tagContent:i})=>{let a=f3(),{workspaces:s,workspaceWindowState:l}=Ph(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,hT.jsxs)(hL.$nd,{className:hM()(Pv,{[P_]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,hT.jsx)("span",{className:Pw,children:(0,hT.jsx)(Px,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,hT.jsx)("span",{children:t})]}):(0,hT.jsx)(hL.K0,{align:"left","aria-label":n,className:hM()(Pv,{[P_]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,hT.jsx)("div",{className:Pw,children:(0,hT.jsx)(Px,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})},PE=pR().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?pR().createElement(Oo.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},eh||(eh=pR().createElement("path",{d:"M2 9L2 10 5.3 10 1 14.3 1.7 15 6 10.7 6 14 7 14 7 9zM14 7L14 6 10.7 6 15 1.7 14.3 1 10 5.3 10 2 9 2 9 7z"})),e):pR().createElement(Oo.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},em||(em=pR().createElement("path",{d:"M4 18L4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18zM30 3.416L28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"})),e)});var PD=n(54240),PO=n(68622),PP=/[\\^$.*+?()[\]{}|]/g,Pk=RegExp(PP.source);let PC=function(e){return(e=tp(e))&&Pk.test(e)?e.replace(PP,"\\$&"):e};function Pj({contextKey:e}){let{prompt:t}=Ph();return(0,pT.useEffect)(()=>{RegExp(`/${PC(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,pT.useEffect)(()=>(Ps(e),()=>{Ps(null)}),[e]),(0,pT.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,o=RegExp(`/${PC(e)}(/|$)`),i=new URL(r),a=o.test(i.pathname),s=Pu.getState().openWorkspaces.every(({name:e})=>O5(e));a||(s?Pg():(n?.(),Pf(()=>{oX({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,hT.jsxs)(hL.KXP,{open:!0,onClose:Po,children:[(0,hT.jsx)(hL.rQ0,{title:t.title}),(0,hT.jsx)(hL.cwr,{children:(0,hT.jsx)("p",{className:"-esm-form-engine__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,hT.jsxs)(hL.jlY,{children:[(0,hT.jsx)(hL.$nd,{kind:"secondary",onClick:Po,children:t.cancelText??oY("cancel")}),(0,hT.jsx)(hL.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??oY("confirm")})]})]}):null}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(t){PN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PA(e){return(PA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PI(e,t){return(PI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P$(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var PL=function(e){var t=pT.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&PI(a,t);var n,r,o,i=(n=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=PA(a);e=n?Reflect.construct(t,arguments,PA(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 P$(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),PN(P$(t=i.call(this,e)),"handleRef",function(e){t.el=e}),PN(P$(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),PN(P$(t),"getParcelProps",function(){var e=PR(PR({},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 r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)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(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,PR({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 p2&&p2.Consumer?pT.createElement(p2.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=p2&&p2.Consumer?pT.createElement(p2.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return pT.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],PM(a.prototype,r),o&&PM(a,o),a}();PN(PL,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function PF({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,pT.useState)(),o=function(e){let[t,n]=(0,pT.useState)({}),[r,o]=(0,pT.useState)(e);return(0,pT.useEffect)(()=>{r!==e&&o(e)},[e]),(0,pT.useEffect)(()=>{let e,t=Pb(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,pT.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let i=(0,pT.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return n?(0,hT.jsx)(PL,{config:n,mountParcel:pC,...i},e.name):(0,hT.jsx)(hL.OuH,{className:"-esm-form-engine__workspace-module__loader___jEP+q",description:`${oY("loading","Loading")} ...`})}function PB({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,o]=(0,pT.useState)(!1),i=(0,pT.useRef)(window.innerHeight),{featureName:a}=(0,pT.useContext)(pM),s=f3();(0,pT.useEffect)(()=>{let e=()=>{o(!f6(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,hT.jsx)("aside",{className:hM()("-esm-form-engine__action-menu-module__sideRail___iVmKs",{"-esm-form-engine__action-menu-module__withinWorkspace___YZfet":e,"-esm-form-engine__action-menu-module__sideRailHidden___bCdyQ":r,"-esm-form-engine__action-menu-module__sideRailVisible___+oJCY":!r}),children:(0,hT.jsx)("div",{className:"-esm-form-engine__action-menu-module__container___sf6Et",children:(0,hT.jsx)(pZ,{className:"-esm-form-engine__action-menu-module__chartExtensions___l+r+Y",name:l,state:n})})})}function PV({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:o}){let i=f3(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=Ph(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,pT.useMemo)(()=>n||u&&!d,[u,d,n]);return fP(!d&&!f6(i)),(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsxs)("div",{className:n?"-esm-form-engine__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-form-engine__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,hT.jsx)("aside",{className:hM()(t?"-esm-form-engine__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-form-engine__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-form-engine__workspace-module__hiddenRelative___7oRNR":d,"-esm-form-engine__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-form-engine__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-form-engine__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,hT.jsx)("div",{className:hM()("-esm-form-engine__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-form-engine__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-form-engine__workspace-module__hiddenFixed___kBFgl":d}),children:a.map((e,t)=>(0,hT.jsx)("div",{className:hM()("-esm-form-engine__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-form-engine__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,hT.jsx)(pT.Suspense,{fallback:null,children:(0,hT.jsx)(fe.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,hT.jsx)(PU,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,hT.jsx)(Pj,{contextKey:e})]}),f&&(0,hT.jsx)(PB,{name:u,isWithinWorkspace:!n,actionMenuProps:o})]})}function PU({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,fe.useTranslation)(),r=f3(),{workspaceWindowState:o,workspaceGroup:i}=Ph(),a=i?.name,s="maximized"===o;(0,pT.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,pT.useContext)(pM),u=(0,pT.useCallback)(()=>{Pd(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,pT.useMemo)(()=>e??{},[e]),h=(0,pT.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsxs)(hL.Y9Y,{"aria-label":oY("workspaceHeader","Workspace Header"),className:"-esm-form-engine__workspace-module__header___nMH1R",children:[!f6(r)&&!c&&(0,hT.jsx)(hL.dJ2,{"aria-label":oY("close","Close"),renderMenuIcon:(0,hT.jsx)(h0,{}),onClick:()=>f()}),(0,hT.jsx)(hL.bCw,{prefix:"",children:e.titleNode??n(e.title)}),(0,hT.jsx)("div",{className:"-esm-form-engine__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,hT.jsxs)(hL.wdv,{className:"-esm-form-engine__workspace-module__headerButtons___lek95",children:[(0,hT.jsx)(pZ,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,hT.jsx)(pZ,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,hT.jsx)(pZ,{name:`workspace-header-${l}-slot`,state:h}),f6(r)&&(0,hT.jsxs)(hT.Fragment,{children:[(d||s)&&(0,hT.jsx)(hL.V8d,{"aria-label":s?oY("minimize","Minimize"):oY("maximize","Maximize"),onClick:u,children:s?(0,hT.jsx)(PE,{}):(0,hT.jsx)(PD.hz,{})}),c&&!a?(0,hT.jsx)(hL.V8d,{"aria-label":oY("hide","Hide"),onClick:()=>Pd("hidden"),children:(0,hT.jsx)(h1,{})}):(0,hT.jsx)(hL.V8d,{"aria-label":oY("close","Close"),onClick:()=>f?.(),children:(0,hT.jsx)(mu,{})})]}),"tablet"===r&&c&&(0,hT.jsx)(hL.V8d,{"aria-label":oY("close","Close"),onClick:()=>f?.(),children:(0,hT.jsx)(PO.d3,{})})]})]}),(0,hT.jsx)("div",{className:hM()("-esm-form-engine__workspace-module__workspaceContent___FFe+u",{"-esm-form-engine__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,hT.jsx)(PF,{workspace:e,additionalPropsFromPage:t},e.name)})]})}var PW=new Uint8Array(16);let PK=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Pz=[],PH=0;PH<256;++PH)Pz.push((PH+256).toString(16).substr(1));let Pq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Pz[e[t+0]]+Pz[e[t+1]]+Pz[e[t+2]]+Pz[e[t+3]]+"-"+Pz[e[t+4]]+Pz[e[t+5]]+"-"+Pz[e[t+6]]+Pz[e[t+7]]+"-"+Pz[e[t+8]]+Pz[e[t+9]]+"-"+Pz[e[t+10]]+Pz[e[t+11]]+Pz[e[t+12]]+Pz[e[t+13]]+Pz[e[t+14]]+Pz[e[t+15]]).toLowerCase();if(!("string"==typeof n&&PK.test(n)))throw TypeError("Stringified UUID is invalid");return n},PG=function(e,t,n){var r=(e=e||{}).random||(e.rng||function(){if(!ey&&!(ey="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ey(PW)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Pq(r)};async function PZ(e,t){let{openedGroup:n}=py.getState();if(n){if(n.groupName===e&&PQ(n.props,t))return!0;else if(!await PX({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return py.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function PY(e){let{openedGroup:t,openedWindows:n}=py.getState();if(t){if(n.length>0&&!(e||await PX({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;py.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function PJ(e,t=null,n=null,r=null){let o=py.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=pg(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=pb(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=pv(e);if(a&&(a.groupName!==l.name||!PQ(a.props,r)))return!!await PX({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(py.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[P3(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let r=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=r;if(PQ(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&PQ(d.props,t)?((a||u!==o.openedWindows.length-1)&&py.setState(P0.restoreWindow(o,s)),!0):!!await PX({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(py.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[P3(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await PX({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(py.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[P3(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(py.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[P3(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await PX({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(py.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[P3(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function PQ(e,t){return null==e||null==t||F(e,t)}function PX(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&n.push(o),t&&o.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=py.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=Dj("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let P0={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[r],maximized:n};return o[r]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],o=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=pv(t);if(n<0)return e;let r={...e.openedWindows[n]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;i.splice(n,1),t&&i.length>0&&(a=!1)}else i[n]=r;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,n,r){let o=e.registeredWorkspacesByName[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${n} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${n} 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==a?{...e,openedWorkspaces:[...u,P3(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=pv(t);if(r<0)return e;let o={...e.openedWindows[r]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:n};let a=[...e.openedWindows];return a[r]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function P1(){return pB(py,P0)}let P2=()=>(0,pT.useContext)(p2),P4=()=>Object.keys(py.getState().registeredWorkspacesByName);function P3(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:PG()}}let P6={workspaceOuterContainer:"-esm-form-engine__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-form-engine__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-form-engine__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-form-engine__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-form-engine__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-form-engine__workspace2-module__maximized___aKCbE",hidden:"-esm-form-engine__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-form-engine__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-form-engine__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-form-engine__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-form-engine__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-form-engine__workspace2-module__header___MXXx9",headerButtons:"-esm-form-engine__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-form-engine__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-form-engine__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-form-engine__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-form-engine__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-form-engine__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-form-engine__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},P5=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=f3(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=P1(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=P2(),v=pv(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,pT.useEffect)(()=>{x?.hasUnsavedChanges!=n&&a(m,n??!1)},[x?.hasUnsavedChanges,n,m,a]),(0,pT.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[m].window,D=c[E];if(!D)throw Error(`Cannot find registered workspace window ${E}`);let{icon:O,canMaximize:P}=D,k="closable"===S.persistence,C=!!O&&!k,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),M=v<s.length-1||h;return(0,hT.jsxs)("div",{className:hM()(P6.workspaceOuterContainer,{[P6.narrowWorkspace]:"narrow"===T,[P6.widerWorkspace]:"wider"===T,[P6.extraWideWorkspace]:"extra-wide"===T,[P6.isActionMenuOpened]:R}),children:[(0,hT.jsx)("div",{className:hM()(P6.workspaceSpacer,{[P6.hidden]:M})}),(0,hT.jsx)("div",{className:hM()(P6.workspaceMiddleContainer,{[P6.maximized]:j,[P6.hidden]:M,[P6.isRootWorkspace]:y,[P6.showActionMenu]:b}),children:(0,hT.jsxs)("div",{className:hM()(P6.workspaceInnerContainer,{[P6.maximized]:j,[P6.hidden]:M,[P6.isRootWorkspace]:y}),children:[(0,hT.jsxs)(hL.Y9Y,{"aria-label":oY("workspaceHeader"),className:P6.header,children:[(0,hT.jsx)(hL.bCw,{prefix:"",children:e}),(0,hT.jsx)("div",{className:P6.overlayHeaderSpacer}),(0,hT.jsx)(hL.wdv,{className:P6.headerButtons,children:f6(r)?(0,hT.jsxs)(hT.Fragment,{children:[(P||j)&&(0,hT.jsx)(hL.V8d,{"aria-label":j?oY("minimize"):oY("maximize"),onClick:()=>o(E,!j),children:j?(0,hT.jsx)(PE,{}):(0,hT.jsx)(PD.hz,{})}),C&&(0,hT.jsx)(hL.V8d,{"aria-label":oY("hide"),onClick:()=>i(),children:(0,hT.jsx)(h1,{})}),!k&&(0,hT.jsx)(hL.V8d,{"aria-label":oY("close"),onClick:()=>g({closeWindow:!0}),children:(0,hT.jsx)(mu,{})})]}):(0,hT.jsxs)(hT.Fragment,{children:[C&&(0,hT.jsx)(hL.V8d,{"aria-label":oY("hide"),onClick:()=>i(),children:(0,hT.jsx)(PO.d3,{})}),(0,hT.jsx)(hL.V8d,{"aria-label":oY("close"),onClick:()=>{k?PY():g({closeWindow:!0})},children:(0,hT.jsx)(mu,{})})]})})]}),(0,hT.jsx)("div",{className:hM()(P6.workspaceContent),children:t})]})})]})},P7="-esm-form-engine__action-menu-button2-module__container___pahg-",P9="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",P8="-esm-form-engine__action-menu-button2-module__active___4O4Bs",ke="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function kt({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,hT.jsxs)(hT.Fragment,{children:[e({size:16}),t?(0,hT.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,hT.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let kn=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let i=f3(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=P1(),{extension:c}=(0,pT.useContext)(pM),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;PJ(e,t,n)}};return"tablet"===i||"phone"===i?(0,hT.jsxs)(hL.$nd,{className:hM()(P7,{[P8]:f&&!m,[ke]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,hT.jsx)("span",{className:P9,children:(0,hT.jsx)(kt,{hasUnsavedChanges:y,getIcon:e,tagContent:n})}),(0,hT.jsx)("span",{children:t})]}):(0,hT.jsx)(hL.K0,{align:"left","aria-label":t,className:hM()(P7,{[P8]:f&&!m,[ke]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,hT.jsx)("div",{className:P9,children:(0,hT.jsx)(kt,{hasUnsavedChanges:y,getIcon:e,tagContent:n})})})};function kr({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,hT.jsx)(hL.$nd,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?ml:mi,children:e?oY("showLess","Show less"):oY("showMore","Show more")})}let ko={contactDetails:"-esm-form-engine__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-form-engine__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-form-engine__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-form-engine__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-form-engine__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-form-engine__patient-banner-contact-details-module__relationship___CZmay"},ki=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${o8}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=fn()(t,io),o=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,pT.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsxs)("p",{className:ko.heading,children:[oY("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,hT.jsx)(hL.OuH,{description:`${oY("loading","Loading")} ...`,role:"progressbar"}):(0,hT.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>Ev(e?.startDate).getTime()-Ev(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,hT.jsx)("li",{children:(0,hT.jsx)(pN,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,hT.jsx)("li",{children:"--"})})(),t.length>3&&(0,hT.jsx)("li",{className:ko.link,children:(0,hT.jsx)(pN,{to:`${window.spaBase}/home/patient-lists`,children:oY("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},ka=({patientId:e})=>{let{patient:t,isLoading:n}=hi(e),r=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return n?(0,hT.jsx)(hL.OuH,{description:`${oY("loading","Loading")} ...`,role:"progressbar"}):(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)("p",{className:ko.heading,children:oY("address","Address")}),(0,hT.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,hT.jsxs)("li",{children:[oY(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,hT.jsxs)("li",{children:[oY(e,e),": ",t]},`address-${e}`)):(0,hT.jsx)("li",{children:"--"})})]})},ks=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=fj({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:o}=(e=>{let{data:t,error:n,isLoading:r}=fA()(`${o8}/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)))`,io);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,pT.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:o,error:r}})(e),r=(0,pT.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?oY(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)("p",{className:ko.heading,children:oY("contactDetails","Contact Details")}),t?(0,hT.jsx)(hL.OuH,{description:`${oY("loading","Loading")} ...`,role:"progressbar"}):(0,hT.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,hT.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,hT.jsx)("li",{children:"--"})})]})},kl=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${o8}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:o,isValidating:i}=fn()(e?t:null,io),a=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?a:null,error:r,isLoading:o,isValidating:i}}(e);return(0,hT.jsxs)(hT.Fragment,{children:[(0,hT.jsx)("p",{className:ko.heading,children:oY("relationships","Relationships")}),n?(0,hT.jsx)(hL.OuH,{description:`${oY("loading","Loading")} ...`,role:"progressbar"}):(0,hT.jsx)("ul",{children:t&&t.length>0?(0,hT.jsx)(hT.Fragment,{children:t.map(e=>(0,hT.jsxs)("li",{className:ko.relationship,children:[(0,hT.jsx)("div",{children:(0,hT.jsx)(pN,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,hT.jsx)("div",{children:e.relationshipType}),(0,hT.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?oY("yearAbbreviation","yr"):oY("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,hT.jsx)("li",{children:"--"})})]})};function ku({patientId:e,deceased:t}){return(0,hT.jsxs)("div",{className:hM()(ko.contactDetails,{[ko.deceased]:t}),children:[(0,hT.jsxs)("div",{className:ko.row,children:[(0,hT.jsx)("div",{className:ko.col,children:(0,hT.jsx)(ka,{patientId:e})}),(0,hT.jsx)("div",{className:ko.col,children:(0,hT.jsx)(ks,{patientUuid:e})})]}),(0,hT.jsxs)("div",{className:ko.row,children:[(0,hT.jsx)("div",{className:ko.col,children:(0,hT.jsx)(kl,{patientId:e})}),(0,hT.jsx)("div",{className:ko.col,children:(0,hT.jsx)(ki,{patientUuid:e})})]})]})}function kc(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}let kd="-esm-form-engine__action-menu2-module__container___5s3CM";function kp({workspaceGroup:e,groupProps:t}){let n=f3(),{persistence:r}=e;return(0,hT.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,hT.jsxs)("div",{className:kd,children:["closable"==r&&f6(n)&&(0,hT.jsx)(hL.K0,{align:"left",onClick:()=>PY(),label:oY("close"),kind:"ghost",children:(0,hT.jsx)(mu,{})}),(0,hT.jsx)(pM.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,hT.jsx)(pZ,{className:kd,name:e.name,state:{groupProps:t}})})]})})}function kf(e){let t=new URL(e,window.location.origin).pathname,n=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,r=n.endsWith("/")?n.slice(0,-1):n,o=null;return r?r===t?o="/":t.startsWith(`${r}/`)&&(o=t.slice(r.length)):o=t,{full:t,spaRelative:o}}let kh=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=P1(),u=(0,pT.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await PX({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(o||await PX({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await PX({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:a&&a.props?a.props:null,workspaceMeta:py.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:o,windowName:n.windowName,showActionMenu:i},[t,s,a,n]);if(!e){let{registeredWorkspacesByName:e}=py.getState(),n=e[t.workspaceName],o=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=py.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,hT.jsxs)("div",{className:hM()(P6.workspaceOuterContainer,{[P6.narrowWorkspace]:"narrow"===u,[P6.widerWorkspace]:"wider"===u,[P6.extraWideWorkspace]:"extra-wide"===u,[P6.isActionMenuOpened]:c}),children:[(0,hT.jsx)("div",{className:P6.workspaceSpacer}),(0,hT.jsx)("div",{className:hM()(P6.workspaceMiddleContainer,{[P6.isRootWorkspace]:r,[P6.showActionMenu]:i}),children:(0,hT.jsx)("div",{className:hM()(P6.workspaceInnerContainer,{[P6.isRootWorkspace]:r}),children:(0,hT.jsx)(hL.OuH,{className:P6.loader,description:`${oY("loading")} ...`})})})]})}return(0,hT.jsx)(PL,{config:e,mountParcel:pC,...u},t.workspaceName)},km=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,o]=(0,pT.useState)({}),{registeredWorkspacesByName:i}=py.getState();return(0,pT.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=i[e.workspaceName];return[e.uuid,await hw(t,n)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,hT.jsx)(hT.Fragment,{children:n.map((o,i)=>(0,hT.jsx)(kh,{openedWorkspace:o,openedWindow:e,lifeCycle:r[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===n.length-1,showActionMenu:t},o.uuid))})};function ky(e){e&&(0,pY.createRoot)(e).render((0,hT.jsx)(kg,{}))}function kg(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=P1();if((0,pT.useEffect)(()=>cS("before-page-changed",t=>{let{newPage:r,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(r)return void o(PY().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),o=kf(t),i=kf(n);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=r.exec(o.spaRelative),s=r.exec(i.spaRelative);if(a&&s||(a=r.exec(o.full),s=r.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(PY().then(e=>!e))}),[e,n]),!e)return null;let o=n[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(r).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,hT.jsxs)("div",{className:hM()("-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-form-engine__workspace-windows-and-menu-module__overlay___fqI+X":o.overlay,"-esm-form-engine__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":i}),children:[(0,hT.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,hT.jsx)(km,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,hT.jsx)(kp,{workspaceGroup:o,groupProps:e.props})]})}function kb(e,t,n){if(null==e)return n;let r=SK(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let o=[];for(let e of t){let t=SK(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=r;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",n=o.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===i){i="fr-HT";continue}let r=i.lastIndexOf("-");if(-1===r)break;let a=(i=i.slice(0,r)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return n}function kv(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function kw(e){return!!e&&e.constructor===Object}var k_=n(2722);function kx(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function kS(e,t){let n=function(e){let t=e.indexOf("-");if(t>=0){let n=kx(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return kx(e)}(t);return k_.satisfies(n,e,{includePrerelease:!0})}async function kE(e,t={}){let n,{shouldRetry:r,getDelay:o,onError:i}=t;r=r??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await kD(o(a)),await e()}catch(e){i?.(e,a),n=e}while(r(a++));throw n}async function kD(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);
43
+ }`.trim(),document.head.prepend(r),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&Sr(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||Sl(this,n)},a=yE(Ss(document,"touchstart",t=>{let r=ge(t);e=wl(r)?r:wu(r,!0),n=!1;let o=r.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),Ss(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),Ss(document,"blur",e=>{let t=ge(e),n=e.relatedTarget;if(n&&Sr(n))n.focus({preventScroll:!0}),Sl(n,Sr(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),r.remove(),HTMLElement.prototype.focus=i}):yE((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?Sa(document.documentElement,"scrollbarGutter","stable"):Sa(document.documentElement,"paddingRight",`${s}px`)),Sa(document.documentElement,"overflow","hidden"))),()=>{0==--Si&&d()}}},[t])}({isDisabled:i||!t.isOpen}),(0,pk.useEffect)(()=>{if(t.isOpen&&r.current)if(i){var e,n,a=o?.current??r.current;let t=xU[xU.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,p,f,h;return e=[o?.current??r.current],i=(n={shouldUseInert:!0})instanceof(t=y9(e?.[0])).Element?{root:n}:n,a=i?.root??document.body,s=i?.shouldUseInert&&xB,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(y8(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=_E(y7(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&p(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)p(e),e=n.nextNode()}},p=e=>{let n=xV.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),xV.set(e,n+1))},xU.length&&xU[xU.length-1].disconnect(),d(a),(f=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>y8(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){f.observe(a,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}},xU.push(h),()=>{for(let e of(f.disconnect(),u)){let t=xV.get(e);null!=t&&(1===t?(c(e,!1),xV.delete(e)):xV.set(e,t-1))}h===xU[xU.length-1]?(xU.pop(),xU.length&&xU[xU.length-1].observe()):xU.splice(xU.indexOf(h),1)}}},[i,t.isOpen,r,o]),{popoverProps:yB(c,f),arrowProps:h,underlayProps:p,placement:m,triggerAnchorPoint:y}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:p?c:u},e),g=r.popoverRef,b=function(e,t=!0){let[n,r]=(0,pk.useState)(!0),o=n&&t;return yD(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),Sp(e,o,(0,pk.useCallback)(()=>r(!1),[])),o}(g,!!y)||r.isEntering||!1,v=yW({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!r.isNonModal||"SubmenuTrigger"===r.trigger,[x,S]=(0,pk.useState)(!1);yD(()=>{g.current&&S(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,pk.useEffect)(()=>{var e;let t,n;x&&g.current&&!g.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=y7(e=g.current)),"virtual"===Sf?gz(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&y6(e)}):y6(e))},[x,g]);let E={...f.style,...v.style},D=pC().createElement("div",{...yB(y3(r),f),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:g,slot:r.slot||void 0,style:E,dir:r.dir,"data-trigger":r.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!r.isNonModal&&pC().createElement(Sd,{onDismiss:e.close}),pC().createElement(xF.Provider,{value:{...m,placement:y,ref:a}},v.children),pC().createElement(Sd,{onDismiss:e.close}));return p?pC().createElement(xC,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=n?n:null==c?void 0:c.current)?i:void 0},D):pC().createElement(xC,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&pC().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),pC().createElement("div",{ref:u,style:{display:"contents"}},pC().createElement(Sk.Provider,{value:u},D)))}function ST(e){return e?.start!=null&&null!=e.end}let SR=(0,pk.createContext)(null),SN=(0,pk.createContext)(null),SA=(0,pk.createContext)(null),SM=(0,pk.createContext)(null),SI=(0,pk.forwardRef)(function(e,t){var n,r;[e,t]=yH(e,t,SR);let{validationBehavior:o}=yK(xI)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){let t=SO(e),[n,r]=_n(e.value,e.defaultValue||null,e.onChange),[o]=(0,pk.useState)(n),i=n||e.placeholderValue||null,[a,s]=xc(i,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,p]=(0,pk.useState)(null),[f,h]=(0,pk.useState)(null);if(n&&(d=n,"hour"in n&&(f=n)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=n?.calendar.identifier==="gregory"&&"BC"===n.era,y=(0,pk.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,pk.useMemo)(()=>xo(n,g,b,v,y),[n,g,b,v,y]),x=_7({...e,value:n,builtinValidation:w}),S=x.displayValidation.isInvalid,E=e.validationState||(S?"invalid":null),D=(e,t)=>{r("timeZone"in t?t.set(vL(e)):vF(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:n,defaultValue:e.defaultValue??o,setValue:r,dateValue:d,timeValue:f,setDateValue:n=>{let o="function"==typeof c?c():c;u?f||o?D(n,f||xl(e.defaultValue||e.placeholderValue)):p(n):(r(n),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&D(d,f||xl(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:E,isInvalid:S,formatValue:(e,t)=>l?new bG(e,xs(t,y)).format(l):"",getDateFormatter:(e,t)=>new bG(e,xs({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,pk.useRef)(null),[l,u]=yz(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,n){var r;let o=y$(),i=y$(),a=y$(),s=b9((r=_H)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=_q({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=_z(t,n),y=p["aria-labelledby"]||p.id,{locale:g}=bB(),b=t.formatValue(g,{month:"long"}),v=wm(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=y3(e),S=(0,pk.useMemo)(()=>_B(n),[n]),E=(0,pk.useRef)(!1),{focusWithinProps:D}=bp({...e,isDisabled:t.isOpen,onBlurWithin:t=>{y8(document.getElementById(i),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:yB(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...d,onClick:()=>{S.focusFirst()}},fieldProps:{...p,id:a,[_Q]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,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,[_5]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...yG(e),label:u,validationBehavior:i},a,s),[v,w]=(0,pk.useState)(null),x=(0,pk.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);x9({ref:s,onResize:x});let{focusProps:S,isFocused:E,isFocusVisible:D}=bf({within:!0}),O=yW({...e,values:{state:a,isFocusWithin:E,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=y3(e);return delete P.id,pC().createElement(yU,{values:[[SA,a],[_w,{...c,ref:s,isInvalid:a.isInvalid}],[xw,p],[bx,{...f,isPressed:a.isOpen}],[x$,{...d,ref:l,elementType:"span"}],[_l,m],[xT,a],[SP,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[xj,h],[bD,{slots:{description:y,errorMessage:g}}],[xN,b]]},pC().createElement("div",{...S,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),S$=(0,pk.forwardRef)(function(e,t){var n,r;[e,t]=yH(e,t,SN);let{validationBehavior:o}=yK(xI)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",a=function(e){let t=SO(e),[n,r]=_n(e.value,e.defaultValue||null,e.onChange),[o]=(0,pk.useState)(n),[i,a]=(0,pk.useState)(()=>n||{start:null,end:null});null==n&&i.start&&i.end&&a(i={start:null,end:null});let s=n||i,l=e=>{a(s=e||{start:null,end:null}),ST(s)?r(s):r(null)},[u,c]=xc(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,p=e.shouldCloseOnSelect??!0,[f,h]=(0,pk.useState)(null),[m,y]=(0,pk.useState)(null);s&&ST(s)&&(f=s,"hour"in s.start&&(m=s));let g=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(vL(e.start)):vF(e.start,t.start),end:"timeZone"in t.end?t.end.set(vL(e.end)):vF(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=n=>{let r="function"==typeof p?p():p;d?ST(n)&&(r||m?.start&&m?.end)?g(n,{start:m?.start||xl(e.placeholderValue),end:m?.end||xl(e.placeholderValue)}):h(n):ST(n)?(l(n),P.commitValidation()):h(n),r&&t.setOpen(!1)},v=e=>{ST(f)&&ST(e)?g(f,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,pk.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:S,maxValue:E,isDateUnavailable:D}=e,O=(0,pk.useMemo)(()=>{var e;let t;return e=s,t=xt(xo(e?.start??null,S,E,D,x),xo(e?.end??null,S,E,D,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=xt(t,{isInvalid:!0,validationErrors:[(b2.getGlobalDictionaryForPackage("@react-stately/datepicker")||xn).getStringForLocale("rangeReversed",xr())],validationDetails:{..._2,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,S,E,D,x]),P=_7({...e,value:n,name:(0,pk.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),k=P.displayValidation.isInvalid,C=e.validationState||(k?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:f,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:f?.end??null}):b({start:f?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&ST(f)&&d&&g(f,{start:m?.start||xl(e.placeholderValue),end:m?.end||xl(e.placeholderValue)}),t.setOpen(n)},validationState:C,isInvalid:k,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=xs(n,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),p=new bG(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let o=0;o<e.length;o++)o<t?n+=e[o].value:o>t&&(r+=e[o].value);return{start:n,end:r}}catch{}r=p}else r=new bG(t,xs(n,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new bG(e,xs({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,pk.useRef)(null),[l,u]=yz(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,n){var r;let o=b9((r=_H)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=_q({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=u["aria-labelledby"]||u.id,{locale:f}=bB(),h=t.formatValue(f,{month:"long"}),m=wm(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":p},g={"aria-label":o.format("endDate"),"aria-labelledby":p},b=y$(),v=y$(),w=_z(t,n),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,pk.useMemo)(()=>_B(n,{accept:e=>e.id!==b}),[n,b]),E={[_X]:S,[_Q]:"presentation","aria-describedby":x,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},D=y3(e),O=(0,pk.useRef)(!1),{focusWithinProps:P}=bp({...e,isDisabled:t.isOpen,onBlurWithin:t=>{y8(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),k=(0,pk.useRef)(_3),C=(0,pk.useRef)(_3);return{groupProps:yB(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${p}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${p}`},startFieldProps:{...y,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[_5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(xt(e,C.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[_5]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(xt(k.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...yG(e),label:u,validationBehavior:i},a,s),[w,x]=(0,pk.useState)(null),S=(0,pk.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);x9({ref:s,onResize:S});let{focusProps:E,isFocused:D,isFocusVisible:O}=bf({within:!0}),P=yW({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=y3(e);return delete k.id,pC().createElement(yU,{values:[[SM,a],[_w,{...c,ref:s,isInvalid:a.isInvalid}],[bx,{...h,isPressed:a.isOpen}],[x$,{...d,ref:l,elementType:"span"}],[_u,y],[xT,a],[SP,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[xj,m],[xw,{slots:{start:p,end:f}}],[bD,{slots:{description:g,errorMessage:b}}],[xN,v]]},pC().createElement("div",{...E,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function SL(e){return pC().createElement(bF,e)}function SF(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof vO||e instanceof vk||e instanceof vC)return t?vB(e,t):e;{let n=hl()(e).toDate(),r=new vO(n.getFullYear(),n.getMonth()+1,n.getDate());return t?vB(r,t):r}}function SB(e){if(e)return e.toDate(vQ())}function SV(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function SU(e){let t=e??"",n=SV(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function SW(){let e=window.i18next.language,t=SV(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ec=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ec=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var SK=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ec||"en-US"),SH=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Sz={};for(let e=1;e<100;e++)Sz[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var SG={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},Sq="[1234567890一二三四五六七八九〇\\d]",SZ={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},SY={},SJ={"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},SQ={zone:SJ,year:Sz,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:{}},SX={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(SJ).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,}"},S0={...SX,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}"},S1={},S2=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=SK){return S1[t.toLowerCase()]||(S1[t.toLowerCase()]=new e(t)),S1[t.toLowerCase()]}constructor(e=SK){this.locale=e,this.lookups={...SQ},this.vars={...SX};let 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 n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);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 n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}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,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=SZ: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(SY[e])return SY[e];if("fullwide"===e||"hanidec"===e)return{group:Sq,lookup:{...SZ}};let t=SG[e];if(!t)return{group:"\\d",lookup:{...SZ}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return SY[e]={group:`[${n}-${r}]`,lookup:o},SY[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,S0)S0.hasOwnProperty(n)&&(this.vars[n]=S0[n].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((n,r)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(n[a]).find(r).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]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(n[i]).find(r).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+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 n=[],r={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=a}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);n.push(s),r[s]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}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")}},S4=["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"],S3={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},S6=()=>new Date;function S5(e){return function(t){let n={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(n[o]=t[r])}return n}}var S7=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;r=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},S9=["year","month","day","hour","minute","second","millisecond","offset"],S8={};function Ee(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 Et=[[/([^\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"]],En={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," "],...Et],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:Et,id:Et,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Er(e,t=SK){let n=function(e){if(!S8[e]){var t,n;let r,o,i=S2.factory(e);S8[e]=new S7({doneChecker:Ee,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:S5(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:S5(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:S5(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${Sq}{2,4})\\s*\u5E74\\s*(${Sq}{1,2})\\s*\u6708\\s*(${Sq}{1,2})\\s*\u65E5$`),handler:S5(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:S5(["","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:S5(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=S6(),n=e[1].toLowerCase();switch(n){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let r={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===n&&(r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()),console.log("today=>",n,r),r}},{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,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?S3[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let o=S6();return"millisecond"===n?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===n?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===n?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===n?o.setUTCHours(o.getUTCHours()+t):"day"===n?o.setUTCDate(o.getUTCDate()+t):"month"===n?o.setUTCMonth(o.getUTCMonth()+t):"year"===n&&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:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:S5(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:S5(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:S5(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:S5(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:S5(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:S5(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:S5(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:S5(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:S5(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:S5(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:S5(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:S5(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:S5(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:S5(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:S5(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:S5(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:S5(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:S5(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:S5(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:S5(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:S5(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:S5(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:S5(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:S5(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:S5(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:S5(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:S5(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:S5(["zone"])}],o=i.baseName.slice(0,5),S4.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=i,function(e){let t={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=n.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(o,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(o){let e=n.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(S9.includes(r)){let e=n.toInt(o);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=Sz[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return S8[e]}(t),r=function(e,t){let n=En[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function Eo(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new SH(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 SH(t.valueOf()-60*e.offset*1e3):t}function Ei(e,t=SK){let n=Er(e,t),r=n.invalid?new SH(NaN):Eo(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function Ea(e,t=SK){return e instanceof Date?new SH(e.valueOf()):"number"==typeof e?new SH(e):Ei(e,t)}Date.fromString=SH.fromString=Ei,Date.fromAny=SH.fromAny=Ea,"u">typeof window&&(window.anyDateParser={fromString:Ei,fromAny:Ea,fromObject:Eo,attempt:Er});var Es=n(44397),El=n(57657);let Eu=function(e){return null==e};function Ec(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}hl().extend(hu),hl().extend(El),hl().extend(Es);let Ed="YYYY-MM-DDTHH:mm:ss.SSSZZ";function Ep(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&hl()(e,Ed).isValid()}function Ef(e){return hl()(e).isToday()}function Eh(e){return Ep(e)?hl()(e,Ed).toDate():null}function Em(e,t=!1){let n=hl()(e);return t&&(n=n.utc()),n.format(Ed)}function Ey(e){return hl()(e).toDate()}var Eg=new WeakMap;let Eb=new class{register(e,t){Ec(this,Eg).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(Ec(this,Eg).has(t))return Ec(this,Eg).get(t)}if(e.language&&Ec(this,Eg).has(e.language))return Ec(this,Eg).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Ec(this,Eg).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,Eg,{writable:!0,value:new Map})}};function Ev(e,t){Eb.register(e,t)}function Ew(e){let t=e??SW();return Eb.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let E_={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function Ex(e,t={}){let n=Er(e,SW());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!Eu(n.day)&&Eu(n.month)&&(n=Object.assign({},tE(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tE(n,"day"),{date:n.day}));let r=hl()().set(n).toDate();return Eu(n.year)&&(t.year=!1),Eu(n.month)&&(t.month=!1),Eu(n.date)&&(t.day=!1),ES(r,t)}function ES(e,t){let n,r=t?.locale??SW(),o=new Intl.Locale(r),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...E_,...{noToday:"am"===o.language},...t},f={calendar:i??Ew(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=hl()(e).isToday();if(h&&!d)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===o.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(EE("-"))),"wide"==a&&(t=t.map(EE(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(n+=`, ${ED(e)}`),n}let EE=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function ED(e){return e.toLocaleTimeString(SW(),{hour:"2-digit",minute:"2-digit"})}function EO(e,t){return ES(e,{...t,time:!0})}function EP(e,t){let n=Ew("string"==typeof t?new Intl.Locale(t):t);return n?vB(e,w4(n)):e}function Ek(e,t){return new Intl.DurationFormat(SW(),t).format(e)}function EC(e,t){if(null==e)return null;if("string"==typeof e){let n=Er(e,SW());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tE(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tE(n,"day"),...{date:n.day}}),hl()(t).set(n))}return hl()(e)}let Ej=["years","months","days","hours","minutes","seconds"],ET={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},ER={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function EN(e,t=hl()(),n){let r,o=hl()(t),i=EC(e,o);if(null==i)return null;if("string"==typeof n){let e=ET[n]??n;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?ET[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=Ej.indexOf(n);for(let o=0;o<Ej.length;o++){let i=Ej[o];if(t.diff(e,i)>0)return o<=r?i:n}return n}(i,o,t??"seconds"):ET[s]??s,function(e,t,n,r){let o=Ej.indexOf(n),i=Ej.indexOf(r),a=Ej.slice(o,i+1),s={},l=e;for(let e of a){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(i,o,e,t??e)}let u=(r=function(e){let t={...ER};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[ET[n]??n]=r);return t}(a),o.diff(i,"seconds")<r.seconds?"seconds":o.diff(i,"minutes")<r.minutes?"minutes":o.diff(i,"hours")<r.hours?"hours":o.diff(i,"days")<r.days?"days":o.diff(i,"months")<r.months?"months":"years");return{[u]:o.diff(i,u)}}let EA={style:"short",localeMatcher:"lookup"};function EM(e,t=hl()(),n){let r=EN(e,t,n);return null==r?null:Ek(r,"object"==typeof n&&n.formatOptions?{...EA,...n.formatOptions}:EA)}let EI=(0,pk.createContext)(null);function E$(){let e=fP({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,pk.useMemo)(()=>{let t=SW();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,pk.useMemo)(()=>{let e=Ew(t);return void 0!==e?w4(e):void 0},[t]),r=(0,pk.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),o=(0,pk.useMemo)(()=>n?vB(vq(vQ()),n):vq(vQ()),[n]);return{calendar:n,intlLocale:r,today_:o}}let EL=new vO(1793,1,1);var EF={};function EB(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function EV(e={}){let{locale:t}=bB();return(0,pk.useMemo)(()=>new(0,xm.K)(t,e),[t,e])}EF={"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 EU={};EU={"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:"空白"}};let EW=()=>{};function EK(e){var t;let n=(0,pk.useRef)(void 0),{value:r,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=b9((t=EU)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,pk.useRef)(!1),b=(0,pk.useCallback)(()=>{clearTimeout(n.current),g.current=!1},[]),v=g9(()=>{b()});(0,pk.useEffect)(()=>()=>v(),[]);let w=(0,pk.useRef)(!1),x=()=>{w.current=!0},S=()=>{w.current=!1},E=""===o?y.format("Empty"):(o||`${r}`).replace("-","−");(0,pk.useEffect)(()=>{w.current&&(bV&&bV.clear("assertive"),bU(E,"assertive"))},[E]);let D=(0,pk.useCallback)(()=>{b()},[b]),O=g9(c??EW),P=g9(p??EW),k=g9(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r<a)&&(O(),C(60))}),C=g9(e=>{v(),g.current=!0,n.current=window.setTimeout(k,e)}),j=g9(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r>i)&&(P(),T(60))}),T=g9(e=>{v(),g.current=!0,n.current=window.setTimeout(j,e)}),R=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:A}=g8(),M=(0,pk.useRef)(!1),[I,$]=(0,pk.useState)(null);(0,pk.useEffect)(()=>{"touch"===I?C(600):I&&C(400)},[I]);let[L,F]=(0,pk.useState)(null);return(0,pk.useEffect)(()=>{"touch"===L?T(600):L&&T(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":E,"aria-valuemin":i,"aria-valuemax":a,"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&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(f){e.preventDefault(),f?.();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),p?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(N(window,"pointercancel",D,{capture:!0}),M.current=!1,$("touch")),N(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&c?.(),M.current=!1,$(null)},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(p?.(),F("mouse")):(N(window,"pointercancel",D,{capture:!0}),M.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&p?.(),M.current=!1,F(null)},onFocus:x,onBlur:S}}}let EH=null;var Ez=n(72103);function EG(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let o=t.toString().split("."),i=n.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),n=Math.round(n*a),r=("+"===e?t+n:t-n)/a}return r}let Eq=(0,pk.createContext)(null),EZ=(0,pk.createContext)(null),EY=(0,pk.forwardRef)(function(e,t){var n,r;[e,t]=yH(e,t,Eq);let{validationBehavior:o}=yK(xI)||{},i=null!=(r=null!=(n=e.validationBehavior)?n:o)?r:"native",{locale:a}=bB(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let p=(0,pk.useCallback)(e=>void 0===r||isNaN(r)?xW(e,t,n):xH(e,t,n,r),[r,t,n]);void 0===i||isNaN(i)||"snap"!==d||(i=p(i)),isNaN(a)||"snap"!==d||(a=p(a));let[f,h]=_n(i,isNaN(a)?NaN:a,s),[m]=(0,pk.useState)(f),[y,g]=(0,pk.useState)(()=>isNaN(f)?"":new(0,xm.K)(l,o).format(f)),b=(0,pk.useMemo)(()=>new(0,Ez.d)(l,o),[l,o]),v=(0,pk.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,pk.useMemo)(()=>new(0,xm.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,pk.useMemo)(()=>w.resolvedOptions(),[w]),S=(0,pk.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=_7({...e,value:f}),D=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(D=.01);let[O,P]=(0,pk.useState)(f),[k,C]=(0,pk.useState)(l),[j,T]=(0,pk.useState)(o);Object.is(f,O)&&l===k&&o===j||(g(S(f)),P(f),C(l),T(o));let R=(0,pk.useMemo)(()=>b.parse(y),[b,y]),N=(e,r=0)=>{if(isNaN(R))return xH(isNaN(r)?0:r,t,n,D);{let r=xH(R,t,n,D);return"+"===e&&r>R||"-"===e&&r<R?r:xH(EG(e,R,D),t,n,D)}},A=(0,pk.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===n||isNaN(n)||xH(R,t,n,D)>R||EG("+",R,D)<=n),[u,c,t,n,D,R]),M=(0,pk.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||xH(R,t,n,D)<R||EG("-",R,D)>=t),[u,c,t,n,D,R]);return{...E,validate:e=>b.isValidPartialNumber(e,t,n),increment:()=>{let e=N("+",t);e===f&&g(S(e)),h(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(h(xH(n,t,n,D)),E.commitValidation())},decrement:()=>{let e=N("-",n);e===f&&g(S(e)),h(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),E.commitValidation())},canIncrement:A,canDecrement:M,minValue:t,maxValue:n,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,n=R;if(void 0!==e&&(n=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":S(f));return}if(isNaN(n))return void g(S(f));let r="snap"===d?p(n):n,o=(r=b.parse(S(r)))!==f;h(r),g(S(void 0===i?r:f)),o&&E.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,pk.useRef)(null),[u,c]=yz(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,n){var r,o,i,a,s,l,u,c,d;let p,{id:f,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:S,formatOptions:E,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:k,onKeyUp:C,description:j,errorMessage:T,isWheelDisabled:R,...N}=e,{increment:A,incrementToMax:M,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=b9((r=EF)&&r.__esModule?r.default:r,"@react-aria/numberfield"),W=(0,pk.useCallback)(()=>{let e=n.current?.value??"";(0,be.flushSync)(()=>{B()}),n.current?.value!==e&&bU(n.current?.value??"","assertive")},[B,n]),K=y$(f),{focusProps:H}=gq({onBlur(){W()}}),z=EV(E),G=(0,pk.useMemo)(()=>z.resolvedOptions(),[z]),q=EV({...E,currencySign:void 0}),Z=(0,pk.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Y,incrementButtonProps:J,decrementButtonProps:Q}=EK({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:A,onIncrementToMax:M,onDecrement:I,onDecrementToMin:$,value:L,textValue:Z}),[X,ee]=(0,pk.useState)(!1),{focusWithinProps:et}=bp({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:n,isDisabled:r}=e,o=(0,pk.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);ws(t,"wheel",r?void 0:o)}({onScroll:(0,pk.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?A():e.deltaY<0&&I())},[I,A]),isDisabled:R||y||g||!X},n);let en=(G.maximumFractionDigits??0)>0,er=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";gb()?er?eo="text":en&&(eo="decimal"):gS()&&(er?eo="numeric":en&&(eo="decimal"));let ei=y3(e),ea=(0,pk.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,be.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ep,errorMessageProps:ef}=function(e,t,n){let r=g9(e=>{let r=n.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,pk.useEffect)(()=>{if(!EB()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let o=EB()?null:e=>{let n=ge(e).value.slice(0,ge(e).selectionStart)+e.data+ge(e).value.slice(ge(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=_n(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=gQ(e,t),d=_7({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=_q({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=y3(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,pk.useState)(l);return _Z(t,e.defaultValue??x,u),_Y(e,d,t),{labelProps:m,inputProps:yB(v,"input"===n?w:void 0,{disabled:r,readOnly:i,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(ge(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(pC().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,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:p,validationErrors:f,validationDetails:h}}(e,n),c=(0,pk.useRef)(null);return{inputProps:yB(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;c.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=c.current;n.current.value=e,n.current.setSelectionRange(r,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...N,...ei,name:void 0,form:void 0,label:S,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[_5]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:K,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onKeyDown:(0,pk.useMemo)(()=>yE(ea,k),[ea,k]),onKeyUp:C,onPaste:t=>{e.onPaste?.(t);let n=ge(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,n);_Z(n,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,yD(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!EH&&"u">typeof document&&((EH=document.createElement("input")).type="number"),!EH))return;EH.min=null==l||isNaN(l)?"":String(l),EH.max=null==u||isNaN(u)?"":String(u),EH.step=null==c||isNaN(c)?"":String(c),EH.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&EH.validity.valid,n=e.validationMessage||EH.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:EH.validity.rangeOverflow,rangeUnderflow:EH.validity.rangeUnderflow,stepMismatch:EH.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(r),"native"!==i||EH.validity.valid||e.setCustomValidity(EH.validationMessage)});let eh=yB(Y,H,ed,{role:null,"aria-roledescription":gw()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(p=null!=e.label?ec.id:e["aria-labelledby"]);let eg=y$(),eb=y$(),ev=yB(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:p&&!m?eg:null,"aria-labelledby":p&&!m?`${eg} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),ew=yB(Q,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:p&&!h?eb:null,"aria-labelledby":p&&!h?`${eb} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:ew,errorMessageProps:ef,descriptionProps:ep,isInvalid:es,validationErrors:el,validationDetails:eu}}({...yG(e),label:c,validationBehavior:i},s,l),v=yW({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=y3(e);return delete w.id,pC().createElement(yU,{values:[[EZ,s],[_w,p],[_x,{...f,ref:l}],[x$,{...d,ref:u}],[bx,{slots:{increment:h,decrement:m}}],[bD,{slots:{description:y,errorMessage:g}}],[xN,b]]},pC().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&pC().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function EJ(e,t){return Number.parseInt(ES(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let EQ=(0,pk.forwardRef)(function(e,t){let{className:n}=e,r=(0,pk.useContext)(_c),o=(0,pk.useContext)(_d),i=r??o,a=(0,pk.useContext)(EI),s=vQ(),l=ES(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=EJ(i.visibleRange.start.toDate(s),a),c=i.maxValue?EJ(i.maxValue.toDate(s),a):void 0,d=i.minValue?EJ(i.minValue.toDate(s),a):void 0,p=(0,pk.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,hk.jsxs)("span",{ref:t,className:n,children:[(0,hk.jsx)("span",{children:l}),(0,hk.jsxs)(EY,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,hk.jsx)(_S,{}),(0,hk.jsxs)(__,{children:[(0,hk.jsx)(bS,{slot:"increment",children:(0,hk.jsx)(h5,{size:8})}),(0,hk.jsx)(bS,{slot:"decrement",children:(0,hk.jsx)(h4,{size:8})})]})]})]})}),EX="-esm-form-engine__datepicker-module__inputGroup___gBam-",E0="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",E1="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",E2="-esm-form-engine__datepicker-module__invalidText___A4cv4",E4="-esm-form-engine__datepicker-module__flatButton___HcpME",E3="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",E6="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",E5="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function E7({children:e}){let t=(0,pk.useContext)(SA),n=(0,pk.useContext)(SM),r=t??n,o=f5(()=>r?.close());return(0,hk.jsx)(xR,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:o,children:e})}let E9=(0,pk.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},o){let i="range"===e;return(0,hk.jsx)(SC,{ref:o,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,hk.jsx)(E7,{children:(0,hk.jsxs)(i?_f:_p,{...i?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,hk.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,hk.jsx)(bS,{className:hj()(E4,E3),slot:"previous",children:(0,hk.jsx)(mr,{size:16})}),(0,hk.jsx)(EQ,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,hk.jsx)(bS,{className:hj()(E4,E3),slot:"next",children:(0,hk.jsx)(mo,{size:16})})]}),(0,hk.jsx)(_m,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,hk.jsx)(_v,{className:hj()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),E8=(0,pk.forwardRef)(function(e,t){let n=(0,pk.useContext)(SA),[r,o]=yH({slot:e.slot},t,xw),{locale:i}=bB(),a=xv({...r,locale:i,createCalendar:w4}),s=(0,pk.useRef)(null),{fieldProps:l,inputProps:u}=_0({...r,inputRef:s},a,o),c=(0,pk.useCallback)(()=>{a.isDisabled||n.toggle()},[]);return(0,hk.jsxs)(yU,{values:[[x_,a],[_x,{...u,ref:s}],[_w,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,hk.jsx)(__,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,n)=>(0,pk.cloneElement)(e.children(t),{key:n}))}),(0,hk.jsx)(_S,{})]})}),De=(0,pk.forwardRef)(function(e,t){let n=(0,pk.useContext)(SA),r=(0,pk.useContext)(SM);return(n??r).isInvalid?(0,hk.jsx)(yd,{ref:t,size:16,...e}):(0,hk.jsx)(h2,{ref:t,size:16,...e})});class Dt{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Dn=new Map,Dr=(0,pk.forwardRef)(function({segment:e,...t},n){let r=(0,pk.useContext)(x_),o=y_(n),{segmentProps:i}=function(e,t,n){let r,o,i,a,s=(0,pk.useRef)(""),{locale:l,direction:u}=bB(),c=function(){var e;let{locale:t}=bB(),n=b7((e=_H)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,pk.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Dt(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=_J.get(t),m=e.isPlaceholder?"":e.text,y=(0,pk.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=bQ({month:"long",timeZone:y.timeZone}),b=bQ({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=EK({value:e.value??void 0,textValue:m,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="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,pk.useMemo)(()=>new(0,Ez.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=w.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:S}=(r=function(e){let{locale:t}=bB(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Dn.has(n))return Dn.get(n);let r=new Intl.Collator(t,e);return Dn.set(n,r),r}({usage:"search",sensitivity:"base"}),o=(0,pk.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),i=(0,pk.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),a=(0,pk.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,o=(t=t.normalize("NFC")).length;for(;n+o<=e.length;n++){let i=e.slice(n,n+o);if(0===r.compare(t,i))return!0}return!1},[r]),(0,pk.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),E=bQ({hour:"numeric",hour12:!0}),D=(0,pk.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),O=(0,pk.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),P=bQ({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,pk.useMemo)(()=>{if("era"!==e.type)return[];let n=vB(new vO(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[P,t.calendar,e.type]),C=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(S(D,n))t.setSegment("dayPeriod",0);else if(S(O,n))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>S(e.formatted,n));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(r))return;let o=w.parse(r),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(n)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=r}}};ws((0,pk.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&y8(n.current,e?.anchorNode)&&e.collapse(n.current)});let j=(0,pk.useRef)("");ws(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":j.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&C(r.data)}}),ws(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=j.current),null!=r&&(S(D,r)||S(O,r))&&C(r))}),yD(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[n,h]);let T=gw()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,pk.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let R=y$(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),M=wn({"aria-label":`${A}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:yB(v,M,{id:R,...T,"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(pC().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&&(gg()?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(),x()}},onFocus:()=>{s.current="",n.current&&wp(n.current,{containingElement:wu(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:a,isFocused:s,isFocusVisible:l}=bf(),{hoverProps:u,isHovered:c}=bb({...t,isDisabled:r.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,pk.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof n?n({...s,defaultStyle:a||{}}):n,u="function"==typeof r?r({...s,defaultChildren:i}):null==r?i:r,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,n,r,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,pk.useCallback)(e=>{e.stopPropagation()},[]);return(0,hk.jsx)("span",{...yB(y3(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.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})}),Do={short:!1,size:"md"},Di=(0,pk.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:g,...b}={...Do,...e},{calendar:v,intlLocale:w,today_:x}=E$(),S=(0,pk.useId)(),E=!!(u??l),D=(0,pk.useMemo)(()=>SF(r,v),[r,v]),O=(0,pk.useMemo)(()=>SF(g,v,!0),[g,v]),P=(0,pk.useMemo)(()=>SF(d,v),[d,v]),k=(0,pk.useMemo)(()=>SF(p??EL,v),[p,v]),C=(0,pk.useMemo)(()=>i||s,[i,s]),j=(0,pk.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(SB(e)))),[h,f]);return(0,hk.jsx)(SL,{locale:w.toString(),children:(0,hk.jsx)("div",{className:hj()("cds--form-item",n),children:(0,hk.jsx)(yU,{values:[[EI,w]],children:(0,hk.jsxs)(SI,{className:hj()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,hk.jsx)(xL,{className:hj()("cds--label",{"cds--label--disabled":o}),htmlFor:S,children:u??l}),(0,hk.jsxs)(__,{className:EX,children:[(0,hk.jsx)(E8,{id:E?S:void 0,ref:t,className:hj()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__inputWrapper___uKdT1",{"-esm-form-engine__datepicker-module__inputWrapperSm___0RXJc":"sm"===y,"-esm-form-engine__datepicker-module__inputWrapperMd___4Vff1":"md"===y||!y||0===y.length,"-esm-form-engine__datepicker-module__inputWrapperLg___VCRm5":"lg"===y}),children:e=>"era"!==e.type?(0,hk.jsx)(Dr,{className:E0,segment:e}):(0,hk.jsx)(pC().Fragment,{})}),(0,hk.jsx)(bS,{className:hj()(E4,{[E6]:"sm"===y,[E3]:"md"===y||!y||0===y.length,[E5]:"lg"===y}),children:(0,hk.jsx)(De,{})})]}),(0,hk.jsx)(xA,{className:E2,children:a})]}),(0,hk.jsx)(E9,{variant:"single",today_:x})]})})})})}),Da=(0,pk.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=E$(),w=(0,pk.useId)(),x=!!(s??a),S=(0,pk.useMemo)(()=>{if(h)return{start:SF(h[0],g,!1),end:SF(h[1],g,!1)}},[h,g]),E=(0,pk.useMemo)(()=>{if(t)return{start:SF(t[0],g,!1),end:SF(t[1],g,!1)}},[t,g]),D=(0,pk.useMemo)(()=>SF(c??EL,g,!0),[c,g]),O=(0,pk.useMemo)(()=>SF(u,g,!0),[u,g]),P=(0,pk.useMemo)(()=>n||i,[n,i]),k=(0,pk.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?.([SB(e.start),SB(e.end)]))),[p,d]);return(0,hk.jsx)(SL,{locale:b.toString(),children:(0,hk.jsx)("div",{className:hj()("cds--form-item",e),children:(0,hk.jsx)(yU,{values:[[EI,b]],children:(0,hk.jsx)(S$,{id:x?w:void 0,className:hj()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:S,defaultValue:E,ref:y,isDisabled:o,...m,onChange:k,children:(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,hk.jsx)(xL,{className:hj()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,hk.jsxs)(__,{className:EX,children:[(0,hk.jsxs)("div",{className:hj()("-esm-form-engine__datepicker-module__inputsWrapper___xXRQI",{"-esm-form-engine__datepicker-module__inputsWrapperSm___nL+b6":"sm"===f,"-esm-form-engine__datepicker-module__inputsWrapperMd___Kgcps":"md"===f||!f||0===f.length,"-esm-form-engine__datepicker-module__inputsWrapperLg___raaSN":"lg"===f}),children:[(0,hk.jsx)(xS,{className:hj()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",E1),slot:"start",children:e=>(0,hk.jsx)(Dr,{className:E0,segment:e})}),(0,hk.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,hk.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,hk.jsx)(xS,{className:hj()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",E1),slot:"end",children:e=>(0,hk.jsx)(Dr,{className:E0,segment:e})})]}),(0,hk.jsx)(bS,{className:hj()(E4,{[E6]:"sm"===f,[E3]:"md"===f||!f||0===f.length,[E5]:"lg"===f}),children:(0,hk.jsx)(De,{})})]}),(0,hk.jsx)(xA,{className:E2,children:r}),(0,hk.jsx)(E9,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Ds=({diagnoses:e})=>{let{diagnosisTags:t}=fP({externalModuleName:"@openmrs/esm-styleguide"});return(0,hk.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:n,uuid:r,display:o}=e,i=t[1===n?"primaryColor":"secondaryColor"];return(0,hk.jsx)(hM.Tag,{type:i,children:o},r)})})},Dl={action:"-esm-form-engine__empty-card-module__action___oG778",content:"-esm-form-engine__empty-card-module__content___YUXvR",desktopHeading:"-esm-form-engine__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-form-engine__empty-card-module__tabletHeading___8mc7w",tile:"-esm-form-engine__empty-card-module__tile___3-rRO"},Du=({width:e="64",height:t="64"})=>(0,hk.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,hk.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Dc=e=>{let t="tablet"===f1(),n=e.launchForm;return(0,hk.jsx)(hM.Layer,{className:Dl.layer,children:(0,hk.jsxs)(hM.Tile,{className:Dl.tile,children:[(0,hk.jsx)("div",{className:t?Dl.tabletHeading:Dl.desktopHeading,children:(0,hk.jsx)("h4",{children:e.headerTitle})}),(0,hk.jsx)(Du,{}),(0,hk.jsx)("p",{className:Dl.content,children:oG("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,hk.jsx)("p",{className:Dl.action,children:n&&(0,hk.jsx)(hM.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:oG("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Dd=({error:e,headerTitle:t})=>{let n="tablet"===f1();return(0,hk.jsx)(hM.Layer,{children:(0,hk.jsxs)(hM.Tile,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,hk.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,hk.jsx)("h4",{children:t})}),(0,hk.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[oG("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,hk.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:oG("errorCopy")})]})})},Dp=Dd,Df=pC().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:o,state:i}=f3(),a=window.location??{pathname:""},s=pW(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,hk.jsxs)(hM.SideNav,{"aria-label":oG("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,hk.jsx)(pz,{name:"global-nav-menu-slot"}),n?(0,hk.jsx)(fg,{value:o,fallback:(0,hk.jsx)(pz,{name:n,state:{basePath:r,currentPath:a,...i}}),children:(0,hk.jsx)(pj.Provider,{value:o,children:(0,hk.jsx)(pz,{name:n,state:{basePath:r,currentPath:a,...i}})})}):null]}):null}),Dh=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:o})=>{let[i,a]=(0,pk.useState)(""),s=(0,pk.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:o}=fR()(t,ie,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,pk.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&o}),[n,o,r,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:h}=function(e,t=0,n=""){let r=fj(n),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=fG()(function(n,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 i=`${o7}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),n&&a.append("_getpagesoffset",""+n*t),e&&a.append("_tag",e),"string"==typeof r&&""!==r&&a.append("name:contains",r),i+a.toString()},ie);return(0,pk.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(n,r,i),m=(0,pk.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,pk.useCallback)(e=>{o(),a(e.trim())},[o]),g=f7((0,pk.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),b=d?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)(hM.Search,{"aria-describedby":f?`${s}-error`:void 0,labelText:oG("searchForLocation"),id:s,placeholder:oG("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,hk.jsx)(hM.InlineNotification,{kind:"error",subtitle:oG("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:oG("error","Error")})}),(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,hk.jsx)(hM.RadioButtonSkeleton,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:m.length>0?(0,hk.jsx)(hM.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,hk.jsx)(hM.RadioButton,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,hk.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,hk.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:oG("noResultsToDisplay")})})}),p&&(0,hk.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,hk.jsx)(hM.InlineLoading,{description:oG("loading")})})]})})]})},Dm=Z("modalState",{modalContainer:null,modalStack:[]}),Dy=0;async function Dg(e,t,n={}){let r=pi(t),o=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=r,a=await i(),s=Dy++;o=await pE({...a,name:`${t}-${s}`},{...n,domElement:e})}else I(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function Db(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dv(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dw(e){return e.find(e=>!Db(e))}function D_(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Dx=window.getComputedStyle(document.body).overflow;function DS({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",DD),document.body.style.overflow="hidden",t.style.visibility="unset");let n=Dw(e);e.forEach(e=>{switch(e.state){case"NEW":{let n=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=n,e.state="MOUNTING",Dg(n,e.modalName,e.props).then(r=>{Db(e)?Dv(e.modalName,r):r?(e.parcel=r,t.prepend(n),D_(e,Dw(Dm.getState().modalStack)===e),r.mountPromise.then(()=>{Db(e)||(e.state="MOUNTED")},t=>{I(t),e.parcel=null,DE(e)})):DE(e)},t=>{I(t),DE(e)});break}case"MOUNTING":case"MOUNTED":D_(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dv(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=Dm.getState();Dm.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Dx,removeEventListener("keydown",DD)}function DE(e){if(Db(e))return;e.state="TO_BE_DELETED";let t=Dm.getState();Dm.setState({...t,modalStack:[...t.modalStack]})}function DD(e){"Escape"===e.key&&function(){let[e]=Dm.getState().modalStack;e&&DE(e)}()}function DO(e){Dm.subscribe(DS),Dm.setState({...Dm.getState(),modalContainer:e})}function DP(e,t={},n=()=>{}){let r=()=>{let e=Dm.getState().modalStack.find(e=>e.onClose===n);e&&DE(e)};if(pi(e)){var o;let i,a;o={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},a=[o,...(i=Dm.getState()).modalStack],Dm.setState({...i,modalStack:a})}else I(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var Dk=n(33696);let DC=({notification:e})=>{let{description:t,action:n,kind:r,critical:o,title:i,onAction:a}=e;return(0,hk.jsx)(hM.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},Dj=({subject:e})=>{let[t,n]=(0,pk.useState)([]);return(0,pk.useEffect)(()=>{let t=e.subscribe(e=>n(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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DC,{notification:e},e.id))})},DT=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,pk.useState)(t);return(0,hk.jsx)(hM.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:oG("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:oG("actionableNotification","Actionable notification"),subtitle:r,title:i,lowContrast:a,inline:!0,...u})},DR=({subject:e})=>{let[t,n]=(0,pk.useState)([]);return(0,pk.useEffect)(()=>{let t=e.subscribe(e=>n(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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DT,{notification:e},e.id))})};var DN=n(75992);let DA=new Dk.B7,DM=0,DI=new Dk.B7,D$=0;function DL(e){e&&(0,pG.createRoot)(e).render((0,hk.jsx)(Dj,{subject:DA}))}function DF(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,DN.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{DA.next({...e,id:DM++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DB(e){e&&(0,pG.createRoot)(e).render((0,hk.jsx)(DR,{subject:DI}))}function DV(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,DN.A)(t))?setTimeout(()=>{DI.next({...e,id:D$++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DU=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DW=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],DK={container:"-esm-form-engine__numeric-observation-module__container___gS0Wg",card:"-esm-form-engine__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-form-engine__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-form-engine__numeric-observation-module__critical-value___Jynsn",cell:"-esm-form-engine__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-form-engine__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-form-engine__numeric-observation-module__critically-low___XP+HX",high:"-esm-form-engine__numeric-observation-module__high___JV9do",low:"-esm-form-engine__numeric-observation-module__low___-uDKD","label-container":"-esm-form-engine__numeric-observation-module__label-container___vTf2y","value-container":"-esm-form-engine__numeric-observation-module__value-container___xTUIC",label:"-esm-form-engine__numeric-observation-module__label___-pfmb",value:"-esm-form-engine__numeric-observation-module__value___1A4zt",units:"-esm-form-engine__numeric-observation-module__units___SzvX+","pad-right":"-esm-form-engine__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-form-engine__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-form-engine__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-form-engine__numeric-observation-module__arrow___9bvsX"},DH=({value:e,unit:t,label:n,interpretation:r,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,pk.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${o5}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${o5}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:i}=fR()(n,ie),a=r?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||r?void 0:i,s),d=o??u,p=(0,pk.useMemo)(()=>{if(r)return r?"--"===r?"normal":DU.includes(r)?r.toLowerCase():DW.includes(r)?r:"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"},[r,d,e,c])??"normal",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:oG("notAvailable","Not available"),w=hj()({[DK["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[DK["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[DK.low]:"low"===p,[DK.high]:"high"===p,[DK["off-scale-low"]]:"off_scale_low"===p,[DK["off-scale-high"]]:"off_scale_high"===p}),x=hj()({[DK.container]:!0,[DK.card]:!0,[DK["critical-value"]]:f,[DK["abnormal-value"]]:h&&!f}),S=hj()({[DK.cell]:!0,[w]:!0});return"cell"===a?(0,hk.jsxs)("div",{className:S,children:[v,b&&t?` ${t}`:""]}):(0,hk.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,hk.jsxs)("div",{className:DK["label-container"],children:[(0,hk.jsx)("span",{id:m,className:DK.label,children:n}),h&&(0,hk.jsx)("span",{className:DK[p.replace("_","-")],title:oG("abnormalValue","Abnormal value")})]}),(0,hk.jsxs)("div",{className:DK["value-container"],children:[(0,hk.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:DK.value,children:v}),b&&t&&(0,hk.jsx)("span",{id:g,className:DK.units,children:t})]})]})},Dz="-esm-form-engine__page-header-module__pageHeader___6TOjO",DG=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,hk.jsx)("div",{className:hj()(Dz,n),...r,children:t})}{let{title:t,illustration:n,className:r,...o}=e;return(0,hk.jsx)("div",{className:hj()(Dz,r),...o,children:(0,hk.jsx)(Dq,{title:t,illustration:n})})}},Dq=({title:e,illustration:t,className:n})=>{let[r,o]=(0,pk.useState)(null);return(0,pk.useEffect)(()=>{ni("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,hk.jsxs)("div",{className:hj()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,hk.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,hk.jsx)("p",{children:oG(r.implementationName)}),(0,hk.jsx)("p",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},DZ=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=he(t,e,r,i),u="tablet"===f1(),c=oG("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,hk.jsx)(hk.Fragment,{children:e>0&&(0,hk.jsxs)("div",{className:hj()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,hk.jsxs)("div",{children:[c,o&&(0,hk.jsx)(pT,{to:o,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:a??oG("seeAll","See all")})]}),(0,hk.jsx)(hM.Pagination,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>oG("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function DY(e){return DQ(D0(e,"usual","official"))}function DJ(e){return DY(e)}function DQ(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function DX(e){return DQ(e)}function D0(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function D1(e,t=hl()()){let n=hl()(t),r=EC(e,n);if(null==r)return null;let o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),u={};if(o<2)u.minutes=n.diff(r,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=n.subtract(a,"weeks").diff(r,"days");u.weeks=a,u.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");u.months=s,u.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");u.years=l,u.months=e}else u.years=l;return u}function D2(e,t=hl()()){let n=D1(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),Ek(n,r)}let D4={container:"-esm-form-engine__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-form-engine__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-form-engine__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-form-engine__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-form-engine__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-form-engine__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-form-engine__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-form-engine__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-form-engine__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-form-engine__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-form-engine__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-form-engine__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-form-engine__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-form-engine__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-form-engine__patient-banner-patient-info-module__tag___InccN",gender:"-esm-form-engine__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-form-engine__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-form-engine__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-form-engine__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-form-engine__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function D3({showIdentifierLabel:e,type:t,value:n}){return(0,hk.jsx)("span",{className:D4.primaryIdentifier,children:(0,hk.jsxs)(hM.Tag,{className:D4.tag,type:"gray",children:[e&&t?.text&&(0,hk.jsxs)("span",{className:D4.label,children:[t.text,": "]}),(0,hk.jsx)("span",{className:D4.value,children:n})]})})}function D6({showIdentifierLabel:e,type:t,value:n}){return(0,hk.jsxs)(hM.FormLabel,{className:D4.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,hk.jsxs)("span",{className:D4.label,children:[t?.text,": "]}),(0,hk.jsx)("span",{className:D4.value,children:n})]})}function D5({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=fP(),{primaryIdentifierCode:r}=hr(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,hk.jsx)(hk.Fragment,{children:o?.length?o.map(({value:e,type:n},i)=>(0,hk.jsxs)(pC().Fragment,{children:[(0,hk.jsx)("span",{className:D4.identifier,children:n?.coding?.[0]?.code===r?(0,hk.jsx)(D3,{showIdentifierLabel:t,type:n,value:e}):(0,hk.jsx)(D6,{showIdentifierLabel:t,type:n,value:e})}),i<o.length-1&&(0,hk.jsx)("span",{className:D4.separator,children:"\xb7"})]},e)):""})}let D7={Female:my,Male:mg,Other:mb,Unknown:mv},D9=({gender:e})=>{let t=D7[e];return t?(0,hk.jsx)(t,{fill:"#525252"}):null},D8={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Oe({patient:e,renderedFrom:t}){var n;let r,o,i=DY(e),a=e?.gender&&(o=D8[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:oG(r,n),iconKey:o}),s=(0,pk.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,hk.jsxs)("div",{className:D4.patientInfo,children:[(0,hk.jsx)("div",{className:hj()(D4.row,D4.patientNameRow),children:(0,hk.jsxs)("div",{className:D4.flexRow,children:[(0,hk.jsx)("span",{className:D4.patientName,children:i}),a&&(0,hk.jsxs)("div",{className:D4.gender,children:[(0,hk.jsx)(D9,{gender:a.iconKey}),(0,hk.jsx)("span",{children:a.displayText})]}),(0,hk.jsx)(pz,{className:D4.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,hk.jsxs)("div",{className:D4.demographics,children:[e.birthDate&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("span",{children:D2(e.birthDate)}),(0,hk.jsx)("span",{className:D4.separator,children:"\xb7"}),(0,hk.jsx)("span",{children:Ex(e.birthDate,{time:!1})}),(0,hk.jsx)("span",{className:D4.separator,children:"\xb7"})]}),(0,hk.jsx)(D5,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,hk.jsx)(pz,{className:D4.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Ot=n(18282);function On({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[o,i]=(0,pk.useState)(!1),{extensions:a}=pK(n),s="tablet"===f1(),l=f5(()=>i(!1),o),u=(0,pk.useRef)(null),c=(0,pk.useRef)(null),d=(0,pk.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,pk.useCallback)(()=>i(e=>!e),[]),m=(0,pk.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,pk.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();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 n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,pk.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,pk.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...r}),[t,e,m,r]);return 0===a.length?null:(0,hk.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,hk.jsxs)("div",{"data-overflow-menu":!0,className:hj()("cds--overflow-menu",hL),ref:l,children:[(0,hk.jsxs)("button",{className:hj()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},hV),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,hk.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:oG("actions","Actions")})," ",(0,hk.jsx)(Ot.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,hk.jsxs)("div",{className:hj()("cds--overflow-menu-options","cds--overflow-menu--flip",hF,{[hB]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,hk.jsx)("ul",{className:hj()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,hk.jsx)(pz,{name:n,state:g},n)}),(0,hk.jsx)("span",{})]})]})})}var Or=n(35570),Oo=n.n(Or);function Oi(e){let{patientPhotoConceptUuid:t}=fP({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${o5}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:o,isLoading:i}=p8()(e?n:null,ie),a=r?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Oa=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,p7.useTranslation)();return(0,hk.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,hk.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,hk.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"})]})},Os="-esm-form-engine__patient-photo-module__avatar___thboZ";function Ol({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:o}=Oi(e),[i,a]=(0,pk.useState)(null),[s,l]=(0,pk.useState)(!1),u=(0,pk.useMemo)(()=>Oo().generate(e),[e]);(0,pk.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(a(e),l(!1))},n.onerror=()=>{t||(a(null),l(!1))},n.src=e,()=>{t=!0}}a(null),l(!1)},[r?.imageSrc]);let c=(0,pk.useMemo)(()=>n||(i?oG("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):oG("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,i,t]);return o||s?(0,hk.jsx)(hM.SkeletonIcon,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!i?(0,hk.jsx)(Oa,{"aria-label":oG("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("img",{className:Os,src:i,alt:c,title:t})}):(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("div",{className:Os,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,hk.jsx)("span",{className:"-esm-form-engine__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Ou=["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"],Oc=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Od=Oc,Op=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),Of=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Oh=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Om=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Oy=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Og=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ob=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Ov=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Ow=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),O_=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Ox=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),OS=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),OE=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),OD=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),OO=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),OP=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Ok=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OC=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Oj=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),OT=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),OR=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),ON=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),OA=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),OM=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),OI=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),O$=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),OL=(0,pk.memo)((0,pk.forwardRef)(function(e,t){return(0,hk.jsx)(OU,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),OF=Ow,OB=OC,OV=(0,pk.memo)((0,pk.forwardRef)(function({pictogram:e,fallback:t,...n},r){let o=(0,pk.useRef)(document.getElementById(e));return(0,pk.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(o.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,hk.jsx)(fg,{value:o.current,fallback:t,children:(0,hk.jsx)(OU,{ref:r,pictogram:e,pictogramProps:n})})})),OU=(0,pk.memo)((0,pk.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,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,hk.jsx)("svg",{ref:n,className:hj()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:o,width:o,children:(0,hk.jsx)("use",{href:`#${e}`})})})),OW=({children:e})=>"tablet"===f1()?(0,hk.jsx)(hM.Layer,{children:e}):(0,hk.jsx)(hk.Fragment,{children:e}),OK=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==r,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==r,title:c,id:d,...p}=e,[f,h]=(0,pk.useState)(n),[m,y]=(0,pk.useState)(!0),[g,b]=(0,pk.useState)(!1),v=(0,pk.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,pk.useCallback)(()=>{b(!0),v()},[v]);return(0,pk.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,pk.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,hk.jsx)(hM.ActionableNotification,{actionButtonLabel:f,"aria-label":oG("closeSnackbar","Close snackbar"),className:hj()("-esm-form-engine__snackbar-module__slideIn___senVE",{"-esm-form-engine__snackbar-module__animated___8eltL":m,"-esm-form-engine__snackbar-module__slideOut___BIIXm":g}),kind:r,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:oG("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},OH=({subject:e})=>{let[t,n]=(0,pk.useState)([]),r=(0,pk.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,pk.useEffect)(()=>{let t=e.subscribe(e=>n(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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(OK,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},Oz=new Dk.B7,OG=0;function Oq(e){e&&(0,pG.createRoot)(e).render((0,hk.jsx)(OH,{subject:Oz}))}function OZ(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{Oz.next({...e,id:OG++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let OY=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,pk.useCallback)(()=>{s(),t()},[t,s]);return(0,hk.jsx)("div",{children:(0,hk.jsx)(hM.ActionableNotification,{actionButtonLabel:a,kind:r||"info",lowContrast:o,subtitle:n,title:i||"",onActionButtonClick:l,onClose:t})})},OJ=({subject:e})=>{let[t,n]=(0,pk.useState)([]),r=(0,pk.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,pk.useEffect)(()=>{let t=e.subscribe(e=>n(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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(OY,{toast:e,closeToast:()=>r(e)},e.id))})},OQ=new Dk.B7,OX=0;function O0(e){e&&(0,pG.createRoot)(e).render((0,hk.jsx)(OJ,{subject:OQ}))}function O1(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,DN.A)(t))?setTimeout(()=>{OQ.next({...e,id:OX++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function O2(e,t=!1){if(t)return!0;let n=O7[e];return!n||!n()}function O4(e,t){let n=Pi.getState()?.workspaceGroup,r=n?.name;r&&e===r&&Pu(()=>{let r=Ph(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),Pi.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function O3(e,t){let{name:n,additionalProps:r}=t;pd(n);let o=()=>{Pn(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>O6(n,r),closeWorkspaceGroup:!1})};O2(e.name)?o():Pd("closing-workspace-launching-new-workspace",o,e.title??e.name)}function O6(e,t){let n=pd(e),r=Pi.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void O4(r.name,()=>{O6(e,t)});let o=Pi.getState().workspaceGroup?.name,i={...n,title:Pp(n,t),closeWorkspace:(t={})=>Pn(e,t),closeWorkspaceWithSavedChanges:t=>Pn(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(O7[n]=r)},setTitle:(t,n)=>{i.title=t,i.titleNode=n,Pi.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){Pi.setState(n=>{let r=[e,...t??n.openWorkspaces],o=Pl(e);return{...n,openWorkspaces:r,workspaceWindowState:o}})}o&&Ph(o,t);let s=Pi.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===Pp(t,t.additionalProps)&&{title:Pp(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,Pi.getState().openWorkspaces.filter(e=>e.type!=i.type)),O3(u,{name:e,additionalProps:t})):a(i);else O3(s[0],{name:e,additionalProps:t})}function O5({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Pr(t),O6(n,r),oY({to:e})}let O7={};function O9(e,t){O7[e]=t}function O8(e){return O7[e]}function Pe(){let e=Pi.getState();Pi.setState({...e,prompt:null})}let Pt={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Pn(e,t={}){t={...Pt,...t};let n=()=>{let n=Pi.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),o=Pi.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&O4(o),O7[e]=()=>!1,Pi.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:Pl(r?.[0])})),t?.onWorkspaceClose?.()};return O2(e,t?.ignoreChanges)?(n(),!0):(Pd("closing-workspace",n,pd(e).title??e),!1)}function Pr(e){Pi.getState().context!=e&&Pi.setState({context:e,openWorkspaces:[],prompt:null})}let Po={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},Pi=Z("workspace",Po);function Pa(){return Pi}function Ps(e){let t=Pi.getState();Pi.setState({...t,workspaceWindowState:e})}function Pl(e){return e?.preferredWindowSize??"normal"}function Pu(e=()=>{},t=()=>!0){let n=Pi.getState().openWorkspaces.filter(t).every(({name:e})=>O2(e)),r=()=>{Pf(),e?.()};n?r():Pd("closing-all-workspaces",r)}function Pc(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=pI(Pi);return(0,pk.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function Pd(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:oG("unsavedChangesTitleText","Unsaved changes"),body:oG("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:oG("discard","Discard")};break;case"closing-all-workspaces":{let e=Pi.getState().openWorkspaces.filter(({name:e})=>!O2(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:oG("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:oG("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:oG("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:oG("unsavedChangesTitleText","Unsaved changes"),body:oG("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{Pi.setState(e=>({...e,prompt:null})),t?.()},confirmText:oG("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}Pi.setState(e=>({...e,prompt:r}))}function Pp(e,t){return t?.workspaceTitle??e.title}function Pf(){Pi.setState(Po)}function Ph(e,t={}){if(!e||"default"===e)return;let n=J(e,{});return t&&n.setState(e=>({...e,...t})),n}let Pm="-esm-form-engine__action-menu-button-module__container___F68g0",Py="-esm-form-engine__action-menu-button-module__elementContainer___D1ACn",Pg="-esm-form-engine__action-menu-button-module__active___HAE75";function Pb({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,hk.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__countTag___3mn9k",children:n})]})}let Pv=({getIcon:e,label:t,iconDescription:n,handler:r,type:o,tagContent:i})=>{let a=f1(),{workspaces:s,workspaceWindowState:l}=Pc(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,hk.jsxs)(hM.Button,{className:hj()(Pm,{[Pg]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:Py,children:(0,hk.jsx)(Pb,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hM.IconButton,{align:"left","aria-label":n,className:hj()(Pm,{[Pg]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,hk.jsx)("div",{className:Py,children:(0,hk.jsx)(Pb,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var Pw=n(58742);let P_=pC().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?pC().createElement(Pw.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},ed||(ed=pC().createElement("path",{d:"M2 9L2 10 5.3 10 1 14.3 1.7 15 6 10.7 6 14 7 14 7 9zM14 7L14 6 10.7 6 15 1.7 14.3 1 10 5.3 10 2 9 2 9 7z"})),e):pC().createElement(Pw.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ep||(ep=pC().createElement("path",{d:"M4 18L4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18zM30 3.416L28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"})),e)});var Px=n(54240),PS=n(68622),PE=/[\\^$.*+?()[\]{}|]/g,PD=RegExp(PE.source);let PO=function(e){return(e=tu(e))&&PD.test(e)?e.replace(PE,"\\$&"):e};function PP({contextKey:e}){let{prompt:t}=Pc();return(0,pk.useEffect)(()=>{RegExp(`/${PO(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,pk.useEffect)(()=>(Pr(e),()=>{Pr(null)}),[e]),(0,pk.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,o=RegExp(`/${PO(e)}(/|$)`),i=new URL(r),a=o.test(i.pathname),s=Pi.getState().openWorkspaces.every(({name:e})=>O2(e));a||(s?Pf():(n?.(),Pu(()=>{oY({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,hk.jsxs)(hM.ComposedModal,{open:!0,onClose:Pe,children:[(0,hk.jsx)(hM.ModalHeader,{title:t.title}),(0,hk.jsx)(hM.ModalBody,{children:(0,hk.jsx)("p",{className:"-esm-form-engine__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,hk.jsxs)(hM.ModalFooter,{children:[(0,hk.jsx)(hM.Button,{kind:"secondary",onClick:Pe,children:t.cancelText??oG("cancel")}),(0,hk.jsx)(hM.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??oG("confirm")})]})]}):null}function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pk(Object(n),!0).forEach(function(t){PT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PR(e){return(PR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PN(e,t){return(PN=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PA(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var PM=function(e){var t=pk.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&PN(a,t);var n,r,o,i=(n=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=PR(a);e=n?Reflect.construct(t,arguments,PR(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 PA(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),PT(PA(t=i.call(this,e)),"handleRef",function(e){t.el=e}),PT(PA(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),PT(PA(t),"getParcelProps",function(){var e=PC(PC({},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 r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)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(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,PC({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 pX&&pX.Consumer?pk.createElement(pX.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=pX&&pX.Consumer?pk.createElement(pX.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return pk.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Pj(a.prototype,r),o&&Pj(a,o),a}();PT(PM,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function PI({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,pk.useState)(),o=function(e){let[t,n]=(0,pk.useState)({}),[r,o]=(0,pk.useState)(e);return(0,pk.useEffect)(()=>{r!==e&&o(e)},[e]),(0,pk.useEffect)(()=>{let e,t=Ph(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,pk.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let i=(0,pk.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return n?(0,hk.jsx)(PM,{config:n,mountParcel:pO,...i},e.name):(0,hk.jsx)(hM.InlineLoading,{className:"-esm-form-engine__workspace-module__loader___jEP+q",description:`${oG("loading","Loading")} ...`})}function P$({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,o]=(0,pk.useState)(!1),i=(0,pk.useRef)(window.innerHeight),{featureName:a}=(0,pk.useContext)(pj),s=f1();(0,pk.useEffect)(()=>{let e=()=>{o(!f2(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,hk.jsx)("aside",{className:hj()("-esm-form-engine__action-menu-module__sideRail___iVmKs",{"-esm-form-engine__action-menu-module__withinWorkspace___YZfet":e,"-esm-form-engine__action-menu-module__sideRailHidden___bCdyQ":r,"-esm-form-engine__action-menu-module__sideRailVisible___+oJCY":!r}),children:(0,hk.jsx)("div",{className:"-esm-form-engine__action-menu-module__container___sf6Et",children:(0,hk.jsx)(pz,{className:"-esm-form-engine__action-menu-module__chartExtensions___l+r+Y",name:l,state:n})})})}function PL({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:o}){let i=f1(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=Pc(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,pk.useMemo)(()=>n||u&&!d,[u,d,n]);return fE(!d&&!f2(i)),(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("div",{className:n?"-esm-form-engine__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-form-engine__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,hk.jsx)("aside",{className:hj()(t?"-esm-form-engine__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-form-engine__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-form-engine__workspace-module__hiddenRelative___7oRNR":d,"-esm-form-engine__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-form-engine__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-form-engine__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,hk.jsx)("div",{className:hj()("-esm-form-engine__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-form-engine__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-form-engine__workspace-module__hiddenFixed___kBFgl":d}),children:a.map((e,t)=>(0,hk.jsx)("div",{className:hj()("-esm-form-engine__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-form-engine__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,hk.jsx)(pk.Suspense,{fallback:null,children:(0,hk.jsx)(p7.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,hk.jsx)(PF,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,hk.jsx)(PP,{contextKey:e})]}),f&&(0,hk.jsx)(P$,{name:u,isWithinWorkspace:!n,actionMenuProps:o})]})}function PF({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,p7.useTranslation)(),r=f1(),{workspaceWindowState:o,workspaceGroup:i}=Pc(),a=i?.name,s="maximized"===o;(0,pk.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,pk.useContext)(pj),u=(0,pk.useCallback)(()=>{Ps(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,pk.useMemo)(()=>e??{},[e]),h=(0,pk.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)(hM.Header,{"aria-label":oG("workspaceHeader","Workspace Header"),className:"-esm-form-engine__workspace-module__header___nMH1R",children:[!f2(r)&&!c&&(0,hk.jsx)(hM.HeaderMenuButton,{"aria-label":oG("close","Close"),renderMenuIcon:(0,hk.jsx)(hJ,{}),onClick:()=>f()}),(0,hk.jsx)(hM.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,hk.jsx)("div",{className:"-esm-form-engine__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,hk.jsxs)(hM.HeaderGlobalBar,{className:"-esm-form-engine__workspace-module__headerButtons___lek95",children:[(0,hk.jsx)(pz,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,hk.jsx)(pz,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,hk.jsx)(pz,{name:`workspace-header-${l}-slot`,state:h}),f2(r)&&(0,hk.jsxs)(hk.Fragment,{children:[(d||s)&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":s?oG("minimize","Minimize"):oG("maximize","Maximize"),onClick:u,children:s?(0,hk.jsx)(P_,{}):(0,hk.jsx)(Px.hz,{})}),c&&!a?(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("hide","Hide"),onClick:()=>Ps("hidden"),children:(0,hk.jsx)(hQ,{})}):(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(ma,{})})]}),"tablet"===r&&c&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(PS.d3,{})})]})]}),(0,hk.jsx)("div",{className:hj()("-esm-form-engine__workspace-module__workspaceContent___FFe+u",{"-esm-form-engine__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,hk.jsx)(PI,{workspace:e,additionalPropsFromPage:t},e.name)})]})}var PB=new Uint8Array(16);let PV=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var PU=[],PW=0;PW<256;++PW)PU.push((PW+256).toString(16).substr(1));let PK=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(PU[e[t+0]]+PU[e[t+1]]+PU[e[t+2]]+PU[e[t+3]]+"-"+PU[e[t+4]]+PU[e[t+5]]+"-"+PU[e[t+6]]+PU[e[t+7]]+"-"+PU[e[t+8]]+PU[e[t+9]]+"-"+PU[e[t+10]]+PU[e[t+11]]+PU[e[t+12]]+PU[e[t+13]]+PU[e[t+14]]+PU[e[t+15]]).toLowerCase();if(!("string"==typeof n&&PV.test(n)))throw TypeError("Stringified UUID is invalid");return n},PH=function(e,t,n){var r=(e=e||{}).random||(e.rng||function(){if(!ef&&!(ef="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ef(PB)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return PK(r)};async function Pz(e,t){let{openedGroup:n}=pf.getState();if(n){if(n.groupName===e&&PZ(n.props,t))return!0;else if(!await PY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return pf.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function PG(e){let{openedGroup:t,openedWindows:n}=pf.getState();if(t){if(n.length>0&&!(e||await PY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;pf.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Pq(e,t=null,n=null,r=null){let o=pf.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=ph(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=pm(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=py(e);if(a&&(a.groupName!==l.name||!PZ(a.props,r)))return!!await PY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(pf.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[P1(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let r=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=r;if(PZ(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&PZ(d.props,t)?((a||u!==o.openedWindows.length-1)&&pf.setState(PJ.restoreWindow(o,s)),!0):!!await PY({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(pf.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[P1(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await PY({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(pf.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[P1(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(pf.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[P1(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await PY({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(pf.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[P1(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function PZ(e,t){return null==e||null==t||F(e,t)}function PY(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&n.push(o),t&&o.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=pf.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=DP("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let PJ={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[r],maximized:n};return o[r]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],o=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=py(t);if(n<0)return e;let r={...e.openedWindows[n]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;i.splice(n,1),t&&i.length>0&&(a=!1)}else i[n]=r;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,n,r){let o=e.registeredWorkspacesByName[n];if(!o)throw Error(`No workspace named "${n}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${n} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${n} 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==a?{...e,openedWorkspaces:[...u,P1(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=py(t);if(r<0)return e;let o={...e.openedWindows[r]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:n};let a=[...e.openedWindows];return a[r]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function PQ(){return p$(pf,PJ)}let PX=()=>(0,pk.useContext)(pX),P0=()=>Object.keys(pf.getState().registeredWorkspacesByName);function P1(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:PH()}}let P2={workspaceOuterContainer:"-esm-form-engine__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-form-engine__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-form-engine__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-form-engine__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-form-engine__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-form-engine__workspace2-module__maximized___aKCbE",hidden:"-esm-form-engine__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-form-engine__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-form-engine__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-form-engine__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-form-engine__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-form-engine__workspace2-module__header___MXXx9",headerButtons:"-esm-form-engine__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-form-engine__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-form-engine__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-form-engine__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-form-engine__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-form-engine__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-form-engine__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},P4=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=f1(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=PQ(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=PX(),v=py(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,pk.useEffect)(()=>{x?.hasUnsavedChanges!=n&&a(m,n??!1)},[x?.hasUnsavedChanges,n,m,a]),(0,pk.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[m].window,D=c[E];if(!D)throw Error(`Cannot find registered workspace window ${E}`);let{icon:O,canMaximize:P}=D,k="closable"===S.persistence,C=!!O&&!k,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=v<s.length-1||h;return(0,hk.jsxs)("div",{className:hj()(P2.workspaceOuterContainer,{[P2.narrowWorkspace]:"narrow"===T,[P2.widerWorkspace]:"wider"===T,[P2.extraWideWorkspace]:"extra-wide"===T,[P2.isActionMenuOpened]:R}),children:[(0,hk.jsx)("div",{className:hj()(P2.workspaceSpacer,{[P2.hidden]:N})}),(0,hk.jsx)("div",{className:hj()(P2.workspaceMiddleContainer,{[P2.maximized]:j,[P2.hidden]:N,[P2.isRootWorkspace]:y,[P2.showActionMenu]:b}),children:(0,hk.jsxs)("div",{className:hj()(P2.workspaceInnerContainer,{[P2.maximized]:j,[P2.hidden]:N,[P2.isRootWorkspace]:y}),children:[(0,hk.jsxs)(hM.Header,{"aria-label":oG("workspaceHeader"),className:P2.header,children:[(0,hk.jsx)(hM.HeaderName,{prefix:"",children:e}),(0,hk.jsx)("div",{className:P2.overlayHeaderSpacer}),(0,hk.jsx)(hM.HeaderGlobalBar,{className:P2.headerButtons,children:f2(r)?(0,hk.jsxs)(hk.Fragment,{children:[(P||j)&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":j?oG("minimize"):oG("maximize"),onClick:()=>o(E,!j),children:j?(0,hk.jsx)(P_,{}):(0,hk.jsx)(Px.hz,{})}),C&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("hide"),onClick:()=>i(),children:(0,hk.jsx)(hQ,{})}),!k&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("close"),onClick:()=>g({closeWindow:!0}),children:(0,hk.jsx)(ma,{})})]}):(0,hk.jsxs)(hk.Fragment,{children:[C&&(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("hide"),onClick:()=>i(),children:(0,hk.jsx)(PS.d3,{})}),(0,hk.jsx)(hM.HeaderGlobalAction,{"aria-label":oG("close"),onClick:()=>{k?PG():g({closeWindow:!0})},children:(0,hk.jsx)(ma,{})})]})})]}),(0,hk.jsx)("div",{className:hj()(P2.workspaceContent),children:t})]})})]})},P3="-esm-form-engine__action-menu-button2-module__container___pahg-",P6="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",P5="-esm-form-engine__action-menu-button2-module__active___4O4Bs",P7="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function P9({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,hk.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let P8=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let i=f1(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=PQ(),{extension:c}=(0,pk.useContext)(pj),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;Pq(e,t,n)}};return"tablet"===i||"phone"===i?(0,hk.jsxs)(hM.Button,{className:hj()(P3,{[P5]:f&&!m,[P7]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:P6,children:(0,hk.jsx)(P9,{hasUnsavedChanges:y,getIcon:e,tagContent:n})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hM.IconButton,{align:"left","aria-label":t,className:hj()(P3,{[P5]:f&&!m,[P7]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,hk.jsx)("div",{className:P6,children:(0,hk.jsx)(P9,{hasUnsavedChanges:y,getIcon:e,tagContent:n})})})};function ke({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,hk.jsx)(hM.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?mi:mn,children:e?oG("showLess","Show less"):oG("showMore","Show more")})}let kt={contactDetails:"-esm-form-engine__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-form-engine__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-form-engine__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-form-engine__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-form-engine__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-form-engine__patient-banner-contact-details-module__relationship___CZmay"},kn=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${o5}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=p8()(t,ie),o=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,pk.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("p",{className:kt.heading,children:[oG("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,hk.jsx)(hM.InlineLoading,{description:`${oG("loading","Loading")} ...`,role:"progressbar"}):(0,hk.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,hk.jsx)("li",{children:(0,hk.jsx)(pT,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,hk.jsx)("li",{children:"--"})})(),t.length>3&&(0,hk.jsx)("li",{className:kt.link,children:(0,hk.jsx)(pT,{to:`${window.spaBase}/home/patient-lists`,children:oG("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},kr=({patientId:e})=>{let{patient:t,isLoading:n}=hn(e),r=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return n?(0,hk.jsx)(hM.InlineLoading,{description:`${oG("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:kt.heading,children:oG("address","Address")}),(0,hk.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,hk.jsxs)("li",{children:[oG(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,hk.jsxs)("li",{children:[oG(e,e),": ",t]},`address-${e}`)):(0,hk.jsx)("li",{children:"--"})})]})},ko=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=fP({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:o}=(e=>{let{data:t,error:n,isLoading:r}=fR()(`${o5}/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)))`,ie);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,pk.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:o,error:r}})(e),r=(0,pk.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?oG(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:kt.heading,children:oG("contactDetails","Contact Details")}),t?(0,hk.jsx)(hM.InlineLoading,{description:`${oG("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,hk.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,hk.jsx)("li",{children:"--"})})]})},ki=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${o5}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:o,isValidating:i}=p8()(e?t:null,ie),a=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?a:null,error:r,isLoading:o,isValidating:i}}(e);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:kt.heading,children:oG("relationships","Relationships")}),n?(0,hk.jsx)(hM.InlineLoading,{description:`${oG("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:t&&t.length>0?(0,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsxs)("li",{className:kt.relationship,children:[(0,hk.jsx)("div",{children:(0,hk.jsx)(pT,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,hk.jsx)("div",{children:e.relationshipType}),(0,hk.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?oG("yearAbbreviation","yr"):oG("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,hk.jsx)("li",{children:"--"})})]})};function ka({patientId:e,deceased:t}){return(0,hk.jsxs)("div",{className:hj()(kt.contactDetails,{[kt.deceased]:t}),children:[(0,hk.jsxs)("div",{className:kt.row,children:[(0,hk.jsx)("div",{className:kt.col,children:(0,hk.jsx)(kr,{patientId:e})}),(0,hk.jsx)("div",{className:kt.col,children:(0,hk.jsx)(ko,{patientUuid:e})})]}),(0,hk.jsxs)("div",{className:kt.row,children:[(0,hk.jsx)("div",{className:kt.col,children:(0,hk.jsx)(ki,{patientId:e})}),(0,hk.jsx)("div",{className:kt.col,children:(0,hk.jsx)(kn,{patientUuid:e})})]})]})}function ks(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}let kl="-esm-form-engine__action-menu2-module__container___5s3CM";function ku({workspaceGroup:e,groupProps:t}){let n=f1(),{persistence:r}=e;return(0,hk.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,hk.jsxs)("div",{className:kl,children:["closable"==r&&f2(n)&&(0,hk.jsx)(hM.IconButton,{align:"left",onClick:()=>PG(),label:oG("close"),kind:"ghost",children:(0,hk.jsx)(ma,{})}),(0,hk.jsx)(pj.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,hk.jsx)(pz,{className:kl,name:e.name,state:{groupProps:t}})})]})})}function kc(e){let t=new URL(e,window.location.origin).pathname,n=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,r=n.endsWith("/")?n.slice(0,-1):n,o=null;return r?r===t?o="/":t.startsWith(`${r}/`)&&(o=t.slice(r.length)):o=t,{full:t,spaRelative:o}}let kd=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=PQ(),u=(0,pk.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await PY({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(o||await PY({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=t.workspaceName,{openedWorkspaces:i}=n,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await PY({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:a&&a.props?a.props:null,workspaceMeta:pf.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:o,windowName:n.windowName,showActionMenu:i},[t,s,a,n]);if(!e){let{registeredWorkspacesByName:e}=pf.getState(),n=e[t.workspaceName],o=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=pf.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,hk.jsxs)("div",{className:hj()(P2.workspaceOuterContainer,{[P2.narrowWorkspace]:"narrow"===u,[P2.widerWorkspace]:"wider"===u,[P2.extraWideWorkspace]:"extra-wide"===u,[P2.isActionMenuOpened]:c}),children:[(0,hk.jsx)("div",{className:P2.workspaceSpacer}),(0,hk.jsx)("div",{className:hj()(P2.workspaceMiddleContainer,{[P2.isRootWorkspace]:r,[P2.showActionMenu]:i}),children:(0,hk.jsx)("div",{className:hj()(P2.workspaceInnerContainer,{[P2.isRootWorkspace]:r}),children:(0,hk.jsx)(hM.InlineLoading,{className:P2.loader,description:`${oG("loading")} ...`})})})]})}return(0,hk.jsx)(PM,{config:e,mountParcel:pO,...u},t.workspaceName)},kp=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,o]=(0,pk.useState)({}),{registeredWorkspacesByName:i}=pf.getState();return(0,pk.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=i[e.workspaceName];return[e.uuid,await hg(t,n)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,hk.jsx)(hk.Fragment,{children:n.map((o,i)=>(0,hk.jsx)(kd,{openedWorkspace:o,openedWindow:e,lifeCycle:r[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===n.length-1,showActionMenu:t},o.uuid))})};function kf(e){e&&(0,pG.createRoot)(e).render((0,hk.jsx)(kh,{}))}function kh(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=PQ();if((0,pk.useEffect)(()=>cw("before-page-changed",t=>{let{newPage:r,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(r)return void o(PG().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),o=kc(t),i=kc(n);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=r.exec(o.spaRelative),s=r.exec(i.spaRelative);if(a&&s||(a=r.exec(o.full),s=r.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(PG().then(e=>!e))}),[e,n]),!e)return null;let o=n[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(r).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,hk.jsxs)("div",{className:hj()("-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-form-engine__workspace-windows-and-menu-module__overlay___fqI+X":o.overlay,"-esm-form-engine__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":i}),children:[(0,hk.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,hk.jsx)(kp,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,hk.jsx)(ku,{workspaceGroup:o,groupProps:e.props})]})}function km(e,t,n){if(null==e)return n;let r=SV(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let o=[];for(let e of t){let t=SV(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=r;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",n=o.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===i){i="fr-HT";continue}let r=i.lastIndexOf("-");if(-1===r)break;let a=(i=i.slice(0,r)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return n}function ky(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function kg(e){return!!e&&e.constructor===Object}var kb=n(2722);function kv(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function kw(e,t){let n=function(e){let t=e.indexOf("-");if(t>=0){let n=kv(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return kv(e)}(t);return kb.satisfies(n,e,{includePrerelease:!0})}async function k_(e,t={}){let n,{shouldRetry:r,getDelay:o,onError:i}=t;r=r??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await kx(o(a)),await e()}catch(e){i?.(e,a),n=e}while(r(a++));throw n}async function kx(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);